From bf745a932f0af962a2922e9deb8572884385c261 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 14 Sep 2023 22:47:21 +0300 Subject: [PATCH 001/343] fix: Generate CloudQuery Go API Client from `spec.json` (#6) Co-authored-by: cq-bot --- client.gen.go | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 9 +++ spec.json | 55 +++++++++++++++ 3 files changed, 250 insertions(+) diff --git a/client.gen.go b/client.gen.go index f07ac53..18865d8 100644 --- a/client.gen.go +++ b/client.gen.go @@ -170,6 +170,11 @@ type ClientInterface interface { // GetTeamByName request GetTeamByName(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateTeamWithBody request with any body + UpdateTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateTeam(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamApiKeys request ListTeamApiKeys(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -575,6 +580,30 @@ func (c *Client) GetTeamByName(ctx context.Context, teamName TeamName, reqEditor return c.Client.Do(req) } +func (c *Client) UpdateTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTeamRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateTeam(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTeamRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamApiKeys(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamApiKeysRequest(c.Server, teamName, params) if err != nil { @@ -1976,6 +2005,53 @@ func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, e return req, nil } +// NewUpdateTeamRequest calls the generic UpdateTeam builder with application/json body +func NewUpdateTeamRequest(server string, teamName TeamName, body UpdateTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateTeamRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewUpdateTeamRequestWithBody generates requests for UpdateTeam with any type of body +func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListTeamApiKeysRequest generates requests for ListTeamApiKeys func NewListTeamApiKeysRequest(server string, teamName TeamName, params *ListTeamApiKeysParams) (*http.Request, error) { var err error @@ -2841,6 +2917,11 @@ type ClientWithResponsesInterface interface { // GetTeamByNameWithResponse request GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + // UpdateTeamWithBodyWithResponse request with any body + UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + // ListTeamApiKeysWithResponse request ListTeamApiKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*ListTeamApiKeysResponse, error) @@ -3415,6 +3496,33 @@ func (r GetTeamByNameResponse) StatusCode() int { return 0 } +type UpdateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamApiKeysResponse struct { Body []byte HTTPResponse *http.Response @@ -4043,6 +4151,23 @@ func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, tea return ParseGetTeamByNameResponse(rsp) } +// UpdateTeamWithBodyWithResponse request with arbitrary body returning *UpdateTeamResponse +func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateTeamResponse(rsp) +} + +func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateTeamResponse(rsp) +} + // ListTeamApiKeysWithResponse request returning *ListTeamApiKeysResponse func (c *ClientWithResponses) ListTeamApiKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*ListTeamApiKeysResponse, error) { rsp, err := c.ListTeamApiKeys(ctx, teamName, params, reqEditors...) @@ -5087,6 +5212,67 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamApiKeysResponse parses an HTTP response from a ListTeamApiKeysWithResponse call func ParseListTeamApiKeysResponse(rsp *http.Response) (*ListTeamApiKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 3ef3013..4fac1e8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -534,6 +534,12 @@ type CreateTeamJSONBody struct { Name TeamName `json:"name"` } +// UpdateTeamJSONBody defines parameters for UpdateTeam. +type UpdateTeamJSONBody struct { + // DisplayName The team's display name + DisplayName *string `json:"display_name,omitempty"` +} + // ListTeamApiKeysParams defines parameters for ListTeamApiKeys. type ListTeamApiKeysParams struct { // PerPage The number of results per page (max 1000). @@ -630,5 +636,8 @@ type CreatePluginVersionTablesJSONRequestBody CreatePluginVersionTablesJSONBody // CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType. type CreateTeamJSONRequestBody CreateTeamJSONBody +// UpdateTeamJSONRequestBody defines body for UpdateTeam for application/json ContentType. +type UpdateTeamJSONRequestBody UpdateTeamJSONBody + // EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. type EmailTeamInvitationJSONRequestBody EmailTeamInvitationJSONBody diff --git a/spec.json b/spec.json index 89b972b..ed14de6 100644 --- a/spec.json +++ b/spec.json @@ -1115,6 +1115,61 @@ "tags": [ "teams" ] + }, + "patch": { + "description": "Update team attributes", + "operationId": "UpdateTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "type": "string", + "description": "The team's display name" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] } }, "/teams/{team_name}/plugins": { From 448e714e2f08e61976eee9ea4ac2da02d7b0f37c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 15 Sep 2023 11:59:53 +0300 Subject: [PATCH 002/343] chore(main): Release v1.0.1 (#7) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6181728..c204697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.0...v1.0.1) (2023-09-14) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#6](https://github.com/cloudquery/cloudquery-api-go/issues/6)) ([bf745a9](https://github.com/cloudquery/cloudquery-api-go/commit/bf745a932f0af962a2922e9deb8572884385c261)) + ## 1.0.0 (2023-09-14) * Generate CloudQuery Go API Client from `spec.json` ([eaa26dc](https://github.com/cloudquery/cloudquery-api-go/commit/eaa26dc40c4e3b06414536a7d4686eeff66d1316)) From 5c3fd7eefd2824ca7fbe28b640f0acd921381f0b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 15 Sep 2023 17:58:36 +0300 Subject: [PATCH 003/343] fix: Generate CloudQuery Go API Client from `spec.json` (#8) Co-authored-by: cq-bot --- client.gen.go | 704 +++++++++++++++++++++++++++++++++++++++++++------- models.gen.go | 16 +- spec.json | 298 +++++++++++++++++---- 3 files changed, 862 insertions(+), 156 deletions(-) diff --git a/client.gen.go b/client.gen.go index 18865d8..1ca8bce 100644 --- a/client.gen.go +++ b/client.gen.go @@ -100,6 +100,12 @@ type ClientInterface interface { CreatePlugin(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePluginsByTeam request + DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePluginByTeamAndPluginName request + DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetPlugin request GetPlugin(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -111,11 +117,6 @@ type ClientInterface interface { // ListPluginVersions request ListPluginVersions(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreatePluginVersionWithBody request with any body - CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetPluginVersion request GetPluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -124,6 +125,11 @@ type ClientInterface interface { UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePluginVersionWithBody request with any body + CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DownloadPluginAsset request DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -268,6 +274,30 @@ func (c *Client) CreatePlugin(ctx context.Context, body CreatePluginJSONRequestB return c.Client.Do(req) } +func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginsByTeamRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginByTeamAndPluginNameRequest(c.Server, teamName, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetPlugin(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetPluginRequest(c.Server, teamName, pluginName) if err != nil { @@ -316,8 +346,8 @@ func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, plug return c.Client.Do(req) } -func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionRequestWithBody(c.Server, teamName, pluginName, contentType, body) +func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginVersionRequest(c.Server, teamName, pluginName, versionName) if err != nil { return nil, err } @@ -328,8 +358,8 @@ func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionRequest(c.Server, teamName, pluginName, body) +func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginVersionRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -340,8 +370,8 @@ func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPluginVersionRequest(c.Server, teamName, pluginName, versionName) +func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginVersionRequest(c.Server, teamName, pluginName, versionName, body) if err != nil { return nil, err } @@ -352,8 +382,8 @@ func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, plugin return c.Client.Do(req) } -func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginVersionRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -364,8 +394,8 @@ func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginVersionRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionRequest(c.Server, teamName, pluginName, versionName, body) if err != nil { return nil, err } @@ -932,6 +962,81 @@ func NewCreatePluginRequestWithBody(server string, contentType string, body io.R return req, nil } +// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam +func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName +func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetPluginRequest generates requests for GetPlugin func NewGetPluginRequest(server string, teamName TeamName, pluginName PluginName) (*http.Request, error) { var err error @@ -1122,19 +1227,8 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginName P return req, nil } -// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body -func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionRequestWithBody(server, teamName, pluginName, "application/json", bodyReader) -} - -// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body -func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetPluginVersionRequest generates requests for GetPluginVersion +func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1151,12 +1245,19 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1166,18 +1267,27 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetPluginVersionRequest generates requests for GetPluginVersion -func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName) (*http.Request, error) { +// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body +func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) +} + +// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body +func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1216,27 +1326,29 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName Plu return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body -func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { +// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body +func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + return NewCreatePluginVersionRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) } -// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body -func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body +func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1275,7 +1387,7 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -2847,6 +2959,12 @@ type ClientWithResponsesInterface interface { CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + + // DeletePluginByTeamAndPluginNameWithResponse request + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + // GetPluginWithResponse request GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) @@ -2858,11 +2976,6 @@ type ClientWithResponsesInterface interface { // ListPluginVersionsWithResponse request ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) - // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - // GetPluginVersionWithResponse request GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) @@ -2871,6 +2984,11 @@ type ClientWithResponsesInterface interface { UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + // CreatePluginVersionWithBodyWithResponse request with any body + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + // DownloadPluginAssetWithResponse request DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) @@ -3041,6 +3159,58 @@ func (r CreatePluginResponse) StatusCode() int { return 0 } +type DeletePluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginByTeamAndPluginNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginByTeamAndPluginNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginByTeamAndPluginNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetPluginResponse struct { Body []byte HTTPResponse *http.Response @@ -3119,18 +3289,18 @@ func (r ListPluginVersionsResponse) StatusCode() int { return 0 } -type CreatePluginVersionResponse struct { +type GetPluginVersionResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *PluginVersion + JSON200 *PluginVersion JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON422 *UnprocessableEntity + JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreatePluginVersionResponse) Status() string { +func (r GetPluginVersionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3138,25 +3308,26 @@ func (r CreatePluginVersionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionResponse) StatusCode() int { +func (r GetPluginVersionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetPluginVersionResponse struct { +type UpdatePluginVersionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PluginVersion JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetPluginVersionResponse) Status() string { +func (r UpdatePluginVersionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3164,26 +3335,26 @@ func (r GetPluginVersionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetPluginVersionResponse) StatusCode() int { +func (r UpdatePluginVersionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdatePluginVersionResponse struct { +type CreatePluginVersionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PluginVersion + JSON201 *PluginVersion JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdatePluginVersionResponse) Status() string { +func (r CreatePluginVersionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3191,7 +3362,7 @@ func (r UpdatePluginVersionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdatePluginVersionResponse) StatusCode() int { +func (r CreatePluginVersionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -3251,6 +3422,11 @@ func (r UploadPluginAssetResponse) StatusCode() int { type DeletePluginVersionDocsResponse struct { Body []byte HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -3278,6 +3454,7 @@ type ListPluginVersionDocsResponse struct { } JSON401 *RequiresAuthentication JSON403 *Forbidden + JSON404 *NotFound JSON500 *InternalError } @@ -3300,6 +3477,14 @@ func (r ListPluginVersionDocsResponse) StatusCode() int { type CreatePluginVersionDocsResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -3321,8 +3506,13 @@ func (r CreatePluginVersionDocsResponse) StatusCode() int { type DeletePluginVersionTablesResponse struct { Body []byte HTTPResponse *http.Response -} - + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + // Status returns HTTPResponse.Status func (r DeletePluginVersionTablesResponse) Status() string { if r.HTTPResponse != nil { @@ -3371,6 +3561,14 @@ func (r ListPluginVersionTablesResponse) StatusCode() int { type CreatePluginVersionTablesResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *struct { + Names *[]PluginTableName `json:"names,omitempty"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -3925,6 +4123,24 @@ func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body return ParseCreatePluginResponse(rsp) } +// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse +func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { + rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginsByTeamResponse(rsp) +} + +// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse +func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { + rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginByTeamAndPluginNameResponse(rsp) +} + // GetPluginWithResponse request returning *GetPluginResponse func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { rsp, err := c.GetPlugin(ctx, teamName, pluginName, reqEditors...) @@ -3960,23 +4176,6 @@ func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context return ParseListPluginVersionsResponse(rsp) } -// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse -func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersion(ctx, teamName, pluginName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionResponse(rsp) -} - // GetPluginVersionWithResponse request returning *GetPluginVersionResponse func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { rsp, err := c.GetPluginVersion(ctx, teamName, pluginName, versionName, reqEditors...) @@ -4003,6 +4202,23 @@ func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Contex return ParseUpdatePluginVersionResponse(rsp) } +// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse +func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersion(ctx, teamName, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionResponse(rsp) +} + // DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginName, versionName, targetName, reqEditors...) @@ -4415,6 +4631,114 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error return response, nil } +// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call +func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call +func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginByTeamAndPluginNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -4559,26 +4883,26 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes return response, nil } -// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call -func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { +// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call +func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionResponse{ + response := &GetPluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -4594,12 +4918,12 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -4613,15 +4937,15 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR return response, nil } -// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call -func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { +// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call +func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionResponse{ + response := &UpdatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -4655,6 +4979,13 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4667,15 +4998,15 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons return response, nil } -// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call -func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { +// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call +func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginVersionResponse{ + response := &CreatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -4688,6 +5019,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4702,13 +5040,6 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4835,6 +5166,44 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } @@ -4876,6 +5245,13 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4901,6 +5277,53 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } @@ -4917,6 +5340,44 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } @@ -4990,6 +5451,53 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Names *[]PluginTableName `json:"names,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } diff --git a/models.gen.go b/models.gen.go index 4fac1e8..d7df579 100644 --- a/models.gen.go +++ b/models.gen.go @@ -181,6 +181,9 @@ type PluginDocsPage struct { // Name The unique name for the plugin documentation page. Name PluginDocsPageName `json:"name"` + // OrdinalPosition The position of the page in the documentation + OrdinalPosition *int `json:"ordinal_position,omitempty"` + // Title The title of the documentation page Title string `json:"title"` } @@ -314,7 +317,7 @@ type PluginVersion struct { // Protocols The CloudQuery protocols supported by this plugin version Protocols []int `json:"protocols"` - // Retracted If a plugin version is retracted, assets will not be available and it will not be counted as the latest version. + // Retracted If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version. Retracted bool `json:"retracted"` // SupportedTargets The targets supported by this plugin version, formatted as _ @@ -341,7 +344,7 @@ type PluginVersionUpdate struct { // Protocols The supported CloudQuery protocols by this plugin version Protocols *[]int `json:"protocols,omitempty"` - // Retracted If a plugin version is retracted, assets will not be available and it will not be counted as the latest version. + // Retracted If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version. Retracted *bool `json:"retracted,omitempty"` SupportedTargets *[]string `json:"supported_targets,omitempty"` } @@ -462,9 +465,6 @@ type CreatePluginVersionJSONBody struct { // Supports limited markdown syntax. Message string `json:"message"` - // Name The version in semantic version format. - Name VersionName `json:"name"` - // PackageType The package type of the plugin assets PackageType CreatePluginVersionJSONBodyPackageType `json:"package_type"` @@ -615,12 +615,12 @@ type CreatePluginJSONRequestBody = PluginCreate // UpdatePluginJSONRequestBody defines body for UpdatePlugin for application/json ContentType. type UpdatePluginJSONRequestBody = PluginUpdate -// CreatePluginVersionJSONRequestBody defines body for CreatePluginVersion for application/json ContentType. -type CreatePluginVersionJSONRequestBody CreatePluginVersionJSONBody - // UpdatePluginVersionJSONRequestBody defines body for UpdatePluginVersion for application/json ContentType. type UpdatePluginVersionJSONRequestBody = PluginVersionUpdate +// CreatePluginVersionJSONRequestBody defines body for CreatePluginVersion for application/json ContentType. +type CreatePluginVersionJSONRequestBody CreatePluginVersionJSONBody + // DeletePluginVersionDocsJSONRequestBody defines body for DeletePluginVersionDocs for application/json ContentType. type DeletePluginVersionDocsJSONRequestBody DeletePluginVersionDocsJSONBody diff --git a/spec.json b/spec.json index ed14de6..3a5088c 100644 --- a/spec.json +++ b/spec.json @@ -199,6 +199,41 @@ ] } }, + "/plugins/{team_name}": { + "delete": { + "description": "Delete plugins by team", + "operationId": "DeletePluginsByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins" + ] + } + }, "/plugins/{team_name}/{plugin_name}": { "get": { "description": "Get details about a given plugin.", @@ -281,6 +316,42 @@ "$ref": "#/components/responses/InternalError" } } + }, + "delete": { + "description": "Delete plugin by team and plugin name", + "operationId": "DeletePluginByTeamAndPluginName", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins" + ] } }, "/plugins/{team_name}/{plugin_name}/versions": { @@ -343,9 +414,54 @@ "tags": [ "plugins" ] + } + }, + "/plugins/{team_name}/{plugin_name}/versions/{version_name}": { + "get": { + "description": "Get details about a given plugin version. Use `latest` as version to get the latest version.", + "operationId": "GetPluginVersion", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_name" + }, + { + "$ref": "#/components/parameters/version_name" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginVersion" + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "security": [], + "tags": [ + "plugins" + ] }, - "post": { - "description": "Create a new plugin version", + "put": { + "description": "Create a new plugin version, or update a draft version", "operationId": "CreatePluginVersion", "parameters": [ { @@ -353,6 +469,9 @@ }, { "$ref": "#/components/parameters/plugin_name" + }, + { + "$ref": "#/components/parameters/version_name" } ], "requestBody": { @@ -361,7 +480,6 @@ "schema": { "type": "object", "required": [ - "name", "message", "protocols", "supported_targets", @@ -369,9 +487,6 @@ "checksums" ], "properties": { - "name": { - "$ref": "#/components/schemas/VersionName" - }, "message": { "type": "string", "description": "A message describing what's new or changed in this version.\nThis message will be displayed to users in the plugin's changelog.\nSupports limited markdown syntax.\n" @@ -416,8 +531,8 @@ } }, "responses": { - "201": { - "description": "Response", + "200": { + "description": "Success (the plugin version was updated)", "content": { "application/json": { "schema": { @@ -426,50 +541,15 @@ } } }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - } - }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}": { - "get": { - "description": "Get details about a given plugin version. Use `latest` as version to get the latest version.", - "operationId": "GetPluginVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "responses": { - "200": { + "201": { + "description": "Success (the plugin version was created)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PluginVersion" } } - }, - "description": "Response" + } }, "401": { "$ref": "#/components/responses/RequiresAuthentication" @@ -477,8 +557,8 @@ "403": { "$ref": "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "422": { + "$ref": "#/components/responses/UnprocessableEntity" }, "500": { "$ref": "#/components/responses/InternalError" @@ -597,6 +677,9 @@ "403": { "$ref": "#/components/responses/Forbidden" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -640,6 +723,41 @@ } } }, + "responses": { + "201": { + "description": "Successfully created or updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginDocsPageName" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, "tags": [ "plugins" ] @@ -678,6 +796,26 @@ } } }, + "responses": { + "204": { + "description": "The resource was deleted successfully." + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, "tags": [ "plugins" ] @@ -781,6 +919,41 @@ } } }, + "responses": { + "201": { + "description": "Successfully created or updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginTableName" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, "tags": [ "plugins" ] @@ -819,6 +992,26 @@ } } }, + "responses": { + "204": { + "description": "The resource was deleted successfully." + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, "tags": [ "plugins" ] @@ -2164,7 +2357,7 @@ }, "retracted": { "type": "boolean", - "description": "If a plugin version is retracted, assets will not be available and it will not be counted as the latest version." + "description": "If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version." }, "protocols": { "type": "array", @@ -2222,7 +2415,7 @@ }, "retracted": { "type": "boolean", - "description": "If a plugin version is retracted, assets will not be available and it will not be counted as the latest version." + "description": "If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version." }, "protocols": { "type": "array", @@ -2278,6 +2471,11 @@ "description": "The title of the documentation page", "example": "Getting Started" }, + "ordinal_position": { + "type": "integer", + "description": "The position of the page in the documentation", + "example": 1 + }, "content": { "type": "string", "description": "The content of the documentation page. Supports markdown.", From a6986314dd1cc4842b95167bf1b3ec29488fd5a5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 15 Sep 2023 18:00:55 +0300 Subject: [PATCH 004/343] chore(main): Release v1.0.2 (#9) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c204697..9986b17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.1...v1.0.2) (2023-09-15) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#8](https://github.com/cloudquery/cloudquery-api-go/issues/8)) ([5c3fd7e](https://github.com/cloudquery/cloudquery-api-go/commit/5c3fd7eefd2824ca7fbe28b640f0acd921381f0b)) + ## [1.0.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.0...v1.0.1) (2023-09-14) From 8859e7e769d32bad5a83589c637a3a1bab0f9169 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 22 Sep 2023 11:05:28 +0300 Subject: [PATCH 005/343] fix: Generate CloudQuery Go API Client from `spec.json` (#10) Co-authored-by: cq-bot --- client.gen.go | 710 +++++++++++++++++++++++++++++++++++--------------- models.gen.go | 170 +++++++++--- spec.json | 398 +++++++++++++++++++++++----- 3 files changed, 963 insertions(+), 315 deletions(-) diff --git a/client.gen.go b/client.gen.go index 1ca8bce..029e33e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -100,9 +100,6 @@ type ClientInterface interface { CreatePlugin(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeletePluginsByTeam request - DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeletePluginByTeamAndPluginName request DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -181,14 +178,16 @@ type ClientInterface interface { UpdateTeam(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListTeamApiKeys request - ListTeamApiKeys(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamAPIKeys request + ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateTeamAPIKeyWithBody request with any body + CreateTeamAPIKeyWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateTeamApiKey request - CreateTeamApiKey(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateTeamAPIKey(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteTeamApiKey request - DeleteTeamApiKey(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeamAPIKey request + DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeamInvitations request ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -207,6 +206,9 @@ type ClientInterface interface { // GetTeamMemberships request GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePluginsByTeam request + DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginsByTeam request ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -219,6 +221,11 @@ type ClientInterface interface { // GetCurrentUser request GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateCurrentUserWithBody request with any body + UpdateCurrentUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListCurrentUserInvitations request ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -274,18 +281,6 @@ func (c *Client) CreatePlugin(ctx context.Context, body CreatePluginJSONRequestB return c.Client.Do(req) } -func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginsByTeamRequest(c.Server, teamName) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeletePluginByTeamAndPluginNameRequest(c.Server, teamName, pluginName) if err != nil { @@ -634,8 +629,20 @@ func (c *Client) UpdateTeam(ctx context.Context, teamName TeamName, body UpdateT return c.Client.Do(req) } -func (c *Client) ListTeamApiKeys(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeamApiKeysRequest(c.Server, teamName, params) +func (c *Client) ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamAPIKeysRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTeamAPIKeyWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamAPIKeyRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -646,8 +653,8 @@ func (c *Client) ListTeamApiKeys(ctx context.Context, teamName TeamName, params return c.Client.Do(req) } -func (c *Client) CreateTeamApiKey(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTeamApiKeyRequest(c.Server, teamName) +func (c *Client) CreateTeamAPIKey(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamAPIKeyRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -658,8 +665,8 @@ func (c *Client) CreateTeamApiKey(ctx context.Context, teamName TeamName, reqEdi return c.Client.Do(req) } -func (c *Client) DeleteTeamApiKey(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamApiKeyRequest(c.Server, teamName, apiKeyName) +func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, aPIKeyName) if err != nil { return nil, err } @@ -742,6 +749,18 @@ func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } +func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginsByTeamRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginsByTeamRequest(c.Server, teamName, params) if err != nil { @@ -790,6 +809,30 @@ func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditor return c.Client.Do(req) } +func (c *Client) UpdateCurrentUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCurrentUserRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCurrentUserRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListCurrentUserInvitationsRequest(c.Server, params) if err != nil { @@ -962,40 +1005,6 @@ func NewCreatePluginRequestWithBody(server string, contentType string, body io.R return req, nil } -// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam -func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/plugins/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - // NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginName PluginName) (*http.Request, error) { var err error @@ -1216,6 +1225,22 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginName P } + if params.IncludeDrafts != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -2164,8 +2189,8 @@ func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType return req, nil } -// NewListTeamApiKeysRequest generates requests for ListTeamApiKeys -func NewListTeamApiKeysRequest(server string, teamName TeamName, params *ListTeamApiKeysParams) (*http.Request, error) { +// NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys +func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { var err error var pathParam0 string @@ -2236,8 +2261,19 @@ func NewListTeamApiKeysRequest(server string, teamName TeamName, params *ListTea return req, nil } -// NewCreateTeamApiKeyRequest generates requests for CreateTeamApiKey -func NewCreateTeamApiKeyRequest(server string, teamName TeamName) (*http.Request, error) { +// NewCreateTeamAPIKeyRequest calls the generic CreateTeamAPIKey builder with application/json body +func NewCreateTeamAPIKeyRequest(server string, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamAPIKeyRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateTeamAPIKeyRequestWithBody generates requests for CreateTeamAPIKey with any type of body +func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2262,16 +2298,18 @@ func NewCreateTeamApiKeyRequest(server string, teamName TeamName) (*http.Request return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewDeleteTeamApiKeyRequest generates requests for DeleteTeamApiKey -func NewDeleteTeamApiKeyRequest(server string, teamName TeamName, apiKeyName ApiKeyName) (*http.Request, error) { +// NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey +func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyName APIKeyName) (*http.Request, error) { var err error var pathParam0 string @@ -2283,7 +2321,7 @@ func NewDeleteTeamApiKeyRequest(server string, teamName TeamName, apiKeyName Api var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, apiKeyName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, aPIKeyName) if err != nil { return nil, err } @@ -2577,6 +2615,40 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return req, nil } +// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam +func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListPluginsByTeamRequest generates requests for ListPluginsByTeam func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { var err error @@ -2638,6 +2710,22 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } + if params.IncludeUnlisted != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_unlisted", runtime.ParamLocationQuery, *params.IncludeUnlisted); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -2775,6 +2863,46 @@ func NewGetCurrentUserRequest(server string) (*http.Request, error) { return req, nil } +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { var err error @@ -2959,9 +3087,6 @@ type ClientWithResponsesInterface interface { CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) - // DeletePluginsByTeamWithResponse request - DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) - // DeletePluginByTeamAndPluginNameWithResponse request DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) @@ -3040,14 +3165,16 @@ type ClientWithResponsesInterface interface { UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) - // ListTeamApiKeysWithResponse request - ListTeamApiKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*ListTeamApiKeysResponse, error) + // ListTeamAPIKeysWithResponse request + ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) - // CreateTeamApiKeyWithResponse request - CreateTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*CreateTeamApiKeyResponse, error) + // CreateTeamAPIKeyWithBodyWithResponse request with any body + CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) - // DeleteTeamApiKeyWithResponse request - DeleteTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamApiKeyResponse, error) + CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + // DeleteTeamAPIKeyWithResponse request + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) // ListTeamInvitationsWithResponse request ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) @@ -3066,6 +3193,9 @@ type ClientWithResponsesInterface interface { // GetTeamMembershipsWithResponse request GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + // ListPluginsByTeamWithResponse request ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) @@ -3078,6 +3208,11 @@ type ClientWithResponsesInterface interface { // GetCurrentUserWithResponse request GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + // UpdateCurrentUserWithBodyWithResponse request with any body + UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + + UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + // ListCurrentUserInvitationsWithResponse request ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) @@ -3159,32 +3294,6 @@ func (r CreatePluginResponse) StatusCode() int { return 0 } -type DeletePluginsByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginsByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginsByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type DeletePluginByTeamAndPluginNameResponse struct { Body []byte HTTPResponse *http.Response @@ -3647,6 +3756,8 @@ type CreateTeamResponse struct { Body []byte HTTPResponse *http.Response JSON201 *Team + JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3721,11 +3832,11 @@ func (r UpdateTeamResponse) StatusCode() int { return 0 } -type ListTeamApiKeysResponse struct { +type ListTeamAPIKeysResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []ApiKey `json:"items"` + Items []APIKey `json:"items"` Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication @@ -3733,7 +3844,7 @@ type ListTeamApiKeysResponse struct { } // Status returns HTTPResponse.Status -func (r ListTeamApiKeysResponse) Status() string { +func (r ListTeamAPIKeysResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3741,23 +3852,24 @@ func (r ListTeamApiKeysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTeamApiKeysResponse) StatusCode() int { +func (r ListTeamAPIKeysResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTeamApiKeyResponse struct { +type CreateTeamAPIKeyResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ApiKey + JSON201 *APIKey JSON401 *RequiresAuthentication + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateTeamApiKeyResponse) Status() string { +func (r CreateTeamAPIKeyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3765,22 +3877,24 @@ func (r CreateTeamApiKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamApiKeyResponse) StatusCode() int { +func (r CreateTeamAPIKeyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteTeamApiKeyResponse struct { +type DeleteTeamAPIKeyResponse struct { Body []byte HTTPResponse *http.Response JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteTeamApiKeyResponse) Status() string { +func (r DeleteTeamAPIKeyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -3788,7 +3902,7 @@ func (r DeleteTeamApiKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamApiKeyResponse) StatusCode() int { +func (r DeleteTeamAPIKeyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -3928,18 +4042,44 @@ func (r GetTeamMembershipsResponse) StatusCode() int { return 0 } -type ListPluginsByTeamResponse struct { +type DeletePluginsByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []Plugin `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + // Status returns HTTPResponse.Status func (r ListPluginsByTeamResponse) Status() string { if r.HTTPResponse != nil { @@ -4034,6 +4174,33 @@ func (r GetCurrentUserResponse) StatusCode() int { return 0 } +type UpdateCurrentUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *User + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON405 *MethodNotAllowed + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateCurrentUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCurrentUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListCurrentUserInvitationsResponse struct { Body []byte HTTPResponse *http.Response @@ -4123,15 +4290,6 @@ func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body return ParseCreatePluginResponse(rsp) } -// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse -func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { - rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginsByTeamResponse(rsp) -} - // DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginName, reqEditors...) @@ -4384,31 +4542,39 @@ func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamNa return ParseUpdateTeamResponse(rsp) } -// ListTeamApiKeysWithResponse request returning *ListTeamApiKeysResponse -func (c *ClientWithResponses) ListTeamApiKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*ListTeamApiKeysResponse, error) { - rsp, err := c.ListTeamApiKeys(ctx, teamName, params, reqEditors...) +// ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse +func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { + rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseListTeamApiKeysResponse(rsp) + return ParseListTeamAPIKeysResponse(rsp) } -// CreateTeamApiKeyWithResponse request returning *CreateTeamApiKeyResponse -func (c *ClientWithResponses) CreateTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*CreateTeamApiKeyResponse, error) { - rsp, err := c.CreateTeamApiKey(ctx, teamName, reqEditors...) +// CreateTeamAPIKeyWithBodyWithResponse request with arbitrary body returning *CreateTeamAPIKeyResponse +func (c *ClientWithResponses) CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKeyWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateTeamApiKeyResponse(rsp) + return ParseCreateTeamAPIKeyResponse(rsp) } -// DeleteTeamApiKeyWithResponse request returning *DeleteTeamApiKeyResponse -func (c *ClientWithResponses) DeleteTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamApiKeyResponse, error) { - rsp, err := c.DeleteTeamApiKey(ctx, teamName, apiKeyName, reqEditors...) +func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKey(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteTeamApiKeyResponse(rsp) + return ParseCreateTeamAPIKeyResponse(rsp) +} + +// DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse +func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { + rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamAPIKeyResponse(rsp) } // ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse @@ -4464,6 +4630,15 @@ func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context return ParseGetTeamMembershipsResponse(rsp) } +// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse +func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { + rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginsByTeamResponse(rsp) +} + // ListPluginsByTeamWithResponse request returning *ListPluginsByTeamResponse func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) { rsp, err := c.ListPluginsByTeam(ctx, teamName, params, reqEditors...) @@ -4500,6 +4675,23 @@ func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, re return ParseGetCurrentUserResponse(rsp) } +// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse +func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + // ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) @@ -4631,60 +4823,6 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error return response, nil } -// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call -func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePluginsByTeamResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -5640,6 +5778,20 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5781,15 +5933,15 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } -// ParseListTeamApiKeysResponse parses an HTTP response from a ListTeamApiKeysWithResponse call -func ParseListTeamApiKeysResponse(rsp *http.Response) (*ListTeamApiKeysResponse, error) { +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamApiKeysResponse{ + response := &ListTeamAPIKeysResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -5797,7 +5949,7 @@ func ParseListTeamApiKeysResponse(rsp *http.Response) (*ListTeamApiKeysResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []ApiKey `json:"items"` + Items []APIKey `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5824,22 +5976,22 @@ func ParseListTeamApiKeysResponse(rsp *http.Response) (*ListTeamApiKeysResponse, return response, nil } -// ParseCreateTeamApiKeyResponse parses an HTTP response from a CreateTeamApiKeyWithResponse call -func ParseCreateTeamApiKeyResponse(rsp *http.Response) (*CreateTeamApiKeyResponse, error) { +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamApiKeyResponse{ + response := &CreateTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ApiKey + var dest APIKey if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -5852,6 +6004,13 @@ func ParseCreateTeamApiKeyResponse(rsp *http.Response) (*CreateTeamApiKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5864,15 +6023,15 @@ func ParseCreateTeamApiKeyResponse(rsp *http.Response) (*CreateTeamApiKeyRespons return response, nil } -// ParseDeleteTeamApiKeyResponse parses an HTTP response from a DeleteTeamApiKeyWithResponse call -func ParseDeleteTeamApiKeyResponse(rsp *http.Response) (*DeleteTeamApiKeyResponse, error) { +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamApiKeyResponse{ + response := &DeleteTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -5885,6 +6044,20 @@ func ParseDeleteTeamApiKeyResponse(rsp *http.Response) (*DeleteTeamApiKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6152,6 +6325,60 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } +// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call +func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -6346,6 +6573,67 @@ func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, e return response, nil } +// ParseUpdateCurrentUserResponse parses an HTTP response from a UpdateCurrentUserWithResponse call +func ParseUpdateCurrentUserResponse(rsp *http.Response) (*UpdateCurrentUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateCurrentUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest User + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListCurrentUserInvitationsResponse parses an HTTP response from a ListCurrentUserInvitationsWithResponse call func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUserInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index d7df579..4ed725f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -11,6 +11,12 @@ const ( BearerAuthScopes = "bearerAuth.Scopes" ) +// Defines values for APIKeyScope. +const ( + APIKeyScopeReadAndWrite APIKeyScope = "read-and-write" + APIKeyScopeReadOnly APIKeyScope = "read-only" +) + // Defines values for PluginCategory. const ( CloudInfrastructure PluginCategory = "cloud-infrastructure" @@ -64,16 +70,31 @@ const ( CreatePluginVersionJSONBodyPackageTypeNative CreatePluginVersionJSONBodyPackageType = "native" ) -// ApiKey API Key to interact with CloudQuery Cloud under specific team -type ApiKey struct { +// Defines values for CreateTeamAPIKeyJSONBodyScope. +const ( + CreateTeamAPIKeyJSONBodyScopeReadOnly CreateTeamAPIKeyJSONBodyScope = "read-only" + CreateTeamAPIKeyJSONBodyScopeReadWrite CreateTeamAPIKeyJSONBodyScope = "read-write" +) + +// APIKey API Key to interact with CloudQuery Cloud under specific team +type APIKey struct { CreatedAt *time.Time `json:"created_at,omitempty"` CreatedBy *Email `json:"created_by,omitempty"` + // ExpiresAt Timestamp at which API key will stop working + ExpiresAt time.Time `json:"expires_at"` + // Key API key. Will be shown only in the response when creating the key. Key *string `json:"key,omitempty"` - Name *string `json:"name,omitempty"` + Name string `json:"name"` + + // Scope Scope of permissions for the API key. `read-only` API keys are used for downloading a plugin while `read-write` API keys are used for uploading a plugin. + Scope APIKeyScope `json:"scope"` } +// APIKeyScope Scope of permissions for the API key. `read-only` API keys are used for downloading a plugin while `read-write` API keys are used for uploading a plugin. +type APIKeyScope string + // BasicError Basic Error type BasicError struct { Message string `json:"message"` @@ -126,14 +147,19 @@ type Plugin struct { // DisplayName The plugin's display name DisplayName string `json:"display_name"` Homepage *string `json:"homepage,omitempty"` - Logo string `json:"logo"` + + // Listed True if the plugin is publicly listed, false otherwise + Listed *bool `json:"listed,omitempty"` + Logo string `json:"logo"` // Name The unique name for the plugin. - Name PluginName `json:"name"` - Official bool `json:"official"` - Repository *string `json:"repository,omitempty"` - ShortDescription string `json:"short_description"` - Source bool `json:"source"` + Name PluginName `json:"name"` + + // Official True if the plugin is maintained by CloudQuery, false otherwise + Official bool `json:"official"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + Source bool `json:"source"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` @@ -188,6 +214,21 @@ type PluginDocsPage struct { Title string `json:"title"` } +// PluginDocsPageCreate CloudQuery Plugin Documentation Page +type PluginDocsPageCreate struct { + // Content The content of the documentation page. Supports markdown. + Content string `json:"content"` + + // Name The unique name for the plugin documentation page. + Name PluginDocsPageName `json:"name"` + + // OrdinalPosition The position of the page in the documentation + OrdinalPosition *int `json:"ordinal_position,omitempty"` + + // Title The title of the documentation page + Title string `json:"title"` +} + // PluginDocsPageName The unique name for the plugin documentation page. type PluginDocsPageName = string @@ -197,53 +238,50 @@ type PluginName = string // PluginTable CloudQuery Plugin Table type PluginTable struct { // Description Description of the table - Description *string `json:"description,omitempty"` + Description string `json:"description"` // IsIncremental Whether the table is incremental - IsIncremental *bool `json:"is_incremental,omitempty"` + IsIncremental bool `json:"is_incremental"` // Name Name of the table - Name *PluginTableName `json:"name,omitempty"` + Name PluginTableName `json:"name"` // Parent Name of the parent table, if any Parent *string `json:"parent,omitempty"` // Relations Names of the tables that depend on this table - Relations *[]string `json:"relations,omitempty"` + Relations []string `json:"relations"` // Title Title of the table - Title *string `json:"title,omitempty"` + Title string `json:"title"` } // PluginTableColumn CloudQuery Plugin Column type PluginTableColumn struct { // Description Description of the column - Description *string `json:"description,omitempty"` + Description string `json:"description"` // IncrementalKey Whether the column is used as an incremental key - IncrementalKey *bool `json:"incremental_key,omitempty"` + IncrementalKey bool `json:"incremental_key"` // IsUnique Whether the column has a unique constraint - IsUnique *bool `json:"is_unique,omitempty"` + IsUnique bool `json:"is_unique"` // Name Name of the column - Name *string `json:"name,omitempty"` + Name string `json:"name"` // NotNull Whether the column is nullable - NotNull *bool `json:"not_null,omitempty"` + NotNull bool `json:"not_null"` // PrimaryKey Whether the column is part of the primary key - PrimaryKey *bool `json:"primary_key,omitempty"` + PrimaryKey bool `json:"primary_key"` // Type Arrow Type of the column - Type *string `json:"type,omitempty"` + Type string `json:"type"` } -// PluginTableDetails defines model for PluginTableDetails. -type PluginTableDetails struct { - // Columns List of columns - Columns *[]PluginTableColumn `json:"columns,omitempty"` - +// PluginTableCreate CloudQuery Plugin Table +type PluginTableCreate struct { // Description Description of the table Description *string `json:"description,omitempty"` @@ -251,7 +289,7 @@ type PluginTableDetails struct { IsIncremental *bool `json:"is_incremental,omitempty"` // Name Name of the table - Name *string `json:"name,omitempty"` + Name PluginTableName `json:"name"` // Parent Name of the parent table, if any Parent *string `json:"parent,omitempty"` @@ -263,6 +301,30 @@ type PluginTableDetails struct { Title *string `json:"title,omitempty"` } +// PluginTableDetails defines model for PluginTableDetails. +type PluginTableDetails struct { + // Columns List of columns + Columns []PluginTableColumn `json:"columns"` + + // Description Description of the table + Description string `json:"description"` + + // IsIncremental Whether the table is incremental + IsIncremental bool `json:"is_incremental"` + + // Name Name of the table + Name string `json:"name"` + + // Parent Name of the parent table, if any + Parent *string `json:"parent,omitempty"` + + // Relations Names of the tables that depend on this table + Relations []string `json:"relations"` + + // Title Title of the table + Title string `json:"title"` +} + // PluginTableName Name of the table type PluginTableName = string @@ -317,6 +379,9 @@ type PluginVersion struct { // Protocols The CloudQuery protocols supported by this plugin version Protocols []int `json:"protocols"` + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` + // Retracted If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version. Retracted bool `json:"retracted"` @@ -351,7 +416,7 @@ type PluginVersionUpdate struct { // ReleaseURL defines model for ReleaseURL. type ReleaseURL struct { - Url *string `json:"url,omitempty"` + Url string `json:"url"` } // Team CloudQuery Team @@ -392,8 +457,14 @@ type ValidationError struct { // VersionName The version in semantic version format. type VersionName = string -// ApiKeyName defines model for apikey_name. -type ApiKeyName = string +// APIKeyName defines model for apikey_name. +type APIKeyName = string + +// IncludeDrafts defines model for include_drafts. +type IncludeDrafts = bool + +// IncludeUnlisted defines model for include_unlisted. +type IncludeUnlisted = bool // Page defines model for page. type Page = int64 @@ -416,6 +487,9 @@ type Forbidden = BasicError // InternalError Basic Error type InternalError = BasicError +// MethodNotAllowed Basic Error +type MethodNotAllowed = BasicError + // NotFound Basic Error type NotFound = BasicError @@ -450,6 +524,9 @@ type ListPluginVersionsParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludeDrafts Whether to include draft plugins + IncludeDrafts *IncludeDrafts `form:"include_drafts,omitempty" json:"include_drafts,omitempty"` } // ListPluginVersionsParamsSortBy defines parameters for ListPluginVersions. @@ -494,7 +571,7 @@ type ListPluginVersionDocsParams struct { // CreatePluginVersionDocsJSONBody defines parameters for CreatePluginVersionDocs. type CreatePluginVersionDocsJSONBody struct { - Pages []PluginDocsPage `json:"pages"` + Pages []PluginDocsPageCreate `json:"pages"` } // DeletePluginVersionTablesJSONBody defines parameters for DeletePluginVersionTables. @@ -513,7 +590,7 @@ type ListPluginVersionTablesParams struct { // CreatePluginVersionTablesJSONBody defines parameters for CreatePluginVersionTables. type CreatePluginVersionTablesJSONBody struct { - Tables []PluginTable `json:"tables"` + Tables []PluginTableCreate `json:"tables"` } // ListTeamsParams defines parameters for ListTeams. @@ -540,8 +617,8 @@ type UpdateTeamJSONBody struct { DisplayName *string `json:"display_name,omitempty"` } -// ListTeamApiKeysParams defines parameters for ListTeamApiKeys. -type ListTeamApiKeysParams struct { +// ListTeamAPIKeysParams defines parameters for ListTeamAPIKeys. +type ListTeamAPIKeysParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` @@ -549,6 +626,16 @@ type ListTeamApiKeysParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } +// CreateTeamAPIKeyJSONBody defines parameters for CreateTeamAPIKey. +type CreateTeamAPIKeyJSONBody struct { + ExpiresAt time.Time `json:"expires_at"` + Name string `json:"name"` + Scope *CreateTeamAPIKeyJSONBodyScope `json:"scope,omitempty"` +} + +// CreateTeamAPIKeyJSONBodyScope defines parameters for CreateTeamAPIKey. +type CreateTeamAPIKeyJSONBodyScope string + // ListTeamInvitationsParams defines parameters for ListTeamInvitations. type ListTeamInvitationsParams struct { // Page Page number of the results to fetch @@ -580,6 +667,9 @@ type ListPluginsByTeamParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludeUnlisted Whether to include unlisted plugins + IncludeUnlisted *IncludeUnlisted `form:"include_unlisted,omitempty" json:"include_unlisted,omitempty"` } // ListUsersByTeamParams defines parameters for ListUsersByTeam. @@ -591,6 +681,12 @@ type ListUsersByTeamParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } +// UpdateCurrentUserJSONBody defines parameters for UpdateCurrentUser. +type UpdateCurrentUserJSONBody struct { + // Name The user's name + Name *string `json:"name,omitempty"` +} + // ListCurrentUserInvitationsParams defines parameters for ListCurrentUserInvitations. type ListCurrentUserInvitationsParams struct { // Page Page number of the results to fetch @@ -639,5 +735,11 @@ type CreateTeamJSONRequestBody CreateTeamJSONBody // UpdateTeamJSONRequestBody defines body for UpdateTeam for application/json ContentType. type UpdateTeamJSONRequestBody UpdateTeamJSONBody +// CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. +type CreateTeamAPIKeyJSONRequestBody CreateTeamAPIKeyJSONBody + // EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. type EmailTeamInvitationJSONRequestBody EmailTeamInvitationJSONBody + +// UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. +type UpdateCurrentUserJSONRequestBody UpdateCurrentUserJSONBody diff --git a/spec.json b/spec.json index 3a5088c..9a1f1e1 100644 --- a/spec.json +++ b/spec.json @@ -199,41 +199,6 @@ ] } }, - "/plugins/{team_name}": { - "delete": { - "description": "Delete plugins by team", - "operationId": "DeletePluginsByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "204": { - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams", - "plugins" - ] - } - }, "/plugins/{team_name}/{plugin_name}": { "get": { "description": "Get details about a given plugin.", @@ -373,6 +338,9 @@ }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include_drafts" } ], "responses": { @@ -715,7 +683,7 @@ "pages": { "type": "array", "items": { - "$ref": "#/components/schemas/PluginDocsPage" + "$ref": "#/components/schemas/PluginDocsPageCreate" } } } @@ -911,7 +879,7 @@ "tables": { "type": "array", "items": { - "$ref": "#/components/schemas/PluginTable" + "$ref": "#/components/schemas/PluginTableCreate" } } } @@ -1257,6 +1225,12 @@ }, "description": "Created" }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, @@ -1367,7 +1341,7 @@ }, "/teams/{team_name}/plugins": { "get": { - "description": "List all plugins for the current team.", + "description": "List all plugins for the team.", "operationId": "ListPluginsByTeam", "parameters": [ { @@ -1378,6 +1352,9 @@ }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include_unlisted" } ], "responses": { @@ -1436,6 +1413,39 @@ "tags": [ "plugins" ] + }, + "delete": { + "description": "Delete plugins by team", + "operationId": "DeletePluginsByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins" + ] } }, "/teams/{team_name}/memberships": { @@ -1797,6 +1807,57 @@ "tags": [ "users" ] + }, + "patch": { + "description": "Update attributes for the current authenticated user from the OAuth token", + "operationId": "UpdateCurrentUser", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The user's name" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "405": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "users" + ] } }, "/user/invitations": { @@ -1917,8 +1978,8 @@ }, "/teams/{team_name}/apikeys": { "get": { - "description": "List all API Keys for the curren team", - "operationId": "ListTeamApiKeys", + "description": "List all team API Keys", + "operationId": "ListTeamAPIKeys", "tags": [ "teams" ], @@ -1946,7 +2007,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/APIKey" }, "type": "array" }, @@ -1967,8 +2028,8 @@ } }, "post": { - "description": "Create new API Key for the current team. This is useful in CI", - "operationId": "CreateTeamApiKey", + "description": "Create new team API Key. This is useful in CI", + "operationId": "CreateTeamAPIKey", "tags": [ "teams" ], @@ -1977,13 +2038,43 @@ "$ref": "#/components/parameters/team_name" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "expires_at", + "role", + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "expires_at": { + "type": "string", + "format": "date-time" + }, + "scope": { + "type": "string", + "enum": [ + "read-only", + "read-write" + ] + } + } + } + } + } + }, "responses": { "201": { "description": "Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/APIKey" } } } @@ -1991,6 +2082,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -2000,7 +2094,7 @@ "/teams/{team_name}/apikeys/{apikey_name}": { "delete": { "description": "Delete API Key. This will remove any future access by this API Key.", - "operationId": "DeleteTeamApiKey", + "operationId": "DeleteTeamAPIKey", "tags": [ "teams" ], @@ -2019,6 +2113,12 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -2133,6 +2233,7 @@ "example": "AWS Source Plugin" }, "official": { + "description": "True if the plugin is maintained by CloudQuery, false otherwise", "type": "boolean" }, "repository": { @@ -2151,6 +2252,10 @@ }, "destination": { "type": "boolean" + }, + "listed": { + "description": "True if the plugin is publicly listed, false otherwise", + "type": "boolean" } }, "required": [ @@ -2237,32 +2342,28 @@ } }, "ValidationError": { - "additionalProperties": false, - "required": [ - "message", - "status" - ], - "properties": { - "message": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "errors": { - "items": { - "type": "string" - }, - "type": "array" + "allOf": [ + { + "$ref": "#/components/schemas/BasicError" }, - "field_errors": { - "additionalProperties": { - "type": "string" + { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "field_errors": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } }, "type": "object" } - }, - "type": "object" + ] }, "PluginUpdate": { "type": "object", @@ -2320,7 +2421,7 @@ "VersionName": { "type": "string", "description": "The version in semantic version format.", - "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" + "pattern": "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" }, "PluginVersion": { "additionalProperties": false, @@ -2343,6 +2444,12 @@ "type": "string", "description": "The date and time the plugin version was created." }, + "published_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "The date and time the plugin version was set to non-draft (published)." + }, "name": { "$ref": "#/components/schemas/VersionName" }, @@ -2485,6 +2592,37 @@ "title": "CloudQuery Plugin Documentation Page", "type": "object" }, + "PluginDocsPageCreate": { + "additionalProperties": false, + "description": "CloudQuery Plugin Documentation Page", + "required": [ + "name", + "title", + "content" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/PluginDocsPageName" + }, + "title": { + "type": "string", + "description": "The title of the documentation page", + "example": "Getting Started" + }, + "ordinal_position": { + "type": "integer", + "description": "The position of the page in the documentation", + "example": 1 + }, + "content": { + "type": "string", + "description": "The content of the documentation page. Supports markdown.", + "example": "# Getting Started\n\nThis is the getting started page." + } + }, + "title": "CloudQuery Plugin Documentation Page", + "type": "object" + }, "PluginTableName": { "description": "Name of the table", "maxLength": 255, @@ -2495,6 +2633,56 @@ "PluginTable": { "additionalProperties": false, "description": "CloudQuery Plugin Table", + "required": [ + "description", + "is_incremental", + "name", + "relations", + "title" + ], + "properties": { + "description": { + "description": "Description of the table", + "type": "string", + "example": "AWS S3 Buckets" + }, + "is_incremental": { + "description": "Whether the table is incremental", + "type": "boolean" + }, + "name": { + "$ref": "#/components/schemas/PluginTableName" + }, + "parent": { + "description": "Name of the parent table, if any", + "type": "string", + "example": "nil" + }, + "relations": { + "description": "Names of the tables that depend on this table", + "items": { + "type": "string" + }, + "type": "array", + "example": [ + "aws_s3_bucket_cors_rules" + ] + }, + "title": { + "description": "Title of the table", + "type": "string", + "example": "AWS S3 Buckets" + } + }, + "title": "CloudQuery Plugin Table", + "type": "object" + }, + "PluginTableCreate": { + "additionalProperties": false, + "description": "CloudQuery Plugin Table", + "required": [ + "name" + ], "properties": { "description": { "description": "Description of the table", @@ -2535,6 +2723,15 @@ "PluginTableColumn": { "additionalProperties": false, "description": "CloudQuery Plugin Column", + "required": [ + "description", + "incremental_key", + "name", + "not_null", + "primary_key", + "type", + "is_unique" + ], "properties": { "description": { "description": "Description of the column", @@ -2570,6 +2767,14 @@ }, "PluginTableDetails": { "additionalProperties": false, + "required": [ + "columns", + "description", + "is_incremental", + "name", + "relations", + "title" + ], "properties": { "columns": { "description": "List of columns", @@ -2609,6 +2814,9 @@ "type": "object" }, "ReleaseURL": { + "required": [ + "url" + ], "properties": { "url": { "type": "string" @@ -2725,9 +2933,22 @@ } } }, - "ApiKey": { + "APIKeyScope": { + "description": "Scope of permissions for the API key. `read-only` API keys are used for downloading a plugin while `read-write` API keys are used for uploading a plugin.", + "type": "string", + "enum": [ + "read-only", + "read-and-write" + ] + }, + "APIKey": { "description": "API Key to interact with CloudQuery Cloud under specific team", "type": "object", + "required": [ + "name", + "scope", + "expires_at" + ], "properties": { "name": { "type": "string", @@ -2746,6 +2967,15 @@ "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" + }, + "expires_at": { + "type": "string", + "description": "Timestamp at which API key will stop working", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + }, + "scope": { + "$ref": "#/components/schemas/APIKeyScope" } } } @@ -2800,6 +3030,16 @@ } }, "description": "Resource not found" + }, + "MethodNotAllowed": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicError" + } + } + }, + "description": "Method not allowed" } }, "parameters": { @@ -2871,6 +3111,15 @@ "type": "string" } }, + "include_drafts": { + "description": "Whether to include draft plugins", + "in": "query", + "name": "include_drafts", + "required": false, + "schema": { + "type": "boolean" + } + }, "version_name": { "in": "path", "name": "version_name", @@ -2887,6 +3136,15 @@ "type": "string" } }, + "include_unlisted": { + "description": "Whether to include unlisted plugins", + "in": "query", + "name": "include_unlisted", + "required": false, + "schema": { + "type": "boolean" + } + }, "email": { "in": "path", "name": "email", @@ -2903,7 +3161,7 @@ "type": "string", "example": "cli-api-key" }, - "x-go-name": "ApiKeyName" + "x-go-name": "APIKeyName" } } } From 80f48c1d09f4b8d9f058995564e1f41badcb52a5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:07:07 +0300 Subject: [PATCH 006/343] fix: Generate CloudQuery Go API Client from `spec.json` (#12) Co-authored-by: cq-bot --- client.gen.go | 542 ++++++++++++++++++++++++++++++-------------------- models.gen.go | 25 ++- spec.json | 111 ++++++++--- 3 files changed, 432 insertions(+), 246 deletions(-) diff --git a/client.gen.go b/client.gen.go index 029e33e..e75aaa4 100644 --- a/client.gen.go +++ b/client.gen.go @@ -101,66 +101,66 @@ type ClientInterface interface { CreatePlugin(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePluginByTeamAndPluginName request - DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPlugin request - GetPlugin(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + GetPlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdatePluginWithBody request with any body - UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdatePlugin(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListPluginVersions request - ListPluginVersions(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + ListPluginVersions(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPluginVersion request - GetPluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + GetPluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdatePluginVersionWithBody request with any body - UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePluginVersionWithBody request with any body - CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DownloadPluginAsset request - DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) + DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) // UploadPluginAsset request - UploadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) + UploadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePluginVersionDocsWithBody request with any body - DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListPluginVersionDocs request - ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePluginVersionDocsWithBody request with any body - CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePluginVersionTablesWithBody request with any body - DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListPluginVersionTables request - ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePluginVersionTablesWithBody request with any body - CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPluginVersionTable request - GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeams request ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -281,8 +281,8 @@ func (c *Client) CreatePlugin(ctx context.Context, body CreatePluginJSONRequestB return c.Client.Do(req) } -func (c *Client) DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginByTeamAndPluginNameRequest(c.Server, teamName, pluginName) +func (c *Client) DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginByTeamAndPluginNameRequest(c.Server, teamName, pluginKind, pluginName) if err != nil { return nil, err } @@ -293,8 +293,8 @@ func (c *Client) DeletePluginByTeamAndPluginName(ctx context.Context, teamName T return c.Client.Do(req) } -func (c *Client) GetPlugin(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPluginRequest(c.Server, teamName, pluginName) +func (c *Client) GetPlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginRequest(c.Server, teamName, pluginKind, pluginName) if err != nil { return nil, err } @@ -305,8 +305,8 @@ func (c *Client) GetPlugin(ctx context.Context, teamName TeamName, pluginName Pl return c.Client.Do(req) } -func (c *Client) UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginRequestWithBody(c.Server, teamName, pluginName, contentType, body) +func (c *Client) UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginRequestWithBody(c.Server, teamName, pluginKind, pluginName, contentType, body) if err != nil { return nil, err } @@ -317,8 +317,8 @@ func (c *Client) UpdatePluginWithBody(ctx context.Context, teamName TeamName, pl return c.Client.Do(req) } -func (c *Client) UpdatePlugin(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginRequest(c.Server, teamName, pluginName, body) +func (c *Client) UpdatePlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginRequest(c.Server, teamName, pluginKind, pluginName, body) if err != nil { return nil, err } @@ -329,8 +329,8 @@ func (c *Client) UpdatePlugin(ctx context.Context, teamName TeamName, pluginName return c.Client.Do(req) } -func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginVersionsRequest(c.Server, teamName, pluginName, params) +func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginVersionsRequest(c.Server, teamName, pluginKind, pluginName, params) if err != nil { return nil, err } @@ -341,8 +341,8 @@ func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, plug return c.Client.Do(req) } -func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPluginVersionRequest(c.Server, teamName, pluginName, versionName) +func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginVersionRequest(c.Server, teamName, pluginKind, pluginName, versionName) if err != nil { return nil, err } @@ -353,8 +353,8 @@ func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, plugin return c.Client.Do(req) } -func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginVersionRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginVersionRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -365,8 +365,8 @@ func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginVersionRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginVersionRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } @@ -377,8 +377,8 @@ func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -389,8 +389,8 @@ func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } @@ -401,8 +401,8 @@ func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadPluginAssetRequest(c.Server, teamName, pluginName, versionName, targetName) +func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadPluginAssetRequest(c.Server, teamName, pluginKind, pluginName, versionName, targetName) if err != nil { return nil, err } @@ -413,8 +413,8 @@ func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) UploadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUploadPluginAssetRequest(c.Server, teamName, pluginName, versionName, targetName) +func (c *Client) UploadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadPluginAssetRequest(c.Server, teamName, pluginKind, pluginName, versionName, targetName) if err != nil { return nil, err } @@ -425,8 +425,8 @@ func (c *Client) UploadPluginAsset(ctx context.Context, teamName TeamName, plugi return c.Client.Do(req) } -func (c *Client) DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionDocsRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionDocsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -437,8 +437,8 @@ func (c *Client) DeletePluginVersionDocsWithBody(ctx context.Context, teamName T return c.Client.Do(req) } -func (c *Client) DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionDocsRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } @@ -449,8 +449,8 @@ func (c *Client) DeletePluginVersionDocs(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginVersionDocsRequest(c.Server, teamName, pluginName, versionName, params) +func (c *Client) ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, params) if err != nil { return nil, err } @@ -461,8 +461,8 @@ func (c *Client) ListPluginVersionDocs(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } -func (c *Client) CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionDocsRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionDocsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -473,8 +473,8 @@ func (c *Client) CreatePluginVersionDocsWithBody(ctx context.Context, teamName T return c.Client.Do(req) } -func (c *Client) CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionDocsRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } @@ -485,8 +485,8 @@ func (c *Client) CreatePluginVersionDocs(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionTablesRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionTablesRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -497,8 +497,8 @@ func (c *Client) DeletePluginVersionTablesWithBody(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionTablesRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionTablesRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } @@ -509,8 +509,8 @@ func (c *Client) DeletePluginVersionTables(ctx context.Context, teamName TeamNam return c.Client.Do(req) } -func (c *Client) ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginVersionTablesRequest(c.Server, teamName, pluginName, versionName, params) +func (c *Client) ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginVersionTablesRequest(c.Server, teamName, pluginKind, pluginName, versionName, params) if err != nil { return nil, err } @@ -521,8 +521,8 @@ func (c *Client) ListPluginVersionTables(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionTablesRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionTablesRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -533,8 +533,8 @@ func (c *Client) CreatePluginVersionTablesWithBody(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionTablesRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionTablesRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } @@ -545,8 +545,8 @@ func (c *Client) CreatePluginVersionTables(ctx context.Context, teamName TeamNam return c.Client.Do(req) } -func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPluginVersionTableRequest(c.Server, teamName, pluginName, versionName, tableName) +func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginVersionTableRequest(c.Server, teamName, pluginKind, pluginName, versionName, tableName) if err != nil { return nil, err } @@ -1006,7 +1006,7 @@ func NewCreatePluginRequestWithBody(server string, contentType string, body io.R } // NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName -func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginName PluginName) (*http.Request, error) { +func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -1018,7 +1018,14 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -1028,7 +1035,7 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1047,7 +1054,7 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, } // NewGetPluginRequest generates requests for GetPlugin -func NewGetPluginRequest(server string, teamName TeamName, pluginName PluginName) (*http.Request, error) { +func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -1059,7 +1066,14 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginName PluginName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -1069,7 +1083,7 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginName PluginName return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1088,18 +1102,18 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginName PluginName } // NewUpdatePluginRequest calls the generic UpdatePlugin builder with application/json body -func NewUpdatePluginRequest(server string, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { +func NewUpdatePluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdatePluginRequestWithBody(server, teamName, pluginName, "application/json", bodyReader) + return NewUpdatePluginRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) } // NewUpdatePluginRequestWithBody generates requests for UpdatePlugin with any type of body -func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { +func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1111,7 +1125,14 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -1121,7 +1142,7 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginName return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1142,7 +1163,7 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginName } // NewListPluginVersionsRequest generates requests for ListPluginVersions -func NewListPluginVersionsRequest(server string, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { +func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { var err error var pathParam0 string @@ -1154,7 +1175,14 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginName P var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -1164,7 +1192,7 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginName P return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1253,7 +1281,7 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginName P } // NewGetPluginVersionRequest generates requests for GetPluginVersion -func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName) (*http.Request, error) { +func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1265,14 +1293,21 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName Plu var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1282,7 +1317,7 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName Plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1301,18 +1336,18 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName Plu } // NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body -func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { +func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } // NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body -func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1324,14 +1359,21 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1341,7 +1383,7 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1362,18 +1404,18 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu } // NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body -func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { +func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + return NewCreatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } // NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body -func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1385,14 +1427,21 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1402,7 +1451,7 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1423,7 +1472,7 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu } // NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset -func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { +func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { var err error var pathParam0 string @@ -1435,21 +1484,28 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } var pathParam3 string - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) if err != nil { return nil, err } @@ -1459,7 +1515,7 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginName return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1478,7 +1534,7 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginName } // NewUploadPluginAssetRequest generates requests for UploadPluginAsset -func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { +func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { var err error var pathParam0 string @@ -1490,21 +1546,28 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginName Pl var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } var pathParam3 string - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) if err != nil { return nil, err } @@ -1514,7 +1577,7 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginName Pl return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1533,18 +1596,18 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginName Pl } // NewDeletePluginVersionDocsRequest calls the generic DeletePluginVersionDocs builder with application/json body -func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { +func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } // NewDeletePluginVersionDocsRequestWithBody generates requests for DeletePluginVersionDocs with any type of body -func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1556,14 +1619,21 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1573,7 +1643,7 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1594,7 +1664,7 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, } // NewListPluginVersionDocsRequest generates requests for ListPluginVersionDocs -func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { +func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { var err error var pathParam0 string @@ -1606,14 +1676,21 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginNam var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1623,7 +1700,7 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginNam return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1680,18 +1757,18 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginNam } // NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body -func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { +func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } // NewCreatePluginVersionDocsRequestWithBody generates requests for CreatePluginVersionDocs with any type of body -func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1703,14 +1780,21 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1720,7 +1804,7 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1741,18 +1825,18 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, } // NewDeletePluginVersionTablesRequest calls the generic DeletePluginVersionTables builder with application/json body -func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { +func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } // NewDeletePluginVersionTablesRequestWithBody generates requests for DeletePluginVersionTables with any type of body -func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1764,14 +1848,21 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1781,7 +1872,7 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1802,7 +1893,7 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam } // NewListPluginVersionTablesRequest generates requests for ListPluginVersionTables -func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { +func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { var err error var pathParam0 string @@ -1814,14 +1905,21 @@ func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginN var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1831,7 +1929,7 @@ func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginN return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1888,18 +1986,18 @@ func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginN } // NewCreatePluginVersionTablesRequest calls the generic CreatePluginVersionTables builder with application/json body -func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { +func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } // NewCreatePluginVersionTablesRequestWithBody generates requests for CreatePluginVersionTables with any type of body -func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1911,14 +2009,21 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1928,7 +2033,7 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1949,7 +2054,7 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam } // NewGetPluginVersionTableRequest generates requests for GetPluginVersionTable -func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { +func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { var err error var pathParam0 string @@ -1961,21 +2066,28 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginNam var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } var pathParam3 string - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) if err != nil { return nil, err } @@ -1985,7 +2097,7 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginNam return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3088,66 +3200,66 @@ type ClientWithResponsesInterface interface { CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) // DeletePluginByTeamAndPluginNameWithResponse request - DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) // GetPluginWithResponse request - GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) // UpdatePluginWithBodyWithResponse request with any body - UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) - UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) // ListPluginVersionsWithResponse request - ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) // GetPluginVersionWithResponse request - GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) // UpdatePluginVersionWithBodyWithResponse request with any body - UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) - UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) // UploadPluginAssetWithResponse request - UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) // DeletePluginVersionDocsWithBodyWithResponse request with any body - DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) - DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) // ListPluginVersionDocsWithResponse request - ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) // CreatePluginVersionDocsWithBodyWithResponse request with any body - CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) - CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) // DeletePluginVersionTablesWithBodyWithResponse request with any body - DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) - DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) // ListPluginVersionTablesWithResponse request - ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) // CreatePluginVersionTablesWithBodyWithResponse request with any body - CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) - CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) // GetPluginVersionTableWithResponse request - GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) // ListTeamsWithResponse request ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) @@ -4291,8 +4403,8 @@ func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body } // DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse -func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { - rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginName, reqEditors...) +func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { + rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } @@ -4300,8 +4412,8 @@ func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx co } // GetPluginWithResponse request returning *GetPluginResponse -func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { - rsp, err := c.GetPlugin(ctx, teamName, pluginName, reqEditors...) +func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { + rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } @@ -4309,16 +4421,16 @@ func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamNam } // UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse -func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginName, contentType, body, reqEditors...) +func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseUpdatePluginResponse(rsp) } -func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePlugin(ctx, teamName, pluginName, body, reqEditors...) +func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) if err != nil { return nil, err } @@ -4326,8 +4438,8 @@ func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, team } // ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse -func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { - rsp, err := c.ListPluginVersions(ctx, teamName, pluginName, params, reqEditors...) +func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { + rsp, err := c.ListPluginVersions(ctx, teamName, pluginKind, pluginName, params, reqEditors...) if err != nil { return nil, err } @@ -4335,8 +4447,8 @@ func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context } // GetPluginVersionWithResponse request returning *GetPluginVersionResponse -func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { - rsp, err := c.GetPluginVersion(ctx, teamName, pluginName, versionName, reqEditors...) +func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { + rsp, err := c.GetPluginVersion(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) if err != nil { return nil, err } @@ -4344,16 +4456,16 @@ func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, } // UpdatePluginVersionWithBodyWithResponse request with arbitrary body returning *UpdatePluginVersionResponse -func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseUpdatePluginVersionResponse(rsp) } -func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginName, versionName, body, reqEditors...) +func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -4361,16 +4473,16 @@ func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Contex } // CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse -func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseCreatePluginVersionResponse(rsp) } -func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersion(ctx, teamName, pluginName, versionName, body, reqEditors...) +func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -4378,8 +4490,8 @@ func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Contex } // DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse -func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { - rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginName, versionName, targetName, reqEditors...) +func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { + rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) if err != nil { return nil, err } @@ -4387,8 +4499,8 @@ func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Contex } // UploadPluginAssetWithResponse request returning *UploadPluginAssetResponse -func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { - rsp, err := c.UploadPluginAsset(ctx, teamName, pluginName, versionName, targetName, reqEditors...) +func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { + rsp, err := c.UploadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) if err != nil { return nil, err } @@ -4396,16 +4508,16 @@ func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, } // DeletePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionDocsResponse -func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseDeletePluginVersionDocsResponse(rsp) } -func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginName, versionName, body, reqEditors...) +func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -4413,8 +4525,8 @@ func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Co } // ListPluginVersionDocsWithResponse request returning *ListPluginVersionDocsResponse -func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { - rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginName, versionName, params, reqEditors...) +func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { + rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) if err != nil { return nil, err } @@ -4422,16 +4534,16 @@ func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Cont } // CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse -func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseCreatePluginVersionDocsResponse(rsp) } -func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginName, versionName, body, reqEditors...) +func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -4439,16 +4551,16 @@ func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Co } // DeletePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionTablesResponse -func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseDeletePluginVersionTablesResponse(rsp) } -func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginName, versionName, body, reqEditors...) +func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -4456,8 +4568,8 @@ func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context. } // ListPluginVersionTablesWithResponse request returning *ListPluginVersionTablesResponse -func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { - rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginName, versionName, params, reqEditors...) +func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { + rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) if err != nil { return nil, err } @@ -4465,16 +4577,16 @@ func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Co } // CreatePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionTablesResponse -func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseCreatePluginVersionTablesResponse(rsp) } -func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginName, versionName, body, reqEditors...) +func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -4482,8 +4594,8 @@ func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context. } // GetPluginVersionTableWithResponse request returning *GetPluginVersionTableResponse -func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { - rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginName, versionName, tableName, reqEditors...) +func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { + rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginKind, pluginName, versionName, tableName, reqEditors...) if err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 4ed725f..d1e5aac 100644 --- a/models.gen.go +++ b/models.gen.go @@ -26,6 +26,12 @@ const ( SalesMarketing PluginCategory = "sales-marketing" ) +// Defines values for PluginKind. +const ( + Destination PluginKind = "destination" + Source PluginKind = "source" +) + // Defines values for PluginTier. const ( Free PluginTier = "free" @@ -140,14 +146,16 @@ type Membership struct { // Plugin CloudQuery Plugin type Plugin struct { // Category Supported categories for plugins - Category PluginCategory `json:"category"` - CreatedAt time.Time `json:"created_at"` - Destination bool `json:"destination"` + Category PluginCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` // DisplayName The plugin's display name DisplayName string `json:"display_name"` Homepage *string `json:"homepage,omitempty"` + // Kind The kind of plugin, ie. source or destination. + Kind PluginKind `json:"kind"` + // Listed True if the plugin is publicly listed, false otherwise Listed *bool `json:"listed,omitempty"` Logo string `json:"logo"` @@ -159,7 +167,6 @@ type Plugin struct { Official bool `json:"official"` Repository *string `json:"repository,omitempty"` ShortDescription string `json:"short_description"` - Source bool `json:"source"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` @@ -175,12 +182,15 @@ type PluginCategory string type PluginCreate struct { // Category Supported categories for plugins Category PluginCategory `json:"category"` - Destination bool `json:"destination"` + Destination *bool `json:"destination,omitempty"` // DisplayName The plugin's display name, as shown in the CloudQuery Hub. DisplayName string `json:"display_name"` Homepage *string `json:"homepage,omitempty"` + // Kind The kind of plugin, ie. source or destination. + Kind PluginKind `json:"kind"` + // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... Logo string `json:"logo"` @@ -190,7 +200,7 @@ type PluginCreate struct { // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription string `json:"short_description"` - Source bool `json:"source"` + Source *bool `json:"source,omitempty"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` @@ -232,6 +242,9 @@ type PluginDocsPageCreate struct { // PluginDocsPageName The unique name for the plugin documentation page. type PluginDocsPageName = string +// PluginKind The kind of plugin, ie. source or destination. +type PluginKind string + // PluginName The unique name for the plugin. type PluginName = string diff --git a/spec.json b/spec.json index 9a1f1e1..45e0c39 100644 --- a/spec.json +++ b/spec.json @@ -119,7 +119,8 @@ "type": "array", "example": [ { - "name": "aws-source", + "name": "aws", + "kind": "source", "team_name": "cloudquery", "display_name": "AWS Source Plugin", "category": "cloud-infrastructure", @@ -129,9 +130,7 @@ "official": true, "short_description": "Sync data from AWS to any destination", "repository": "https://github.com/cloudquery/cloudquery", - "tier": "free", - "source": true, - "destination": false + "tier": "free" } ] }, @@ -199,7 +198,7 @@ ] } }, - "/plugins/{team_name}/{plugin_name}": { + "/plugins/{team_name}/{plugin_kind}/{plugin_name}": { "get": { "description": "Get details about a given plugin.", "operationId": "GetPlugin", @@ -207,6 +206,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" } @@ -247,6 +249,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" } @@ -289,6 +294,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" } @@ -319,7 +327,7 @@ ] } }, - "/plugins/{team_name}/{plugin_name}/versions": { + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions": { "get": { "description": "List all versions for a given plugin", "operationId": "ListPluginVersions", @@ -327,6 +335,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -384,7 +395,7 @@ ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}": { + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}": { "get": { "description": "Get details about a given plugin version. Use `latest` as version to get the latest version.", "operationId": "GetPluginVersion", @@ -392,6 +403,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -435,6 +449,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -544,6 +561,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -593,7 +613,7 @@ ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/docs": { + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/docs": { "get": { "description": "List all documentation pages for a given plugin version.", "operationId": "ListPluginVersionDocs", @@ -601,6 +621,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -664,6 +687,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -737,6 +763,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -789,7 +818,7 @@ ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/tables": { + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables": { "get": { "description": "List tables for a given plugin version. This only applies to source plugins.", "operationId": "ListPluginVersionTables", @@ -797,6 +826,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -860,6 +892,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -933,6 +968,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -985,7 +1023,7 @@ ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/tables/{table_name}": { + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables/{table_name}": { "get": { "description": "Get schema for a given table and plugin version. This only applies to source plugins.", "operationId": "GetPluginVersionTable", @@ -993,6 +1031,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -1038,7 +1079,7 @@ ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/assets/{target_name}": { + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { "get": { "description": "Download an asset for a given plugin version and target", "operationId": "DownloadPluginAsset", @@ -1046,6 +1087,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -1092,6 +1136,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/plugin_kind" + }, { "$ref": "#/components/parameters/plugin_name" }, @@ -1376,6 +1423,7 @@ "example": [ { "name": "aws-source", + "kind": "source", "team_name": "cloudquery", "display_name": "AWS Source Plugin", "category": "cloud-infrastructure", @@ -1385,9 +1433,7 @@ "official": true, "short_description": "Sync data from AWS to any destination", "repository": "https://github.com/cloudquery/cloudquery", - "tier": "free", - "source": true, - "destination": false + "tier": "free" } ] }, @@ -2182,6 +2228,15 @@ "type": "string", "example": "aws-source" }, + "PluginKind": { + "description": "The kind of plugin, ie. source or destination.", + "type": "string", + "example": "source", + "enum": [ + "source", + "destination" + ] + }, "PluginCategory": { "description": "Supported categories for plugins", "type": "string", @@ -2211,6 +2266,9 @@ "name": { "$ref": "#/components/schemas/PluginName" }, + "kind": { + "$ref": "#/components/schemas/PluginKind" + }, "category": { "$ref": "#/components/schemas/PluginCategory" }, @@ -2247,12 +2305,6 @@ "tier": { "$ref": "#/components/schemas/PluginTier" }, - "source": { - "type": "boolean" - }, - "destination": { - "type": "boolean" - }, "listed": { "description": "True if the plugin is publicly listed, false otherwise", "type": "boolean" @@ -2261,15 +2313,14 @@ "required": [ "team_name", "name", + "kind", "category", "created_at", "logo", "display_name", "official", "short_description", - "tier", - "source", - "destination" + "tier" ], "title": "CloudQuery Plugin", "type": "object" @@ -2288,19 +2339,21 @@ "type": "object", "required": [ "team_name", + "kind", "name", "category", "tier", "display_name", "short_description", - "source", - "destination", "logo" ], "properties": { "team_name": { "$ref": "#/components/schemas/TeamName" }, + "kind": { + "$ref": "#/components/schemas/PluginKind" + }, "name": { "$ref": "#/components/schemas/PluginName" }, @@ -3091,6 +3144,14 @@ "$ref": "#/components/schemas/TeamName" } }, + "plugin_kind": { + "in": "path", + "name": "plugin_kind", + "required": true, + "schema": { + "$ref": "#/components/schemas/PluginKind" + } + }, "plugin_name": { "in": "path", "name": "plugin_name", From e72c1b22b0587cfd74e411e61f875e9a735c4b28 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:08:04 +0300 Subject: [PATCH 007/343] chore(main): Release v1.0.3 (#11) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9986b17..e2eed14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.0.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.2...v1.0.3) (2023-09-22) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#10](https://github.com/cloudquery/cloudquery-api-go/issues/10)) ([8859e7e](https://github.com/cloudquery/cloudquery-api-go/commit/8859e7e769d32bad5a83589c637a3a1bab0f9169)) +* Generate CloudQuery Go API Client from `spec.json` ([#12](https://github.com/cloudquery/cloudquery-api-go/issues/12)) ([80f48c1](https://github.com/cloudquery/cloudquery-api-go/commit/80f48c1d09f4b8d9f058995564e1f41badcb52a5)) + ## [1.0.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.1...v1.0.2) (2023-09-15) From ec60c6f2c976144c254017eb7a5a541d80facb23 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Fri, 22 Sep 2023 16:57:05 +0200 Subject: [PATCH 008/343] feat: Support Go 1.19 (#14) --- go.mod | 5 +++-- go.sum | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 567ffe1..c067804 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/cloudquery/cloudquery-api-go -go 1.21.0 +go 1.19 + +require github.com/deepmap/oapi-codegen v1.15.0 require ( github.com/BurntSushi/toml v1.3.2 // indirect @@ -13,7 +15,6 @@ require ( github.com/aymerick/douceur v0.2.0 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/deepmap/oapi-codegen v1.15.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/flosch/pongo2/v4 v4.0.2 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect diff --git a/go.sum b/go.sum index da96c7d..d3d91f1 100644 --- a/go.sum +++ b/go.sum @@ -4,12 +4,14 @@ github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4s github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= +github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= +github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= @@ -24,9 +26,11 @@ github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deepmap/oapi-codegen v1.15.0 h1:SQqViaeb4k2vMul8gx12oDOIadEtoRqTdLkxjzqtQ90= github.com/deepmap/oapi-codegen v1.15.0/go.mod h1:a6KoHV7lMRwsPoEg2C6NDHiXYV3EQfiFocOlJ8dgJQE= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= @@ -37,12 +41,14 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -50,12 +56,17 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= +github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -81,6 +92,7 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= @@ -101,19 +113,24 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= @@ -129,10 +146,12 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= +github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= @@ -147,8 +166,14 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= @@ -194,17 +219,21 @@ golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From 73a38360c1bcf1236754b42f3b4db546341b64d5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:57:51 +0300 Subject: [PATCH 009/343] fix: Generate CloudQuery Go API Client from `spec.json` (#13) Co-authored-by: cq-bot Co-authored-by: Erez Rokah --- models.gen.go | 4 +--- spec.json | 8 -------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/models.gen.go b/models.gen.go index d1e5aac..be9f26a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -347,8 +347,7 @@ type PluginTier string // PluginUpdate defines model for PluginUpdate. type PluginUpdate struct { // Category Supported categories for plugins - Category PluginCategory `json:"category"` - Destination bool `json:"destination"` + Category PluginCategory `json:"category"` // DisplayName The plugin's display name, as shown in the CloudQuery Hub. DisplayName string `json:"display_name"` @@ -363,7 +362,6 @@ type PluginUpdate struct { // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription string `json:"short_description"` - Source bool `json:"source"` // Tier Supported tiers for plugins Tier PluginTier `json:"tier"` diff --git a/spec.json b/spec.json index 45e0c39..09af10c 100644 --- a/spec.json +++ b/spec.json @@ -2425,8 +2425,6 @@ "tier", "display_name", "short_description", - "source", - "destination", "logo" ], "properties": { @@ -2454,12 +2452,6 @@ "type": "string", "example": "https://github.com/cloudquery/cloudquery" }, - "source": { - "type": "boolean" - }, - "destination": { - "type": "boolean" - }, "logo": { "type": "string", "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", From fc719e3080e26ae0e79fcec885eacee7e70e6c5c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:59:17 +0300 Subject: [PATCH 010/343] chore(main): Release v1.1.0 (#15) --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2eed14..0fa7386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.1.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.3...v1.1.0) (2023-09-22) + + +### Features + +* Support Go 1.19 ([#14](https://github.com/cloudquery/cloudquery-api-go/issues/14)) ([ec60c6f](https://github.com/cloudquery/cloudquery-api-go/commit/ec60c6f2c976144c254017eb7a5a541d80facb23)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#13](https://github.com/cloudquery/cloudquery-api-go/issues/13)) ([73a3836](https://github.com/cloudquery/cloudquery-api-go/commit/73a38360c1bcf1236754b42f3b4db546341b64d5)) + ## [1.0.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.2...v1.0.3) (2023-09-22) From d9f55574f596ee503216cb8b87ce11bc328a5e64 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Fri, 22 Sep 2023 17:54:05 +0200 Subject: [PATCH 011/343] feat: Revert "feat: Support Go 1.19 (#14)" (#16) This reverts commit ec60c6f2c976144c254017eb7a5a541d80facb23. --- go.mod | 5 ++--- go.sum | 29 ----------------------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index c067804..567ffe1 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/cloudquery/cloudquery-api-go -go 1.19 - -require github.com/deepmap/oapi-codegen v1.15.0 +go 1.21.0 require ( github.com/BurntSushi/toml v1.3.2 // indirect @@ -15,6 +13,7 @@ require ( github.com/aymerick/douceur v0.2.0 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/deepmap/oapi-codegen v1.15.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/flosch/pongo2/v4 v4.0.2 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect diff --git a/go.sum b/go.sum index d3d91f1..da96c7d 100644 --- a/go.sum +++ b/go.sum @@ -4,14 +4,12 @@ github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4s github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= -github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= @@ -26,11 +24,9 @@ github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deepmap/oapi-codegen v1.15.0 h1:SQqViaeb4k2vMul8gx12oDOIadEtoRqTdLkxjzqtQ90= github.com/deepmap/oapi-codegen v1.15.0/go.mod h1:a6KoHV7lMRwsPoEg2C6NDHiXYV3EQfiFocOlJ8dgJQE= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= @@ -41,14 +37,12 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -56,17 +50,12 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= -github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -92,7 +81,6 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= @@ -113,24 +101,19 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= -github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= @@ -146,12 +129,10 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= -github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= @@ -166,14 +147,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= -github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= @@ -219,21 +194,17 @@ golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From 9e996ba9b6476f4e2b1e6b8640fa3902bfd6c28e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 22 Sep 2023 18:54:40 +0300 Subject: [PATCH 012/343] chore(main): Release v1.2.0 (#17) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fa7386..6063932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.1.0...v1.2.0) (2023-09-22) + + +### Features + +* Revert "feat: Support Go 1.19 ([#14](https://github.com/cloudquery/cloudquery-api-go/issues/14))" ([#16](https://github.com/cloudquery/cloudquery-api-go/issues/16)) ([d9f5557](https://github.com/cloudquery/cloudquery-api-go/commit/d9f55574f596ee503216cb8b87ce11bc328a5e64)) + ## [1.1.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.3...v1.1.0) (2023-09-22) From 4e5e8fe98983d4919a8f7278dc3e2e8d2c6ae4ab Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:20:05 +0300 Subject: [PATCH 013/343] fix: Generate CloudQuery Go API Client from `spec.json` (#18) Co-authored-by: cq-bot --- client.gen.go | 320 ++++++++++++++++++++++++-------------------------- models.gen.go | 39 +++--- spec.json | 173 +++++++++++++++------------ 3 files changed, 279 insertions(+), 253 deletions(-) diff --git a/client.gen.go b/client.gen.go index e75aaa4..308704b 100644 --- a/client.gen.go +++ b/client.gen.go @@ -3385,8 +3385,8 @@ type CreatePluginResponse struct { Body []byte HTTPResponse *http.Response JSON201 *Plugin + JSON400 *BadRequest JSON403 *Forbidden - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3409,10 +3409,10 @@ func (r CreatePluginResponse) StatusCode() int { type DeletePluginByTeamAndPluginNameResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3461,8 +3461,8 @@ type UpdatePluginResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Plugin + JSON400 *BadRequest JSON403 *Forbidden - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3540,10 +3540,10 @@ type UpdatePluginVersionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PluginVersion + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3568,9 +3568,9 @@ type CreatePluginVersionResponse struct { HTTPResponse *http.Response JSON200 *PluginVersion JSON201 *PluginVersion + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3643,10 +3643,10 @@ func (r UploadPluginAssetResponse) StatusCode() int { type DeletePluginVersionDocsResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3701,10 +3701,10 @@ type CreatePluginVersionDocsResponse struct { JSON201 *struct { Names *[]PluginDocsPageName `json:"names,omitempty"` } + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3727,10 +3727,10 @@ func (r CreatePluginVersionDocsResponse) StatusCode() int { type DeletePluginVersionTablesResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3785,10 +3785,10 @@ type CreatePluginVersionTablesResponse struct { JSON201 *struct { Names *[]PluginTableName `json:"names,omitempty"` } + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3844,7 +3844,6 @@ type ListTeamsResponse struct { JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3868,9 +3867,9 @@ type CreateTeamResponse struct { Body []byte HTTPResponse *http.Response JSON201 *Team + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3894,10 +3893,10 @@ type GetTeamByNameResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Team + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3921,10 +3920,10 @@ type UpdateTeamResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Team + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3975,8 +3974,8 @@ type CreateTeamAPIKeyResponse struct { Body []byte HTTPResponse *http.Response JSON201 *APIKey + JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3999,9 +3998,9 @@ func (r CreateTeamAPIKeyResponse) StatusCode() int { type DeleteTeamAPIKeyResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4052,8 +4051,8 @@ type EmailTeamInvitationResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Invitation + JSON400 *BadRequest JSON403 *Forbidden - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4101,10 +4100,10 @@ func (r AcceptTeamInvitationResponse) StatusCode() int { type CancelTeamInvitationResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4131,10 +4130,10 @@ type GetTeamMembershipsResponse struct { Items []Membership `json:"items"` Metadata ListMetadata `json:"metadata"` } + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4157,10 +4156,10 @@ func (r GetTeamMembershipsResponse) StatusCode() int { type DeletePluginsByTeamResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4215,10 +4214,10 @@ type ListUsersByTeamResponse struct { Items []User `json:"items"` Metadata ListMetadata `json:"metadata"` } + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4290,10 +4289,10 @@ type UpdateCurrentUserResponse struct { Body []byte HTTPResponse *http.Response JSON200 *User + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON405 *MethodNotAllowed - JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4909,19 +4908,19 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -4949,6 +4948,13 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4970,13 +4976,6 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5057,19 +5056,19 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5208,6 +5207,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5229,13 +5235,6 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5276,6 +5275,13 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5290,13 +5296,6 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5417,6 +5416,13 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5438,13 +5444,6 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5537,6 +5536,13 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5558,13 +5564,6 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5591,6 +5590,13 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5612,13 +5618,6 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5711,6 +5710,13 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5732,13 +5738,6 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5850,13 +5849,6 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5890,6 +5882,13 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5904,13 +5903,6 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5944,6 +5936,13 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5965,13 +5964,6 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6005,6 +5997,13 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6026,13 +6025,6 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6109,19 +6101,19 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -6149,6 +6141,13 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6163,13 +6162,6 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6246,19 +6238,19 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -6333,6 +6325,13 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6354,13 +6353,6 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6397,6 +6389,13 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6418,13 +6417,6 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6451,6 +6443,13 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6472,13 +6471,6 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6565,6 +6557,13 @@ func ParseListUsersByTeamResponse(rsp *http.Response) (*ListUsersByTeamResponse, } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6586,13 +6585,6 @@ func ParseListUsersByTeamResponse(rsp *http.Response) (*ListUsersByTeamResponse, } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6706,6 +6698,13 @@ func ParseUpdateCurrentUserResponse(rsp *http.Response) (*UpdateCurrentUserRespo } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6727,13 +6726,6 @@ func ParseUpdateCurrentUserResponse(rsp *http.Response) (*UpdateCurrentUserRespo } response.JSON405 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index be9f26a..fecb171 100644 --- a/models.gen.go +++ b/models.gen.go @@ -5,6 +5,8 @@ package cloudquery_api import ( "time" + + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) const ( @@ -82,6 +84,12 @@ const ( CreateTeamAPIKeyJSONBodyScopeReadWrite CreateTeamAPIKeyJSONBodyScope = "read-write" ) +// Defines values for EmailTeamInvitationJSONBodyRole. +const ( + Admin EmailTeamInvitationJSONBodyRole = "admin" + Member EmailTeamInvitationJSONBodyRole = "member" +) + // APIKey API Key to interact with CloudQuery Cloud under specific team type APIKey struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -101,6 +109,14 @@ type APIKey struct { // APIKeyScope Scope of permissions for the API key. `read-only` API keys are used for downloading a plugin while `read-write` API keys are used for uploading a plugin. type APIKeyScope string +// BadRequestError defines model for BadRequestError. +type BadRequestError struct { + Errors *[]string `json:"errors,omitempty"` + FieldErrors *map[string]string `json:"field_errors,omitempty"` + Message string `json:"message"` + Status int `json:"status"` +} + // BasicError Basic Error type BasicError struct { Message string `json:"message"` @@ -108,7 +124,7 @@ type BasicError struct { } // Email defines model for Email. -type Email = string +type Email = openapi_types.Email // ImageURL defines model for ImageURL. type ImageURL struct { @@ -457,14 +473,6 @@ type User struct { // UserName The unique name for the user. type UserName = string -// ValidationError defines model for ValidationError. -type ValidationError struct { - Errors *[]string `json:"errors,omitempty"` - FieldErrors *map[string]string `json:"field_errors,omitempty"` - Message string `json:"message"` - Status int `json:"status"` -} - // VersionName The version in semantic version format. type VersionName = string @@ -492,6 +500,9 @@ type TargetName = string // VersionSortBy defines model for version_sort_by. type VersionSortBy string +// BadRequest defines model for BadRequest. +type BadRequest = BadRequestError + // Forbidden Basic Error type Forbidden = BasicError @@ -507,9 +518,6 @@ type NotFound = BasicError // RequiresAuthentication Basic Error type RequiresAuthentication = BasicError -// UnprocessableEntity defines model for UnprocessableEntity. -type UnprocessableEntity = ValidationError - // ListPluginsParams defines parameters for ListPlugins. type ListPluginsParams struct { // SortBy The field to sort by @@ -658,10 +666,13 @@ type ListTeamInvitationsParams struct { // EmailTeamInvitationJSONBody defines parameters for EmailTeamInvitation. type EmailTeamInvitationJSONBody struct { - Email string `json:"email"` - Role string `json:"role"` + Email openapi_types.Email `json:"email"` + Role EmailTeamInvitationJSONBodyRole `json:"role"` } +// EmailTeamInvitationJSONBodyRole defines parameters for EmailTeamInvitation. +type EmailTeamInvitationJSONBodyRole string + // GetTeamMembershipsParams defines parameters for GetTeamMemberships. type GetTeamMembershipsParams struct { // Page Page number of the results to fetch diff --git a/spec.json b/spec.json index 09af10c..8a5f21c 100644 --- a/spec.json +++ b/spec.json @@ -183,12 +183,12 @@ }, "description": "Created" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "403": { "$ref": "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -276,12 +276,12 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "403": { "$ref": "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -305,6 +305,9 @@ "204": { "description": "Response" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -314,9 +317,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -474,6 +474,8 @@ "properties": { "message": { "type": "string", + "minLength": 1, + "maxLength": 30000, "description": "A message describing what's new or changed in this version.\nThis message will be displayed to users in the plugin's changelog.\nSupports limited markdown syntax.\n" }, "protocols": { @@ -536,15 +538,15 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, "403": { "$ref": "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -591,6 +593,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -600,9 +605,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -736,6 +738,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -745,9 +750,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -797,6 +799,9 @@ "204": { "description": "The resource was deleted successfully." }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -806,9 +811,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -941,6 +943,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -950,9 +955,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1002,6 +1004,9 @@ "204": { "description": "The resource was deleted successfully." }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1011,9 +1016,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1222,9 +1224,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1254,7 +1253,9 @@ }, "display_name": { "type": "string", - "description": "The team's display name" + "description": "The team's display name", + "minLength": 1, + "maxLength": 255 } } } @@ -1272,15 +1273,15 @@ }, "description": "Created" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, "403": { "$ref": "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1310,6 +1311,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1319,9 +1323,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1365,6 +1366,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1374,9 +1378,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1455,7 +1456,6 @@ "$ref": "#/components/responses/InternalError" } }, - "security": [], "tags": [ "plugins" ] @@ -1472,6 +1472,9 @@ "204": { "description": "Response" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1481,9 +1484,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1550,6 +1550,9 @@ }, "description": "Response" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1559,9 +1562,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1647,10 +1647,15 @@ ], "properties": { "email": { - "type": "string" + "type": "string", + "format": "email" }, "role": { - "type": "string" + "type": "string", + "enum": [ + "admin", + "member" + ] } } } @@ -1668,12 +1673,12 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "403": { "$ref": "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1744,6 +1749,9 @@ "204": { "description": "Response" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1753,9 +1761,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1802,6 +1807,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1811,9 +1819,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1867,7 +1872,9 @@ "properties": { "name": { "type": "string", - "description": "The user's name" + "description": "The user's name", + "minLength": 1, + "maxLength": 255 } } } @@ -1885,6 +1892,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1894,9 +1904,6 @@ "405": { "$ref": "#/components/responses/MethodNotAllowed" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -2096,7 +2103,8 @@ ], "properties": { "name": { - "type": "string" + "type": "string", + "maxLength": 255 }, "expires_at": { "type": "string", @@ -2125,12 +2133,12 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -2156,15 +2164,15 @@ "204": { "description": "Deleted" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -2288,6 +2296,8 @@ "display_name": { "description": "The plugin's display name", "type": "string", + "minLength": 1, + "maxLength": 50, "example": "AWS Source Plugin" }, "official": { @@ -2300,6 +2310,8 @@ }, "short_description": { "type": "string", + "minLength": 1, + "maxLength": 512, "example": "Sync data from AWS to any destination" }, "tier": { @@ -2365,11 +2377,15 @@ }, "display_name": { "type": "string", + "minLength": 1, + "maxLength": 50, "description": "The plugin's display name, as shown in the CloudQuery Hub.", "example": "AWS Source Plugin" }, "short_description": { "type": "string", + "minLength": 1, + "maxLength": 512, "description": "Short description of the plugin. This will be shown in the CloudQuery Hub.", "example": "Sync data from AWS to any destination" }, @@ -2394,7 +2410,7 @@ } } }, - "ValidationError": { + "BadRequestError": { "allOf": [ { "$ref": "#/components/schemas/BasicError" @@ -2436,11 +2452,15 @@ }, "display_name": { "type": "string", + "minLength": 1, + "maxLength": 50, "description": "The plugin's display name, as shown in the CloudQuery Hub.", "example": "AWS Source Plugin" }, "short_description": { "type": "string", + "minLength": 1, + "maxLength": 512, "description": "Short description of the plugin. This will be shown in the CloudQuery Hub.", "example": "Sync data from AWS to any destination" }, @@ -2896,7 +2916,8 @@ }, "Email": { "type": "string", - "example": "user@cloudquery.io" + "example": "user@cloudquery.io", + "format": "email" }, "UserName": { "description": "The unique name for the user.", @@ -3056,15 +3077,15 @@ }, "description": "Forbidden" }, - "UnprocessableEntity": { + "BadRequest": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationError" + "$ref": "#/components/schemas/BadRequestError" } } }, - "description": "Unprocessable Entity" + "description": "Bad request" }, "NotFound": { "content": { @@ -3212,7 +3233,9 @@ "required": true, "schema": { "type": "string", - "example": "cli-api-key" + "example": "cli-api-key", + "maxLength": 255, + "minLength": 1 }, "x-go-name": "APIKeyName" } From 8ef5639e80985b37ee1f835f11a05462e544835e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:21:16 +0300 Subject: [PATCH 014/343] chore(main): Release v1.2.1 (#19) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6063932..8e9e8a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.0...v1.2.1) (2023-09-26) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#18](https://github.com/cloudquery/cloudquery-api-go/issues/18)) ([4e5e8fe](https://github.com/cloudquery/cloudquery-api-go/commit/4e5e8fe98983d4919a8f7278dc3e2e8d2c6ae4ab)) + ## [1.2.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.1.0...v1.2.0) (2023-09-22) From 8b2e57b85b6f016a0f27d58a3d37b03f0c6be3db Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:06:04 +0300 Subject: [PATCH 015/343] fix: Generate CloudQuery Go API Client from `spec.json` (#20) Co-authored-by: cq-bot --- client.gen.go | 94 +++++++++++++------------------------------ models.gen.go | 86 +++++++++++++++++++-------------------- spec.json | 109 +++++++++++++++++++++----------------------------- 3 files changed, 114 insertions(+), 175 deletions(-) diff --git a/client.gen.go b/client.gen.go index 308704b..e25419e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -187,7 +187,7 @@ type ClientInterface interface { CreateTeamAPIKey(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTeamAPIKey request - DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeamInvitations request ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -665,8 +665,8 @@ func (c *Client) CreateTeamAPIKey(ctx context.Context, teamName TeamName, body C return c.Client.Do(req) } -func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, aPIKeyName) +func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, aPIKeyPathName) if err != nil { return nil, err } @@ -1152,7 +1152,7 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -2421,7 +2421,7 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten } // NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey -func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyName APIKeyName) (*http.Request, error) { +func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName APIKeyPathName) (*http.Request, error) { var err error var pathParam0 string @@ -2433,7 +2433,7 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyName API var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, aPIKeyName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, aPIKeyPathName) if err != nil { return nil, err } @@ -2822,9 +2822,9 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } - if params.IncludeUnlisted != nil { + if params.IncludePrivate != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_unlisted", runtime.ParamLocationQuery, *params.IncludeUnlisted); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3286,7 +3286,7 @@ type ClientWithResponsesInterface interface { CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) // ListTeamInvitationsWithResponse request ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) @@ -3361,7 +3361,6 @@ type ListPluginsResponse struct { Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON500 *InternalError } @@ -3437,7 +3436,7 @@ type GetPluginResponse struct { HTTPResponse *http.Response JSON200 *Plugin JSON401 *RequiresAuthentication - JSON403 *Forbidden + JSON404 *NotFound JSON500 *InternalError } @@ -3463,6 +3462,7 @@ type UpdatePluginResponse struct { JSON200 *Plugin JSON400 *BadRequest JSON403 *Forbidden + JSON404 *NotFound JSON500 *InternalError } @@ -3490,7 +3490,7 @@ type ListPluginVersionsResponse struct { Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication - JSON403 *Forbidden + JSON404 *NotFound JSON500 *InternalError } @@ -3542,7 +3542,6 @@ type UpdatePluginVersionResponse struct { JSON200 *PluginVersion JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } @@ -3594,7 +3593,6 @@ type DownloadPluginAssetResponse struct { Body []byte HTTPResponse *http.Response JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } @@ -3674,7 +3672,6 @@ type ListPluginVersionDocsResponse struct { Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } @@ -3758,7 +3755,6 @@ type ListPluginVersionTablesResponse struct { Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } @@ -3813,7 +3809,6 @@ type GetPluginVersionTableResponse struct { HTTPResponse *http.Response JSON200 *PluginTableDetails JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } @@ -4680,8 +4675,8 @@ func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, } // DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse -func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyName APIKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { - rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyName, reqEditors...) +func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { + rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyPathName, reqEditors...) if err != nil { return nil, err } @@ -4868,13 +4863,6 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5016,12 +5004,12 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5070,6 +5058,13 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5113,12 +5108,12 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5221,13 +5216,6 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5329,13 +5317,6 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5487,13 +5468,6 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5661,13 +5635,6 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5778,13 +5745,6 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index fecb171..93e1482 100644 --- a/models.gen.go +++ b/models.gen.go @@ -15,8 +15,7 @@ const ( // Defines values for APIKeyScope. const ( - APIKeyScopeReadAndWrite APIKeyScope = "read-and-write" - APIKeyScopeReadOnly APIKeyScope = "read-only" + ReadAndWrite APIKeyScope = "read-and-write" ) // Defines values for PluginCategory. @@ -78,12 +77,6 @@ const ( CreatePluginVersionJSONBodyPackageTypeNative CreatePluginVersionJSONBodyPackageType = "native" ) -// Defines values for CreateTeamAPIKeyJSONBodyScope. -const ( - CreateTeamAPIKeyJSONBodyScopeReadOnly CreateTeamAPIKeyJSONBodyScope = "read-only" - CreateTeamAPIKeyJSONBodyScopeReadWrite CreateTeamAPIKeyJSONBodyScope = "read-write" -) - // Defines values for EmailTeamInvitationJSONBodyRole. const ( Admin EmailTeamInvitationJSONBodyRole = "admin" @@ -99,14 +92,19 @@ type APIKey struct { ExpiresAt time.Time `json:"expires_at"` // Key API key. Will be shown only in the response when creating the key. - Key *string `json:"key,omitempty"` - Name string `json:"name"` + Key *string `json:"key,omitempty"` - // Scope Scope of permissions for the API key. `read-only` API keys are used for downloading a plugin while `read-write` API keys are used for uploading a plugin. + // Name Name of the API key + Name APIKeyName `json:"name"` + + // Scope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins Scope APIKeyScope `json:"scope"` } -// APIKeyScope Scope of permissions for the API key. `read-only` API keys are used for downloading a plugin while `read-write` API keys are used for uploading a plugin. +// APIKeyName Name of the API key +type APIKeyName = string + +// APIKeyScope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins type APIKeyScope string // BadRequestError defines model for BadRequestError. @@ -171,16 +169,16 @@ type Plugin struct { // Kind The kind of plugin, ie. source or destination. Kind PluginKind `json:"kind"` - - // Listed True if the plugin is publicly listed, false otherwise - Listed *bool `json:"listed,omitempty"` - Logo string `json:"logo"` + Logo string `json:"logo"` // Name The unique name for the plugin. Name PluginName `json:"name"` // Official True if the plugin is maintained by CloudQuery, false otherwise - Official bool `json:"official"` + Official bool `json:"official"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` Repository *string `json:"repository,omitempty"` ShortDescription string `json:"short_description"` @@ -197,8 +195,7 @@ type PluginCategory string // PluginCreate defines model for PluginCreate. type PluginCreate struct { // Category Supported categories for plugins - Category PluginCategory `json:"category"` - Destination *bool `json:"destination,omitempty"` + Category PluginCategory `json:"category"` // DisplayName The plugin's display name, as shown in the CloudQuery Hub. DisplayName string `json:"display_name"` @@ -211,12 +208,14 @@ type PluginCreate struct { Logo string `json:"logo"` // Name The unique name for the plugin. - Name PluginName `json:"name"` - Repository *string `json:"repository,omitempty"` + Name PluginName `json:"name"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team. + Public bool `json:"public"` + Repository *string `json:"repository,omitempty"` // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription string `json:"short_description"` - Source *bool `json:"source,omitempty"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` @@ -363,24 +362,24 @@ type PluginTier string // PluginUpdate defines model for PluginUpdate. type PluginUpdate struct { // Category Supported categories for plugins - Category PluginCategory `json:"category"` + Category *PluginCategory `json:"category,omitempty"` // DisplayName The plugin's display name, as shown in the CloudQuery Hub. - DisplayName string `json:"display_name"` + DisplayName *string `json:"display_name,omitempty"` Homepage *string `json:"homepage,omitempty"` - // Listed If plugin is not listed, it won't be visible or accessible in the registry. - Listed *bool `json:"listed,omitempty"` - // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... - Logo string `json:"logo"` + Logo *string `json:"logo,omitempty"` + + // Public If plugin is not public, it won't be visible to other teams in the CloudQuery Hub. + Public *bool `json:"public,omitempty"` Repository *string `json:"repository,omitempty"` // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. - ShortDescription string `json:"short_description"` + ShortDescription *string `json:"short_description,omitempty"` // Tier Supported tiers for plugins - Tier PluginTier `json:"tier"` + Tier *PluginTier `json:"tier,omitempty"` } // PluginVersion CloudQuery Plugin Version @@ -409,7 +408,7 @@ type PluginVersion struct { // PublishedAt The date and time the plugin version was set to non-draft (published). PublishedAt *time.Time `json:"published_at,omitempty"` - // Retracted If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version. + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. Retracted bool `json:"retracted"` // SupportedTargets The targets supported by this plugin version, formatted as _ @@ -436,7 +435,7 @@ type PluginVersionUpdate struct { // Protocols The supported CloudQuery protocols by this plugin version Protocols *[]int `json:"protocols,omitempty"` - // Retracted If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version. + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. Retracted *bool `json:"retracted,omitempty"` SupportedTargets *[]string `json:"supported_targets,omitempty"` } @@ -476,14 +475,14 @@ type UserName = string // VersionName The version in semantic version format. type VersionName = string -// APIKeyName defines model for apikey_name. -type APIKeyName = string +// APIKeyPathName defines model for apikey_name. +type APIKeyPathName = string // IncludeDrafts defines model for include_drafts. type IncludeDrafts = bool -// IncludeUnlisted defines model for include_unlisted. -type IncludeUnlisted = bool +// IncludePrivate defines model for include_private. +type IncludePrivate = bool // Page defines model for page. type Page = int64 @@ -647,13 +646,12 @@ type ListTeamAPIKeysParams struct { // CreateTeamAPIKeyJSONBody defines parameters for CreateTeamAPIKey. type CreateTeamAPIKeyJSONBody struct { - ExpiresAt time.Time `json:"expires_at"` - Name string `json:"name"` - Scope *CreateTeamAPIKeyJSONBodyScope `json:"scope,omitempty"` -} + ExpiresAt time.Time `json:"expires_at"` + Name string `json:"name"` -// CreateTeamAPIKeyJSONBodyScope defines parameters for CreateTeamAPIKey. -type CreateTeamAPIKeyJSONBodyScope string + // Scope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins + Scope *APIKeyScope `json:"scope,omitempty"` +} // ListTeamInvitationsParams defines parameters for ListTeamInvitations. type ListTeamInvitationsParams struct { @@ -690,8 +688,8 @@ type ListPluginsByTeamParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - // IncludeUnlisted Whether to include unlisted plugins - IncludeUnlisted *IncludeUnlisted `form:"include_unlisted,omitempty" json:"include_unlisted,omitempty"` + // IncludePrivate Whether to include private plugins + IncludePrivate *IncludePrivate `form:"include_private,omitempty" json:"include_private,omitempty"` } // ListUsersByTeamParams defines parameters for ListUsersByTeam. diff --git a/spec.json b/spec.json index 8a5f21c..c680254 100644 --- a/spec.json +++ b/spec.json @@ -146,9 +146,6 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "500": { "$ref": "#/components/responses/InternalError" } @@ -227,8 +224,8 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "404": { + "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" @@ -239,7 +236,7 @@ "plugins" ] }, - "put": { + "patch": { "description": "Update a plugin", "operationId": "UpdatePlugin", "tags": [ @@ -282,6 +279,9 @@ "403": { "$ref": "#/components/responses/Forbidden" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -382,8 +382,8 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "404": { + "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/InternalError" @@ -397,7 +397,7 @@ }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}": { "get": { - "description": "Get details about a given plugin version. Use `latest` as version to get the latest version.", + "description": "Get details about a given plugin version.", "operationId": "GetPluginVersion", "parameters": [ { @@ -599,9 +599,6 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -667,9 +664,6 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -872,9 +866,6 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -1065,9 +1056,6 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -1116,9 +1104,6 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -1402,7 +1387,7 @@ "$ref": "#/components/parameters/per_page" }, { - "$ref": "#/components/parameters/include_unlisted" + "$ref": "#/components/parameters/include_private" } ], "responses": { @@ -2111,11 +2096,7 @@ "format": "date-time" }, "scope": { - "type": "string", - "enum": [ - "read-only", - "read-write" - ] + "$ref": "#/components/schemas/APIKeyScope" } } } @@ -2317,8 +2298,8 @@ "tier": { "$ref": "#/components/schemas/PluginTier" }, - "listed": { - "description": "True if the plugin is publicly listed, false otherwise", + "public": { + "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", "type": "boolean" } }, @@ -2357,7 +2338,8 @@ "tier", "display_name", "short_description", - "logo" + "logo", + "public" ], "properties": { "team_name": { @@ -2397,11 +2379,10 @@ "type": "string", "example": "https://github.com/cloudquery/cloudquery" }, - "source": { - "type": "boolean" - }, - "destination": { - "type": "boolean" + "public": { + "type": "boolean", + "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.", + "example": true }, "logo": { "type": "string", @@ -2436,13 +2417,6 @@ }, "PluginUpdate": { "type": "object", - "required": [ - "category", - "tier", - "display_name", - "short_description", - "logo" - ], "properties": { "category": { "$ref": "#/components/schemas/PluginCategory" @@ -2477,9 +2451,9 @@ "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", "example": "https://images.cloudquery.io/logos/aws.png" }, - "listed": { + "public": { "type": "boolean", - "description": "If plugin is not listed, it won't be visible or accessible in the registry." + "description": "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub." } } }, @@ -2529,7 +2503,7 @@ }, "retracted": { "type": "boolean", - "description": "If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version." + "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." }, "protocols": { "type": "array", @@ -2587,7 +2561,7 @@ }, "retracted": { "type": "boolean", - "description": "If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version." + "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." }, "protocols": { "type": "array", @@ -2999,11 +2973,18 @@ } } }, + "APIKeyName": { + "description": "Name of the API key", + "type": "string", + "example": "cli-api-key", + "maxLength": 255, + "minLength": 1, + "pattern": "^[a-zA-Z0-9-]+$" + }, "APIKeyScope": { - "description": "Scope of permissions for the API key. `read-only` API keys are used for downloading a plugin while `read-write` API keys are used for uploading a plugin.", + "description": "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", "type": "string", "enum": [ - "read-only", "read-and-write" ] }, @@ -3017,8 +2998,7 @@ ], "properties": { "name": { - "type": "string", - "example": "cli-api-key" + "$ref": "#/components/schemas/APIKeyName" }, "created_by": { "$ref": "#/components/schemas/Email", @@ -3067,25 +3047,25 @@ }, "description": "Requires authentication" }, - "Forbidden": { + "BadRequest": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BasicError" + "$ref": "#/components/schemas/BadRequestError" } } }, - "description": "Forbidden" + "description": "Bad request" }, - "BadRequest": { + "Forbidden": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BadRequestError" + "$ref": "#/components/schemas/BasicError" } } }, - "description": "Bad request" + "description": "Forbidden" }, "NotFound": { "content": { @@ -3210,10 +3190,10 @@ "type": "string" } }, - "include_unlisted": { - "description": "Whether to include unlisted plugins", + "include_private": { + "description": "Whether to include private plugins", "in": "query", - "name": "include_unlisted", + "name": "include_private", "required": false, "schema": { "type": "boolean" @@ -3235,9 +3215,10 @@ "type": "string", "example": "cli-api-key", "maxLength": 255, - "minLength": 1 + "minLength": 1, + "pattern": "^[a-zA-Z0-9-]+$" }, - "x-go-name": "APIKeyName" + "x-go-name": "APIKeyPathName" } } } From df9748ff000ba153b217ab0c2bcf374395fb6a51 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 4 Oct 2023 17:45:44 +0300 Subject: [PATCH 016/343] fix: Generate CloudQuery Go API Client from `spec.json` (#22) Co-authored-by: cq-bot --- client.gen.go | 141 +++++++++++++++++++++++++++++++++++++++++++------- models.gen.go | 35 +++++++++++++ spec.json | 113 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 266 insertions(+), 23 deletions(-) diff --git a/client.gen.go b/client.gen.go index e25419e..8e75e96 100644 --- a/client.gen.go +++ b/client.gen.go @@ -197,8 +197,10 @@ type ClientInterface interface { EmailTeamInvitation(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // AcceptTeamInvitation request - AcceptTeamInvitation(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // AcceptTeamInvitationWithBody request with any body + AcceptTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AcceptTeamInvitation(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CancelTeamInvitation request CancelTeamInvitation(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -713,8 +715,20 @@ func (c *Client) EmailTeamInvitation(ctx context.Context, teamName TeamName, bod return c.Client.Do(req) } -func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAcceptTeamInvitationRequest(c.Server, teamName) +func (c *Client) AcceptTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAcceptTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAcceptTeamInvitationRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -2580,8 +2594,19 @@ func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, con return req, nil } -// NewAcceptTeamInvitationRequest generates requests for AcceptTeamInvitation -func NewAcceptTeamInvitationRequest(server string, teamName TeamName) (*http.Request, error) { +// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body +func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body +func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2606,11 +2631,13 @@ func NewAcceptTeamInvitationRequest(server string, teamName TeamName) (*http.Req return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } @@ -3296,8 +3323,10 @@ type ClientWithResponsesInterface interface { EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) - // AcceptTeamInvitationWithResponse request - AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + // AcceptTeamInvitationWithBodyWithResponse request with any body + AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) // CancelTeamInvitationWithResponse request CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) @@ -3386,6 +3415,7 @@ type CreatePluginResponse struct { JSON201 *Plugin JSON400 *BadRequest JSON403 *Forbidden + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3490,6 +3520,7 @@ type ListPluginVersionsResponse struct { Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } @@ -3594,6 +3625,7 @@ type DownloadPluginAssetResponse struct { HTTPResponse *http.Response JSON401 *RequiresAuthentication JSON404 *NotFound + JSON429 *TooManyRequests JSON500 *InternalError } @@ -3645,6 +3677,7 @@ type DeletePluginVersionDocsResponse struct { JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3702,6 +3735,7 @@ type CreatePluginVersionDocsResponse struct { JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3728,6 +3762,7 @@ type DeletePluginVersionTablesResponse struct { JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3785,6 +3820,7 @@ type CreatePluginVersionTablesResponse struct { JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3864,7 +3900,7 @@ type CreateTeamResponse struct { JSON201 *Team JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON403 *Forbidden + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -3971,6 +4007,7 @@ type CreateTeamAPIKeyResponse struct { JSON201 *APIKey JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -4311,8 +4348,8 @@ type ListCurrentUserInvitationsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []InvitationWithToken `json:"items"` + Metadata ListMetadata `json:"metadata"` } JSON500 *InternalError } @@ -4709,9 +4746,17 @@ func (c *ClientWithResponses) EmailTeamInvitationWithResponse(ctx context.Contex return ParseEmailTeamInvitationResponse(rsp) } -// AcceptTeamInvitationWithResponse request returning *AcceptTeamInvitationResponse -func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { - rsp, err := c.AcceptTeamInvitation(ctx, teamName, reqEditors...) +// AcceptTeamInvitationWithBodyWithResponse request with arbitrary body returning *AcceptTeamInvitationResponse +func (c *ClientWithResponses) AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAcceptTeamInvitationResponse(rsp) +} + +func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitation(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } @@ -4910,6 +4955,13 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5108,6 +5160,13 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5324,6 +5383,13 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5425,6 +5491,13 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5538,6 +5611,13 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5592,6 +5672,13 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5705,6 +5792,13 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5856,12 +5950,12 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -6075,6 +6169,13 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6714,8 +6815,8 @@ func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUs switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []InvitationWithToken `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err diff --git a/models.gen.go b/models.gen.go index 93e1482..1ca6e27 100644 --- a/models.gen.go +++ b/models.gen.go @@ -140,6 +140,19 @@ type Invitation struct { TeamName TeamName `json:"team_name"` } +// InvitationWithToken defines model for InvitationWithToken. +type InvitationWithToken struct { + CreatedAt time.Time `json:"created_at"` + Email Email `json:"email"` + Role string `json:"role"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Token The token used to accept the invitation + Token openapi_types.UUID `json:"token"` +} + // ListMetadata defines model for ListMetadata. type ListMetadata struct { LastPage *int `json:"last_page,omitempty"` @@ -459,6 +472,14 @@ type Team struct { // TeamName The unique name for the team. type TeamName = string +// UnprocessableEntityError defines model for UnprocessableEntityError. +type UnprocessableEntityError struct { + Errors *[]string `json:"errors,omitempty"` + FieldErrors *map[string]string `json:"field_errors,omitempty"` + Message string `json:"message"` + Status int `json:"status"` +} + // User CloudQuery User type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -517,6 +538,12 @@ type NotFound = BasicError // RequiresAuthentication Basic Error type RequiresAuthentication = BasicError +// TooManyRequests Basic Error +type TooManyRequests = BasicError + +// UnprocessableEntity defines model for UnprocessableEntity. +type UnprocessableEntity = UnprocessableEntityError + // ListPluginsParams defines parameters for ListPlugins. type ListPluginsParams struct { // SortBy The field to sort by @@ -671,6 +698,11 @@ type EmailTeamInvitationJSONBody struct { // EmailTeamInvitationJSONBodyRole defines parameters for EmailTeamInvitation. type EmailTeamInvitationJSONBodyRole string +// AcceptTeamInvitationJSONBody defines parameters for AcceptTeamInvitation. +type AcceptTeamInvitationJSONBody struct { + Token openapi_types.UUID `json:"token"` +} + // GetTeamMembershipsParams defines parameters for GetTeamMemberships. type GetTeamMembershipsParams struct { // Page Page number of the results to fetch @@ -761,5 +793,8 @@ type CreateTeamAPIKeyJSONRequestBody CreateTeamAPIKeyJSONBody // EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. type EmailTeamInvitationJSONRequestBody EmailTeamInvitationJSONBody +// AcceptTeamInvitationJSONRequestBody defines body for AcceptTeamInvitation for application/json ContentType. +type AcceptTeamInvitationJSONRequestBody AcceptTeamInvitationJSONBody + // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody UpdateCurrentUserJSONBody diff --git a/spec.json b/spec.json index c680254..8bce0f2 100644 --- a/spec.json +++ b/spec.json @@ -186,6 +186,9 @@ "403": { "$ref": "#/components/responses/Forbidden" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -382,6 +385,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -744,6 +750,9 @@ "404": { "$ref": "#/components/responses/NotFound" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -805,6 +814,9 @@ "404": { "$ref": "#/components/responses/NotFound" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -946,6 +958,9 @@ "404": { "$ref": "#/components/responses/NotFound" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1007,6 +1022,9 @@ "404": { "$ref": "#/components/responses/NotFound" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1107,6 +1125,9 @@ "404": { "$ref": "#/components/responses/NotFound" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1264,8 +1285,8 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "422": { + "$ref": "#/components/responses/UnprocessableEntity" }, "500": { "$ref": "#/components/responses/InternalError" @@ -1683,6 +1704,24 @@ "$ref": "#/components/parameters/team_name" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "format": "uuid" + } + } + } + } + } + }, "responses": { "201": { "description": "The invitation has been accepted and the authenticated user is now a member of the team.", @@ -1928,7 +1967,7 @@ "items": { "type": "array", "items": { - "$ref": "#/components/schemas/Invitation" + "$ref": "#/components/schemas/InvitationWithToken" } }, "metadata": { @@ -2120,6 +2159,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -2415,6 +2457,30 @@ } ] }, + "UnprocessableEntityError": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicError" + }, + { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "field_errors": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + } + ] + }, "PluginUpdate": { "type": "object", "properties": { @@ -2973,6 +3039,27 @@ } } }, + "InvitationWithToken": { + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/components/schemas/Invitation" + }, + { + "type": "object", + "properties": { + "token": { + "type": "string", + "format": "uuid", + "description": "The token used to accept the invitation" + } + }, + "required": [ + "token" + ] + } + ] + }, "APIKeyName": { "description": "Name of the API key", "type": "string", @@ -3067,6 +3154,16 @@ }, "description": "Forbidden" }, + "UnprocessableEntity": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnprocessableEntityError" + } + } + }, + "description": "UnprocessableEntity" + }, "NotFound": { "content": { "application/json": { @@ -3077,6 +3174,16 @@ }, "description": "Resource not found" }, + "TooManyRequests": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicError" + } + } + }, + "description": "Too Many Requests" + }, "MethodNotAllowed": { "content": { "application/json": { From 4bcb30bebf0b77dbce3d6a05b26f751f577123f4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 4 Oct 2023 17:49:21 +0300 Subject: [PATCH 017/343] chore(main): Release v1.2.2 (#21) :robot: I have created a release *beep* *boop* --- ## [1.2.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.1...v1.2.2) (2023-10-04) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#20](https://github.com/cloudquery/cloudquery-api-go/issues/20)) ([8b2e57b](https://github.com/cloudquery/cloudquery-api-go/commit/8b2e57b85b6f016a0f27d58a3d37b03f0c6be3db)) * Generate CloudQuery Go API Client from `spec.json` ([#22](https://github.com/cloudquery/cloudquery-api-go/issues/22)) ([df9748f](https://github.com/cloudquery/cloudquery-api-go/commit/df9748ff000ba153b217ab0c2bcf374395fb6a51)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9e8a2..5b38eaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.2.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.1...v1.2.2) (2023-10-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#20](https://github.com/cloudquery/cloudquery-api-go/issues/20)) ([8b2e57b](https://github.com/cloudquery/cloudquery-api-go/commit/8b2e57b85b6f016a0f27d58a3d37b03f0c6be3db)) +* Generate CloudQuery Go API Client from `spec.json` ([#22](https://github.com/cloudquery/cloudquery-api-go/issues/22)) ([df9748f](https://github.com/cloudquery/cloudquery-api-go/commit/df9748ff000ba153b217ab0c2bcf374395fb6a51)) + ## [1.2.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.0...v1.2.1) (2023-09-26) From 9d74666e5151a2cb78035995867d5ff74dced7d5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 4 Oct 2023 20:45:24 +0300 Subject: [PATCH 018/343] fix: Generate CloudQuery Go API Client from `spec.json` (#23) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 1388 ++++++++++++++++++++++++++++++++++++++++--------- models.gen.go | 101 +++- spec.json | 442 ++++++++++++++-- 3 files changed, 1618 insertions(+), 313 deletions(-) diff --git a/client.gen.go b/client.gen.go index 8e75e96..a92178e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -208,6 +208,25 @@ type ClientInterface interface { // GetTeamMemberships request GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListMonthlyLimitsByTeam request + ListMonthlyLimitsByTeam(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateMonthlyLimitWithBody request with any body + CreateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateMonthlyLimit(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteMonthlyLimit request + DeleteMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetMonthlyLimit request + GetMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateMonthlyLimitWithBody request with any body + UpdateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePluginsByTeam request DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -763,6 +782,90 @@ func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } +func (c *Client) ListMonthlyLimitsByTeam(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListMonthlyLimitsByTeamRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMonthlyLimitRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateMonthlyLimit(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateMonthlyLimitRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteMonthlyLimitRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetMonthlyLimitRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateMonthlyLimitRequestWithBody(c.Server, teamName, pluginTeam, pluginKind, pluginName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateMonthlyLimitRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeletePluginsByTeamRequest(c.Server, teamName) if err != nil { @@ -2754,42 +2857,8 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return req, nil } -// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam -func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam -func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { +// NewListMonthlyLimitsByTeamRequest generates requests for ListMonthlyLimitsByTeam +func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params *ListMonthlyLimitsByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -2804,7 +2873,7 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return nil, err } - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2849,22 +2918,6 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } - if params.IncludePrivate != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - queryURL.RawQuery = queryValues.Encode() } @@ -2876,8 +2929,19 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return req, nil } -// NewListUsersByTeamRequest generates requests for ListUsersByTeam -func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { +// NewCreateMonthlyLimitRequest calls the generic CreateMonthlyLimit builder with application/json body +func NewCreateMonthlyLimitRequest(server string, teamName TeamName, body CreateMonthlyLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateMonthlyLimitRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateMonthlyLimitRequestWithBody generates requests for CreateMonthlyLimit with any type of body +func NewCreateMonthlyLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2892,7 +2956,7 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return nil, err } - operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2902,62 +2966,54 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.PerPage != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewDeleteMonthlyLimitRequest generates requests for DeleteMonthlyLimit +func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error - if params.Page != nil { + var pathParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - } + var pathParam1 string - queryURL.RawQuery = queryValues.Encode() + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - return req, nil -} + var pathParam3 string -// NewUploadImageRequest generates requests for UploadImage -func NewUploadImageRequest(server string) (*http.Request, error) { - var err error + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/upload/image") + operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2967,7 +3023,7 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -2975,54 +3031,44 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return req, nil } -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { +// NewGetMonthlyLimitRequest generates requests for GetMonthlyLimit +func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - return req, nil -} + var pathParam3 string -// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body -func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body -func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3032,36 +3078,390 @@ func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations -func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { +// NewUpdateMonthlyLimitRequest calls the generic UpdateMonthlyLimit builder with application/json body +func NewUpdateMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateMonthlyLimitRequestWithBody(server, teamName, pluginTeam, pluginKind, pluginName, "application/json", bodyReader) +} + +// NewUpdateMonthlyLimitRequestWithBody generates requests for UpdateMonthlyLimit with any type of body +func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/invitations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } - if params != nil { + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam +func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam +func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludePrivate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListUsersByTeamRequest generates requests for ListUsersByTeam +func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUploadImageRequest generates requests for UploadImage +func NewUploadImageRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/upload/image") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations +func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/invitations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { queryValues := queryURL.Query() if params.Page != nil { @@ -3334,6 +3734,25 @@ type ClientWithResponsesInterface interface { // GetTeamMembershipsWithResponse request GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + // ListMonthlyLimitsByTeamWithResponse request + ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) + + // CreateMonthlyLimitWithBodyWithResponse request with any body + CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + // DeleteMonthlyLimitWithResponse request + DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) + + // GetMonthlyLimitWithResponse request + GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) + + // UpdateMonthlyLimitWithBodyWithResponse request with any body + UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + + UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + // DeletePluginsByTeamWithResponse request DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) @@ -4107,8 +4526,8 @@ func (r EmailTeamInvitationResponse) StatusCode() int { type AcceptTeamInvitationResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *Membership - JSON303 *Membership + JSON201 *MembershipWithTeam + JSON303 *MembershipWithTeam JSON403 *Forbidden JSON500 *InternalError } @@ -4159,8 +4578,8 @@ type GetTeamMembershipsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []MembershipWithUser `json:"items"` + Metadata ListMetadata `json:"metadata"` } JSON400 *BadRequest JSON401 *RequiresAuthentication @@ -4185,6 +4604,140 @@ func (r GetTeamMembershipsResponse) StatusCode() int { return 0 } +type ListMonthlyLimitsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []MonthlyLimit `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListMonthlyLimitsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListMonthlyLimitsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *MonthlyLimit + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *MonthlyLimit + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *MonthlyLimit + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeletePluginsByTeamResponse struct { Body []byte HTTPResponse *http.Response @@ -4220,6 +4773,7 @@ type ListPluginsByTeamResponse struct { } JSON401 *RequiresAuthentication JSON403 *Forbidden + JSON404 *NotFound JSON500 *InternalError } @@ -4374,8 +4928,8 @@ type GetCurrentUserMembershipsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []MembershipWithTeam `json:"items"` + Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication JSON403 *Forbidden @@ -4781,6 +5335,67 @@ func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context return ParseGetTeamMembershipsResponse(rsp) } +// ListMonthlyLimitsByTeamWithResponse request returning *ListMonthlyLimitsByTeamResponse +func (c *ClientWithResponses) ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) { + rsp, err := c.ListMonthlyLimitsByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListMonthlyLimitsByTeamResponse(rsp) +} + +// CreateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *CreateMonthlyLimitResponse +func (c *ClientWithResponses) CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { + rsp, err := c.CreateMonthlyLimitWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateMonthlyLimitResponse(rsp) +} + +func (c *ClientWithResponses) CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { + rsp, err := c.CreateMonthlyLimit(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateMonthlyLimitResponse(rsp) +} + +// DeleteMonthlyLimitWithResponse request returning *DeleteMonthlyLimitResponse +func (c *ClientWithResponses) DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) { + rsp, err := c.DeleteMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteMonthlyLimitResponse(rsp) +} + +// GetMonthlyLimitWithResponse request returning *GetMonthlyLimitResponse +func (c *ClientWithResponses) GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) { + rsp, err := c.GetMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetMonthlyLimitResponse(rsp) +} + +// UpdateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *UpdateMonthlyLimitResponse +func (c *ClientWithResponses) UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { + rsp, err := c.UpdateMonthlyLimitWithBody(ctx, teamName, pluginTeam, pluginKind, pluginName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateMonthlyLimitResponse(rsp) +} + +func (c *ClientWithResponses) UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { + rsp, err := c.UpdateMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateMonthlyLimitResponse(rsp) +} + // DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) @@ -5894,14 +6509,233 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call +func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call +func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTeamByNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListTeamAPIKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []APIKey `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5915,22 +6749,22 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { return response, nil } -// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call -func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamResponse{ + response := &CreateTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Team + var dest APIKey if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -5969,27 +6803,20 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { return response, nil } -// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call -func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamByNameResponse{ + response := &DeleteTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6004,13 +6831,6 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6030,54 +6850,83 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } -// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call -func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { +// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call +func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateTeamResponse{ + response := &ListTeamInvitationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + var dest struct { + Items []Invitation `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON500 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + } + + return response, nil +} + +// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call +func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailTeamInvitationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -6091,36 +6940,40 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } -// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call -func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { +// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call +func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamAPIKeysResponse{ + response := &AcceptTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []APIKey `json:"items"` - Metadata ListMetadata `json:"metadata"` + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MembershipWithTeam + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON303 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -6134,27 +6987,20 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, return response, nil } -// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call -func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { +// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call +func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamAPIKeyResponse{ + response := &CancelTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest APIKey - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6169,12 +7015,19 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -6188,20 +7041,30 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons return response, nil } -// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call -func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { +// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call +func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamAPIKeyResponse{ + response := &GetTeamMembershipsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []MembershipWithUser `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6216,6 +7079,13 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6235,15 +7105,15 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons return response, nil } -// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call -func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { +// ParseListMonthlyLimitsByTeamResponse parses an HTTP response from a ListMonthlyLimitsByTeamWithResponse call +func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimitsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamInvitationsResponse{ + response := &ListMonthlyLimitsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -6251,14 +7121,21 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []MonthlyLimit `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6266,6 +7143,13 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6278,33 +7162,33 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR return response, nil } -// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call -func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { +// ParseCreateMonthlyLimitResponse parses an HTTP response from a CreateMonthlyLimitWithResponse call +func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &EmailTeamInvitationResponse{ + response := &CreateMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invitation + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MonthlyLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -6313,6 +7197,20 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6325,40 +7223,40 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR return response, nil } -// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call -func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { +// ParseDeleteMonthlyLimitResponse parses an HTTP response from a DeleteMonthlyLimitWithResponse call +func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AcceptTeamInvitationResponse{ + response := &DeleteMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Membership + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: - var dest Membership + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON303 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -6372,26 +7270,26 @@ func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitatio return response, nil } -// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call -func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { +// ParseGetMonthlyLimitResponse parses an HTTP response from a GetMonthlyLimitWithResponse call +func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CancelTeamInvitationResponse{ + response := &GetMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MonthlyLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -6426,25 +7324,22 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio return response, nil } -// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call -func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { +// ParseUpdateMonthlyLimitResponse parses an HTTP response from a UpdateMonthlyLimitWithResponse call +func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamMembershipsResponse{ + response := &UpdateMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest MonthlyLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -6582,6 +7477,13 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6851,8 +7753,8 @@ func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUser switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []MembershipWithTeam `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err diff --git a/models.gen.go b/models.gen.go index 1ca6e27..dcefc16 100644 --- a/models.gen.go +++ b/models.gen.go @@ -107,14 +107,6 @@ type APIKeyName = string // APIKeyScope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins type APIKeyScope string -// BadRequestError defines model for BadRequestError. -type BadRequestError struct { - Errors *[]string `json:"errors,omitempty"` - FieldErrors *map[string]string `json:"field_errors,omitempty"` - Message string `json:"message"` - Status int `json:"status"` -} - // BasicError Basic Error type BasicError struct { Message string `json:"message"` @@ -124,6 +116,14 @@ type BasicError struct { // Email defines model for Email. type Email = openapi_types.Email +// FieldError defines model for FieldError. +type FieldError struct { + Errors *[]string `json:"errors,omitempty"` + FieldErrors *map[string]string `json:"field_errors,omitempty"` + Message string `json:"message"` + Status int `json:"status"` +} + // ImageURL defines model for ImageURL. type ImageURL struct { DownloadUrl string `json:"download_url"` @@ -159,17 +159,64 @@ type ListMetadata struct { TotalCount *int `json:"total_count,omitempty"` } -// Membership defines model for Membership. -type Membership struct { +// MembershipWithTeam defines model for MembershipWithTeam. +type MembershipWithTeam struct { Role string `json:"role"` // Team CloudQuery Team Team *Team `json:"team,omitempty"` +} + +// MembershipWithUser defines model for MembershipWithUser. +type MembershipWithUser struct { + Role string `json:"role"` // User CloudQuery User User *User `json:"user,omitempty"` } +// MonthlyLimit A configurable monthly limit for plugin usage. +type MonthlyLimit struct { + // CreatedAt The date and time the plugin limit was created. + CreatedAt time.Time `json:"created_at"` + + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + + // UpdatedAt The date and time the plugin limit was last updated. + UpdatedAt time.Time `json:"updated_at"` + + // Usd The maximum USD amount the plugin is allowed to use within a calendar month. + USD int `json:"usd"` +} + +// MonthlyLimitCreate A configurable monthly limit for plugin usage. +type MonthlyLimitCreate struct { + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + + // Usd The maximum USD amount the plugin is allowed to use within a calendar month. + USD int `json:"usd"` +} + +// MonthlyLimitUpdate A configurable monthly limit for plugin usage. +type MonthlyLimitUpdate struct { + // Usd The maximum USD amount the plugin is allowed to use within a calendar month. + USD int `json:"usd"` +} + // Plugin CloudQuery Plugin type Plugin struct { // Category Supported categories for plugins @@ -472,14 +519,6 @@ type Team struct { // TeamName The unique name for the team. type TeamName = string -// UnprocessableEntityError defines model for UnprocessableEntityError. -type UnprocessableEntityError struct { - Errors *[]string `json:"errors,omitempty"` - FieldErrors *map[string]string `json:"field_errors,omitempty"` - Message string `json:"message"` - Status int `json:"status"` -} - // User CloudQuery User type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -514,6 +553,9 @@ type PerPage = int64 // PluginSortBy defines model for plugin_sort_by. type PluginSortBy string +// PluginTeam The unique name for the team. +type PluginTeam = TeamName + // TargetName defines model for target_name. type TargetName = string @@ -521,10 +563,10 @@ type TargetName = string type VersionSortBy string // BadRequest defines model for BadRequest. -type BadRequest = BadRequestError +type BadRequest = FieldError -// Forbidden Basic Error -type Forbidden = BasicError +// Forbidden defines model for Forbidden. +type Forbidden = FieldError // InternalError Basic Error type InternalError = BasicError @@ -542,7 +584,7 @@ type RequiresAuthentication = BasicError type TooManyRequests = BasicError // UnprocessableEntity defines model for UnprocessableEntity. -type UnprocessableEntity = UnprocessableEntityError +type UnprocessableEntity = FieldError // ListPluginsParams defines parameters for ListPlugins. type ListPluginsParams struct { @@ -712,6 +754,15 @@ type GetTeamMembershipsParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } +// ListMonthlyLimitsByTeamParams defines parameters for ListMonthlyLimitsByTeam. +type ListMonthlyLimitsByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + // ListPluginsByTeamParams defines parameters for ListPluginsByTeam. type ListPluginsByTeamParams struct { // Page Page number of the results to fetch @@ -796,5 +847,11 @@ type EmailTeamInvitationJSONRequestBody EmailTeamInvitationJSONBody // AcceptTeamInvitationJSONRequestBody defines body for AcceptTeamInvitation for application/json ContentType. type AcceptTeamInvitationJSONRequestBody AcceptTeamInvitationJSONBody +// CreateMonthlyLimitJSONRequestBody defines body for CreateMonthlyLimit for application/json ContentType. +type CreateMonthlyLimitJSONRequestBody = MonthlyLimitCreate + +// UpdateMonthlyLimitJSONRequestBody defines body for UpdateMonthlyLimit for application/json ContentType. +type UpdateMonthlyLimitJSONRequestBody = MonthlyLimitUpdate + // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody UpdateCurrentUserJSONBody diff --git a/spec.json b/spec.json index 8bce0f2..62ec924 100644 --- a/spec.json +++ b/spec.json @@ -43,6 +43,9 @@ }, { "name": "healthcheck" + }, + { + "name": "limits" } ], "paths": { @@ -1458,6 +1461,9 @@ "403": { "$ref": "#/components/responses/Forbidden" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1527,17 +1533,12 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/Membership" + "$ref": "#/components/schemas/MembershipWithUser" }, "type": "array", "example": [ { "role": "admin", - "team": { - "created_at": "2017-07-14T16:53:42Z", - "name": "cloudquery", - "display_name": "CloudQuery" - }, "user": { "created_at": "2017-07-14T16:53:42Z", "email": "user@clouduery.io", @@ -1578,6 +1579,264 @@ ] } }, + "/teams/{team_name}/monthly-limits": { + "get": { + "description": "List all monthly limits for the team.", + "operationId": "ListMonthlyLimitsByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "List of monthly limits for the team.", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/MonthlyLimit" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + }, + "post": { + "description": "Create a monthly limit for a plugin", + "operationId": "CreateMonthlyLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimitCreate" + } + } + } + }, + "responses": { + "201": { + "description": "New monthly limit created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimit" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + } + }, + "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}": { + "get": { + "description": "Get a monthly limit for a plugin", + "operationId": "GetMonthlyLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "200": { + "description": "Monthly limit retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimit" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + }, + "put": { + "description": "Update a monthly limit for a plugin", + "operationId": "UpdateMonthlyLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimitUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Monthly limit updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimit" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + }, + "delete": { + "description": "Delete a monthly limit for a plugin", + "operationId": "DeleteMonthlyLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "204": { + "description": "Monthly limit deleted." + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + } + }, "/teams/{team_name}/invitations": { "get": { "operationId": "ListTeamInvitations", @@ -1728,7 +1987,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Membership" + "$ref": "#/components/schemas/MembershipWithTeam" } } } @@ -1738,7 +1997,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Membership" + "$ref": "#/components/schemas/MembershipWithTeam" } } } @@ -2008,7 +2267,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/Membership" + "$ref": "#/components/schemas/MembershipWithTeam" }, "type": "array", "example": [ @@ -2018,12 +2277,6 @@ "created_at": "2017-07-14T16:53:42Z", "name": "cloudquery", "display_name": "CloudQuery" - }, - "user": { - "created_at": "2017-07-14T16:53:42Z", - "email": "user@clouduery.io", - "name": "user", - "updated_at": "2017-07-14T16:53:42Z" } } ] @@ -2433,31 +2686,7 @@ } } }, - "BadRequestError": { - "allOf": [ - { - "$ref": "#/components/schemas/BasicError" - }, - { - "properties": { - "errors": { - "items": { - "type": "string" - }, - "type": "array" - }, - "field_errors": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - } - ] - }, - "UnprocessableEntityError": { + "FieldError": { "allOf": [ { "$ref": "#/components/schemas/BasicError" @@ -2993,16 +3222,13 @@ "title": "CloudQuery User", "type": "object" }, - "Membership": { + "MembershipWithUser": { "additionalProperties": false, "properties": { "role": { "type": "string", "example": "admin" }, - "team": { - "$ref": "#/components/schemas/Team" - }, "user": { "$ref": "#/components/schemas/User" } @@ -3010,9 +3236,104 @@ "required": [ "role" ], - "title": "CloudQuery Team Membership", + "title": "CloudQuery User Membership", "type": "object" }, + "MonthlyLimit": { + "title": "CloudQuery Plugin Monthly Limit", + "description": "A configurable monthly limit for plugin usage.", + "type": "object", + "additionalProperties": false, + "required": [ + "created_at", + "updated_at", + "plugin_team", + "plugin_kind", + "plugin_name", + "usd" + ], + "properties": { + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "The date and time the plugin limit was created." + }, + "updated_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "The date and time the plugin limit was last updated." + }, + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + }, + "usd": { + "example": 1000, + "type": "integer", + "minimum": 0, + "maximum": 1000000000, + "description": "The maximum USD amount the plugin is allowed to use within a calendar month.", + "x-go-name": "USD" + } + } + }, + "MonthlyLimitCreate": { + "title": "CloudQuery Plugin Monthly Limit", + "description": "A configurable monthly limit for plugin usage.", + "type": "object", + "additionalProperties": false, + "required": [ + "plugin_team", + "plugin_kind", + "plugin_name", + "usd" + ], + "properties": { + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + }, + "usd": { + "example": 1000, + "type": "integer", + "minimum": 0, + "maximum": 1000000000, + "description": "The maximum USD amount the plugin is allowed to use within a calendar month.", + "x-go-name": "USD" + } + } + }, + "MonthlyLimitUpdate": { + "title": "CloudQuery Plugin Monthly Limit", + "description": "A configurable monthly limit for plugin usage.", + "type": "object", + "additionalProperties": false, + "required": [ + "usd" + ], + "properties": { + "usd": { + "example": 1000, + "type": "integer", + "minimum": 0, + "maximum": 1000000000, + "description": "The maximum USD amount the plugin is allowed to use within a calendar month.", + "x-go-name": "USD" + } + } + }, "Invitation": { "additionalProperties": false, "required": [ @@ -3039,6 +3360,23 @@ } } }, + "MembershipWithTeam": { + "additionalProperties": false, + "properties": { + "role": { + "type": "string", + "example": "admin" + }, + "team": { + "$ref": "#/components/schemas/Team" + } + }, + "required": [ + "role" + ], + "title": "CloudQuery Team Membership", + "type": "object" + }, "InvitationWithToken": { "additionalProperties": false, "allOf": [ @@ -3138,7 +3476,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BadRequestError" + "$ref": "#/components/schemas/FieldError" } } }, @@ -3148,7 +3486,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BasicError" + "$ref": "#/components/schemas/FieldError" } } }, @@ -3158,7 +3496,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnprocessableEntityError" + "$ref": "#/components/schemas/FieldError" } } }, @@ -3306,6 +3644,14 @@ "type": "boolean" } }, + "plugin_team": { + "in": "path", + "name": "plugin_team", + "required": true, + "schema": { + "$ref": "#/components/schemas/TeamName" + } + }, "email": { "in": "path", "name": "email", From bf63b573e7dc2ecd3663e83af4c8ebb7b0ab1368 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:39:45 +0300 Subject: [PATCH 019/343] chore(main): Release v1.2.3 (#24) :robot: I have created a release *beep* *boop* --- ## [1.2.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.2...v1.2.3) (2023-10-04) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#23](https://github.com/cloudquery/cloudquery-api-go/issues/23)) ([9d74666](https://github.com/cloudquery/cloudquery-api-go/commit/9d74666e5151a2cb78035995867d5ff74dced7d5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b38eaf..5e5f3cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.2...v1.2.3) (2023-10-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#23](https://github.com/cloudquery/cloudquery-api-go/issues/23)) ([9d74666](https://github.com/cloudquery/cloudquery-api-go/commit/9d74666e5151a2cb78035995867d5ff74dced7d5)) + ## [1.2.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.1...v1.2.2) (2023-10-04) From 5cb006de422fcd6e6014315f428c6eddf7c4813c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 5 Oct 2023 17:34:39 +0300 Subject: [PATCH 020/343] fix: Generate CloudQuery Go API Client from `spec.json` (#25) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 8 +++-- spec.json | 96 +++++++++++++++++++++++++++------------------------ 2 files changed, 56 insertions(+), 48 deletions(-) diff --git a/models.gen.go b/models.gen.go index dcefc16..c30f70e 100644 --- a/models.gen.go +++ b/models.gen.go @@ -352,9 +352,6 @@ type PluginTableColumn struct { // IncrementalKey Whether the column is used as an incremental key IncrementalKey bool `json:"incremental_key"` - // IsUnique Whether the column has a unique constraint - IsUnique bool `json:"is_unique"` - // Name Name of the column Name string `json:"name"` @@ -366,10 +363,15 @@ type PluginTableColumn struct { // Type Arrow Type of the column Type string `json:"type"` + + // Unique Whether the column has a unique constraint + Unique bool `json:"unique"` } // PluginTableCreate CloudQuery Plugin Table type PluginTableCreate struct { + Columns *[]PluginTableColumn `json:"columns,omitempty"` + // Description Description of the table Description *string `json:"description,omitempty"` diff --git a/spec.json b/spec.json index 62ec924..9822056 100644 --- a/spec.json +++ b/spec.json @@ -3011,49 +3011,6 @@ "title": "CloudQuery Plugin Table", "type": "object" }, - "PluginTableCreate": { - "additionalProperties": false, - "description": "CloudQuery Plugin Table", - "required": [ - "name" - ], - "properties": { - "description": { - "description": "Description of the table", - "type": "string", - "example": "AWS S3 Buckets" - }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" - }, - "name": { - "$ref": "#/components/schemas/PluginTableName" - }, - "parent": { - "description": "Name of the parent table, if any", - "type": "string", - "example": "nil" - }, - "relations": { - "description": "Names of the tables that depend on this table", - "items": { - "type": "string" - }, - "type": "array", - "example": [ - "aws_s3_bucket_cors_rules" - ] - }, - "title": { - "description": "Title of the table", - "type": "string", - "example": "AWS S3 Buckets" - } - }, - "title": "CloudQuery Plugin Table", - "type": "object" - }, "PluginTableColumn": { "additionalProperties": false, "description": "CloudQuery Plugin Column", @@ -3064,7 +3021,7 @@ "not_null", "primary_key", "type", - "is_unique" + "unique" ], "properties": { "description": { @@ -3091,7 +3048,7 @@ "description": "Arrow Type of the column", "type": "string" }, - "is_unique": { + "unique": { "description": "Whether the column has a unique constraint", "type": "boolean" } @@ -3099,6 +3056,55 @@ "title": "CloudQuery Plugin Table Column", "type": "object" }, + "PluginTableCreate": { + "additionalProperties": false, + "description": "CloudQuery Plugin Table", + "required": [ + "name" + ], + "properties": { + "description": { + "description": "Description of the table", + "type": "string", + "example": "AWS S3 Buckets" + }, + "is_incremental": { + "description": "Whether the table is incremental", + "type": "boolean" + }, + "name": { + "$ref": "#/components/schemas/PluginTableName" + }, + "parent": { + "description": "Name of the parent table, if any", + "type": "string", + "example": "nil" + }, + "relations": { + "description": "Names of the tables that depend on this table", + "items": { + "type": "string" + }, + "type": "array", + "example": [ + "aws_s3_bucket_cors_rules" + ] + }, + "title": { + "description": "Title of the table", + "type": "string", + "example": "AWS S3 Buckets" + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginTableColumn" + } + } + }, + "title": "CloudQuery Plugin Table", + "type": "object" + }, "PluginTableDetails": { "additionalProperties": false, "required": [ From 3d580d6bf36fb586c4ebf48dffc0183ae695e40a Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 5 Oct 2023 17:35:24 +0300 Subject: [PATCH 021/343] chore(main): Release v1.2.4 (#26) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e5f3cc..075ac8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.3...v1.2.4) (2023-10-05) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#25](https://github.com/cloudquery/cloudquery-api-go/issues/25)) ([5cb006d](https://github.com/cloudquery/cloudquery-api-go/commit/5cb006de422fcd6e6014315f428c6eddf7c4813c)) + ## [1.2.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.2...v1.2.3) (2023-10-04) From 20fff2c3e447a8a198b8906ca47b33936c4fadff Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:05:47 +0300 Subject: [PATCH 022/343] fix: Generate CloudQuery Go API Client from `spec.json` (#27) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ models.gen.go | 28 +++++++++++++++++++++----- spec.json | 54 ++++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 82 insertions(+), 8 deletions(-) diff --git a/client.gen.go b/client.gen.go index a92178e..3b0abda 100644 --- a/client.gen.go +++ b/client.gen.go @@ -3912,6 +3912,7 @@ type UpdatePluginResponse struct { JSON400 *BadRequest JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -5732,6 +5733,13 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index c30f70e..e7a593a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -224,8 +224,11 @@ type Plugin struct { CreatedAt time.Time `json:"created_at"` // DisplayName The plugin's display name - DisplayName string `json:"display_name"` - Homepage *string `json:"homepage,omitempty"` + DisplayName string `json:"display_name"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + Homepage *string `json:"homepage,omitempty"` // Kind The kind of plugin, ie. source or destination. Kind PluginKind `json:"kind"` @@ -247,6 +250,9 @@ type Plugin struct { // Tier Supported tiers for plugins Tier PluginTier `json:"tier"` + + // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow string `json:"usd_per_row"` } // PluginCategory Supported categories for plugins @@ -258,8 +264,11 @@ type PluginCreate struct { Category PluginCategory `json:"category"` // DisplayName The plugin's display name, as shown in the CloudQuery Hub. - DisplayName string `json:"display_name"` - Homepage *string `json:"homepage,omitempty"` + DisplayName string `json:"display_name"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth *int64 `json:"free_rows_per_month,omitempty"` + Homepage *string `json:"homepage,omitempty"` // Kind The kind of plugin, ie. source or destination. Kind PluginKind `json:"kind"` @@ -282,6 +291,9 @@ type PluginCreate struct { // Tier Supported tiers for plugins Tier PluginTier `json:"tier"` + + // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow *string `json:"usd_per_row,omitempty"` } // PluginDocsPage CloudQuery Plugin Documentation Page @@ -428,7 +440,10 @@ type PluginUpdate struct { // DisplayName The plugin's display name, as shown in the CloudQuery Hub. DisplayName *string `json:"display_name,omitempty"` - Homepage *string `json:"homepage,omitempty"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth *int64 `json:"free_rows_per_month,omitempty"` + Homepage *string `json:"homepage,omitempty"` // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... Logo *string `json:"logo,omitempty"` @@ -442,6 +457,9 @@ type PluginUpdate struct { // Tier Supported tiers for plugins Tier *PluginTier `json:"tier,omitempty"` + + // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow *string `json:"usd_per_row,omitempty"` } // PluginVersion CloudQuery Plugin Version diff --git a/spec.json b/spec.json index 9822056..010522e 100644 --- a/spec.json +++ b/spec.json @@ -133,7 +133,9 @@ "official": true, "short_description": "Sync data from AWS to any destination", "repository": "https://github.com/cloudquery/cloudquery", - "tier": "free" + "tier": "paid", + "usd_per_row": "0.00123", + "free_rows_per_month": 10000 } ] }, @@ -288,6 +290,9 @@ "404": { "$ref": "#/components/responses/NotFound" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -1443,7 +1448,9 @@ "official": true, "short_description": "Sync data from AWS to any destination", "repository": "https://github.com/cloudquery/cloudquery", - "tier": "free" + "tier": "paid", + "usd_per_row": "0.00123", + "free_rows_per_month": 10000 } ] }, @@ -2596,6 +2603,19 @@ "public": { "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", "type": "boolean" + }, + "usd_per_row": { + "type": "string", + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price per row in USD. This is used to calculate the price of a sync.", + "example": "0.0001", + "x-go-name": "USDPerRow" + }, + "free_rows_per_month": { + "type": "integer", + "format": "int64", + "description": "The number of rows that can be synced for free each month.", + "example": 1000 } }, "required": [ @@ -2608,7 +2628,9 @@ "display_name", "official", "short_description", - "tier" + "tier", + "usd_per_row", + "free_rows_per_month" ], "title": "CloudQuery Plugin", "type": "object" @@ -2683,6 +2705,19 @@ "type": "string", "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", "example": "https://images.cloudquery.io/logos/aws.png" + }, + "usd_per_row": { + "type": "string", + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price per row in USD. This is used to calculate the price of a sync.", + "example": "0.0001", + "x-go-name": "USDPerRow" + }, + "free_rows_per_month": { + "type": "integer", + "format": "int64", + "description": "The number of rows that can be synced for free each month.", + "example": 1000 } } }, @@ -2749,6 +2784,19 @@ "public": { "type": "boolean", "description": "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub." + }, + "usd_per_row": { + "type": "string", + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price per row in USD. This is used to calculate the price of a sync.", + "example": "0.0001", + "x-go-name": "USDPerRow" + }, + "free_rows_per_month": { + "type": "integer", + "format": "int64", + "description": "The number of rows that can be synced for free each month.", + "example": 1000 } } }, From 4a9ee3f1be8e24928e3d1ed9bb5bae97d3e81ebd Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 9 Oct 2023 07:56:48 +0200 Subject: [PATCH 023/343] chore: Remove scheduled generation of API client --- .github/workflows/gen-client.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 2cd3ab9..189f176 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -1,7 +1,5 @@ name: Generate API Client on: - schedule: - - cron: '0 8 * * *' workflow_dispatch: jobs: From 76562e640269dce76d44f542d3c3ecc97f7bfd19 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 9 Oct 2023 11:56:48 +0300 Subject: [PATCH 024/343] chore(main): Release v1.2.5 (#28) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 075ac8b..574fa46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.4...v1.2.5) (2023-10-09) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#27](https://github.com/cloudquery/cloudquery-api-go/issues/27)) ([20fff2c](https://github.com/cloudquery/cloudquery-api-go/commit/20fff2c3e447a8a198b8906ca47b33936c4fadff)) + ## [1.2.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.3...v1.2.4) (2023-10-05) From 0bc90d51cac329115d2172811c749eb4cbe27ba1 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:56:03 +0300 Subject: [PATCH 025/343] fix: Generate CloudQuery Go API Client from `spec.json` (#30) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 495 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 45 +++++ spec.json | 242 ++++++++++++++++++++++++ 3 files changed, 782 insertions(+) diff --git a/client.gen.go b/client.gen.go index 3b0abda..23acdb9 100644 --- a/client.gen.go +++ b/client.gen.go @@ -233,6 +233,17 @@ type ClientInterface interface { // ListPluginsByTeam request ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamPluginUsage request + ListTeamPluginUsage(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncreaseTeamPluginUsageWithBody request with any body + IncreaseTeamPluginUsageWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTeamPluginUsage request + GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListUsersByTeam request ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -890,6 +901,54 @@ func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, param return c.Client.Do(req) } +func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamPluginUsageRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncreaseTeamPluginUsageWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncreaseTeamPluginUsageRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncreaseTeamPluginUsageRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamPluginUsageRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListUsersByTeamRequest(c.Server, teamName, params) if err != nil { @@ -3276,6 +3335,142 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return req, nil } +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage +func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListUsersByTeamRequest generates requests for ListUsersByTeam func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { var err error @@ -3759,6 +3954,17 @@ type ClientWithResponsesInterface interface { // ListPluginsByTeamWithResponse request ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + // ListTeamPluginUsageWithResponse request + ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) + + // IncreaseTeamPluginUsageWithBodyWithResponse request with any body + IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + // GetTeamPluginUsageWithResponse request + GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) + // ListUsersByTeamWithResponse request ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) @@ -4794,6 +5000,88 @@ func (r ListPluginsByTeamResponse) StatusCode() int { return 0 } +type ListTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []UsageCurrent `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncreaseTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageCurrent + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r IncreaseTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncreaseTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageCurrent + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListUsersByTeamResponse struct { Body []byte HTTPResponse *http.Response @@ -5415,6 +5703,41 @@ func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, return ParseListPluginsByTeamResponse(rsp) } +// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse +func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { + rsp, err := c.ListTeamPluginUsage(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamPluginUsageResponse(rsp) +} + +// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse +func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { + rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamPluginUsageResponse(rsp) +} + // ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) @@ -7504,6 +7827,178 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo return response, nil } +// ParseListTeamPluginUsageResponse parses an HTTP response from a ListTeamPluginUsageWithResponse call +func ParseListTeamPluginUsageResponse(rsp *http.Response) (*ListTeamPluginUsageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListTeamPluginUsageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []UsageCurrent `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseIncreaseTeamPluginUsageResponse parses an HTTP response from a IncreaseTeamPluginUsageWithResponse call +func ParseIncreaseTeamPluginUsageResponse(rsp *http.Response) (*IncreaseTeamPluginUsageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &IncreaseTeamPluginUsageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UsageCurrent + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetTeamPluginUsageResponse parses an HTTP response from a GetTeamPluginUsageWithResponse call +func ParseGetTeamPluginUsageResponse(rsp *http.Response) (*GetTeamPluginUsageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTeamPluginUsageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UsageCurrent + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListUsersByTeamResponse parses an HTTP response from a ListUsersByTeamWithResponse call func ParseListUsersByTeamResponse(rsp *http.Response) (*ListUsersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index e7a593a..7d2a12b 100644 --- a/models.gen.go +++ b/models.gen.go @@ -539,6 +539,48 @@ type Team struct { // TeamName The unique name for the team. type TeamName = string +// UsageCurrent The usage of a plugin within the current calendar month. +type UsageCurrent struct { + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + + // RemainingRows The estimated number of rows remaining in the plugin's quota for the calendar month at the current price per row. This includes both free and paid rows up to the monthly limit defined for the plugin. + RemainingRows *int64 `json:"remaining_rows,omitempty"` + + // RemainingUsd The remaining USD amount in the plugin's quota for the calendar month. + RemainingUSD *string `json:"remaining_usd,omitempty"` + + // Rows The number of rows used by the plugin in the calendar month. + Rows int64 `json:"rows"` + + // Usd The USD amount used by the plugin in the calendar month, rounded to two decimal places. + USD string `json:"usd"` +} + +// UsageIncrease Increase the usage of a plugin. This can incur billing costs and should be used only by plugins. +type UsageIncrease struct { + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + + // RequestId A unique ID associated with the usage increase. + RequestId openapi_types.UUID `json:"request_id"` + + // Rows The additional rows used by the plugin. + Rows int `json:"rows"` +} + // User CloudQuery User type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -873,5 +915,8 @@ type CreateMonthlyLimitJSONRequestBody = MonthlyLimitCreate // UpdateMonthlyLimitJSONRequestBody defines body for UpdateMonthlyLimit for application/json ContentType. type UpdateMonthlyLimitJSONRequestBody = MonthlyLimitUpdate +// IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. +type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease + // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody UpdateCurrentUserJSONBody diff --git a/spec.json b/spec.json index 010522e..96e1676 100644 --- a/spec.json +++ b/spec.json @@ -46,6 +46,9 @@ }, { "name": "limits" + }, + { + "name": "usage" } ], "paths": { @@ -1844,6 +1847,159 @@ ] } }, + "/teams/{team_name}/usage": { + "get": { + "description": "List plugin usage for the current calendar month.", + "operationId": "ListTeamPluginUsage", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "responses": { + "200": { + "description": "List plugin usage for the current calendar month.", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/UsageCurrent" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "usage" + ] + }, + "post": { + "description": "Increase the usage of a plugin. This can incur billing costs and should be used only by plugin SDKs.", + "operationId": "IncreaseTeamPluginUsage", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageIncrease" + } + } + } + }, + "responses": { + "200": { + "description": "Plugin usage for the current calendar month.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageCurrent" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "usage" + ] + } + }, + "/teams/{team_name}/usage/{plugin_team}/{plugin_kind}/{plugin_name}": { + "get": { + "description": "Get plugin usage for the current calendar month.", + "operationId": "GetTeamPluginUsage", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "200": { + "description": "Plugin usage for the current calendar month.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageCurrent" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "usage" + ] + } + }, "/teams/{team_name}/invitations": { "get": { "operationId": "ListTeamInvitations", @@ -3388,6 +3544,92 @@ } } }, + "UsageCurrent": { + "title": "CloudQuery Plugin Usage", + "description": "The usage of a plugin within the current calendar month.", + "type": "object", + "additionalProperties": false, + "required": [ + "plugin_team", + "plugin_kind", + "plugin_name", + "usd", + "rows" + ], + "properties": { + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + }, + "rows": { + "example": 1000000, + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "The number of rows used by the plugin in the calendar month." + }, + "usd": { + "type": "string", + "example": "43.95", + "description": "The USD amount used by the plugin in the calendar month, rounded to two decimal places.", + "x-go-name": "USD" + }, + "remaining_usd": { + "type": "string", + "example": "56.05", + "description": "The remaining USD amount in the plugin's quota for the calendar month.", + "x-go-name": "RemainingUSD" + }, + "remaining_rows": { + "example": 1000000, + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "The estimated number of rows remaining in the plugin's quota for the calendar month at the current price per row. This includes both free and paid rows up to the monthly limit defined for the plugin." + } + } + }, + "UsageIncrease": { + "title": "CloudQuery Plugin Usage Increase", + "description": "Increase the usage of a plugin. This can incur billing costs and should be used only by plugins.", + "type": "object", + "additionalProperties": false, + "required": [ + "plugin_team", + "plugin_kind", + "plugin_name", + "rows", + "request_id" + ], + "properties": { + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + }, + "rows": { + "example": 1000000, + "type": "integer", + "minimum": 0, + "description": "The additional rows used by the plugin." + }, + "request_id": { + "type": "string", + "format": "uuid", + "description": "A unique ID associated with the usage increase.", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + } + }, "Invitation": { "additionalProperties": false, "required": [ From 2b19e45d10abc04e2ed62877dc8069eba8962b01 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:56:47 +0300 Subject: [PATCH 026/343] chore(main): Release v1.2.6 (#31) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 574fa46..4ebc46b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.5...v1.2.6) (2023-10-09) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#30](https://github.com/cloudquery/cloudquery-api-go/issues/30)) ([0bc90d5](https://github.com/cloudquery/cloudquery-api-go/commit/0bc90d51cac329115d2172811c749eb4cbe27ba1)) + ## [1.2.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.4...v1.2.5) (2023-10-09) From 164f267ef22a68e9252f3a75b56b6e09adfd29ca Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:25:54 +0300 Subject: [PATCH 027/343] fix: Generate CloudQuery Go API Client from `spec.json` (#33) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 56 ++++++++++++++++++++++++++++++++++++++++++--------- models.gen.go | 50 +++++++++++++++++++++++++++++++++++++++++++++ spec.json | 33 ++++++++++++++++++++++++------ 3 files changed, 124 insertions(+), 15 deletions(-) diff --git a/client.gen.go b/client.gen.go index 23acdb9..b18821c 100644 --- a/client.gen.go +++ b/client.gen.go @@ -234,7 +234,7 @@ type ClientInterface interface { ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeamPluginUsage request - ListTeamPluginUsage(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) // IncreaseTeamPluginUsageWithBody request with any body IncreaseTeamPluginUsageWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -901,8 +901,8 @@ func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, param return c.Client.Do(req) } -func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeamPluginUsageRequest(c.Server, teamName) +func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -3336,7 +3336,7 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } // NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage -func NewListTeamPluginUsageRequest(server string, teamName TeamName) (*http.Request, error) { +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error var pathParam0 string @@ -3361,6 +3361,44 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName) (*http.Requ return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -3955,7 +3993,7 @@ type ClientWithResponsesInterface interface { ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) // ListTeamPluginUsageWithResponse request - ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) + ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) // IncreaseTeamPluginUsageWithBodyWithResponse request with any body IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) @@ -4011,7 +4049,7 @@ type ListPluginsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []Plugin `json:"items"` + Items []ListPlugin `json:"items"` Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication @@ -5704,8 +5742,8 @@ func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, } // ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse -func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { - rsp, err := c.ListTeamPluginUsage(ctx, teamName, reqEditors...) +func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { + rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } @@ -5832,7 +5870,7 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Plugin `json:"items"` + Items []ListPlugin `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 7d2a12b..9ba7f12 100644 --- a/models.gen.go +++ b/models.gen.go @@ -159,6 +159,47 @@ type ListMetadata struct { TotalCount *int `json:"total_count,omitempty"` } +// ListPlugin defines model for ListPlugin. +type ListPlugin struct { + // Category Supported categories for plugins + Category PluginCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` + + // DisplayName The plugin's display name + DisplayName string `json:"display_name"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + Homepage *string `json:"homepage,omitempty"` + + // Kind The kind of plugin, ie. source or destination. + Kind PluginKind `json:"kind"` + + // LatestVersion The version in semantic version format. + LatestVersion *VersionName `json:"latest_version,omitempty"` + Logo string `json:"logo"` + + // Name The unique name for the plugin. + Name PluginName `json:"name"` + + // Official True if the plugin is maintained by CloudQuery, false otherwise + Official bool `json:"official"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier Supported tiers for plugins + Tier PluginTier `json:"tier"` + + // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow string `json:"usd_per_row"` +} + // MembershipWithTeam defines model for MembershipWithTeam. type MembershipWithTeam struct { Role string `json:"role"` @@ -837,6 +878,15 @@ type ListPluginsByTeamParams struct { IncludePrivate *IncludePrivate `form:"include_private,omitempty" json:"include_private,omitempty"` } +// ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. +type ListTeamPluginUsageParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + // ListUsersByTeamParams defines parameters for ListUsersByTeam. type ListUsersByTeamParams struct { // PerPage The number of results per page (max 1000). diff --git a/spec.json b/spec.json index 96e1676..6e782e1 100644 --- a/spec.json +++ b/spec.json @@ -120,7 +120,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/Plugin" + "$ref": "#/components/schemas/ListPlugin" }, "type": "array", "example": [ @@ -1854,6 +1854,12 @@ "parameters": [ { "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" } ], "responses": { @@ -2791,6 +2797,26 @@ "title": "CloudQuery Plugin", "type": "object" }, + "VersionName": { + "type": "string", + "description": "The version in semantic version format.", + "pattern": "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" + }, + "ListPlugin": { + "allOf": [ + { + "$ref": "#/components/schemas/Plugin" + }, + { + "type": "object", + "properties": { + "latest_version": { + "$ref": "#/components/schemas/VersionName" + } + } + } + ] + }, "ListMetadata": { "properties": { "total_count": { @@ -2956,11 +2982,6 @@ } } }, - "VersionName": { - "type": "string", - "description": "The version in semantic version format.", - "pattern": "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, "PluginVersion": { "additionalProperties": false, "description": "CloudQuery Plugin Version", From 0e7c53af8de91c99a9a731da0a5f4de2049ff192 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:28:28 +0300 Subject: [PATCH 028/343] chore(main): Release v1.2.7 (#34) :robot: I have created a release *beep* *boop* --- ## [1.2.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.6...v1.2.7) (2023-10-12) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#33](https://github.com/cloudquery/cloudquery-api-go/issues/33)) ([164f267](https://github.com/cloudquery/cloudquery-api-go/commit/164f267ef22a68e9252f3a75b56b6e09adfd29ca)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebc46b..142c45d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.6...v1.2.7) (2023-10-12) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#33](https://github.com/cloudquery/cloudquery-api-go/issues/33)) ([164f267](https://github.com/cloudquery/cloudquery-api-go/commit/164f267ef22a68e9252f3a75b56b6e09adfd29ca)) + ## [1.2.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.5...v1.2.6) (2023-10-09) From ca1947be7d9d350a06a84dffcb08b3142ece2407 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:09:49 +0300 Subject: [PATCH 029/343] fix: Generate CloudQuery Go API Client from `spec.json` (#35) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 12 ------------ spec.json | 24 +----------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/models.gen.go b/models.gen.go index 9ba7f12..f42161e 100644 --- a/models.gen.go +++ b/models.gen.go @@ -344,12 +344,6 @@ type PluginDocsPage struct { // Name The unique name for the plugin documentation page. Name PluginDocsPageName `json:"name"` - - // OrdinalPosition The position of the page in the documentation - OrdinalPosition *int `json:"ordinal_position,omitempty"` - - // Title The title of the documentation page - Title string `json:"title"` } // PluginDocsPageCreate CloudQuery Plugin Documentation Page @@ -359,12 +353,6 @@ type PluginDocsPageCreate struct { // Name The unique name for the plugin documentation page. Name PluginDocsPageName `json:"name"` - - // OrdinalPosition The position of the page in the documentation - OrdinalPosition *int `json:"ordinal_position,omitempty"` - - // Title The title of the documentation page - Title string `json:"title"` } // PluginDocsPageName The unique name for the plugin documentation page. diff --git a/spec.json b/spec.json index 6e782e1..b230fb9 100644 --- a/spec.json +++ b/spec.json @@ -3116,7 +3116,7 @@ "PluginDocsPageName": { "description": "The unique name for the plugin documentation page.", "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", + "pattern": "^[\\w,\\s-]+$", "type": "string", "example": "overview" }, @@ -3125,23 +3125,12 @@ "description": "CloudQuery Plugin Documentation Page", "required": [ "name", - "title", "content" ], "properties": { "name": { "$ref": "#/components/schemas/PluginDocsPageName" }, - "title": { - "type": "string", - "description": "The title of the documentation page", - "example": "Getting Started" - }, - "ordinal_position": { - "type": "integer", - "description": "The position of the page in the documentation", - "example": 1 - }, "content": { "type": "string", "description": "The content of the documentation page. Supports markdown.", @@ -3156,23 +3145,12 @@ "description": "CloudQuery Plugin Documentation Page", "required": [ "name", - "title", "content" ], "properties": { "name": { "$ref": "#/components/schemas/PluginDocsPageName" }, - "title": { - "type": "string", - "description": "The title of the documentation page", - "example": "Getting Started" - }, - "ordinal_position": { - "type": "integer", - "description": "The position of the page in the documentation", - "example": 1 - }, "content": { "type": "string", "description": "The content of the documentation page. Supports markdown.", From c6ccb54365cf4da54b43ecc95851fd508e9b7e2d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:16:08 +0300 Subject: [PATCH 030/343] chore(main): Release v1.2.8 (#36) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 142c45d..c02deb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.7...v1.2.8) (2023-10-12) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#35](https://github.com/cloudquery/cloudquery-api-go/issues/35)) ([ca1947b](https://github.com/cloudquery/cloudquery-api-go/commit/ca1947be7d9d350a06a84dffcb08b3142ece2407)) + ## [1.2.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.6...v1.2.7) (2023-10-12) From 4a4f8997c4457634b94e0740727f6a2f5a80b795 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:33:34 +0300 Subject: [PATCH 031/343] fix: Generate CloudQuery Go API Client from `spec.json` (#38) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 5815 ++++++++++++++++++++++++++++++++++--------------- models.gen.go | 316 ++- spec.json | 2812 ++++++++++++++++-------- 3 files changed, 6295 insertions(+), 2648 deletions(-) diff --git a/client.gen.go b/client.gen.go index b18821c..726b20b 100644 --- a/client.gen.go +++ b/client.gen.go @@ -92,6 +92,47 @@ type ClientInterface interface { // HealthCheck request HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListAddons request + ListAddons(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateAddonWithBody request with any body + CreateAddonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAddon(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteAddonByTeamAndName request + DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddon request + GetAddon(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateAddonWithBody request with any body + UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateAddon(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListAddonVersions request + ListAddonVersions(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddonVersion request + GetAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateAddonVersionWithBody request with any body + UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateAddonVersionWithBody request with any body + CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DownloadAddonAsset request + DownloadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UploadAddonAsset request + UploadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPlugins request ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -178,6 +219,12 @@ type ClientInterface interface { UpdateTeam(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteAddonsByTeam request + DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListAddonsByTeam request + ListAddonsByTeam(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamAPIKeys request ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -277,6 +324,186 @@ func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) return c.Client.Do(req) } +func (c *Client) ListAddons(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateAddonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateAddon(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddonByTeamAndNameRequest(c.Server, teamName, addonName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetAddon(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonRequest(c.Server, teamName, addonName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonRequestWithBody(c.Server, teamName, addonName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAddon(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonRequest(c.Server, teamName, addonName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListAddonVersions(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonVersionsRequest(c.Server, teamName, addonName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonVersionRequest(c.Server, teamName, addonName, versionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonVersionRequestWithBody(c.Server, teamName, addonName, versionName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonVersionRequest(c.Server, teamName, addonName, versionName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonVersionRequestWithBody(c.Server, teamName, addonName, versionName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonVersionRequest(c.Server, teamName, addonName, versionName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DownloadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadAddonAssetRequest(c.Server, teamName, addonName, versionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UploadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadAddonAssetRequest(c.Server, teamName, addonName, versionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginsRequest(c.Server, params) if err != nil { @@ -661,6 +888,30 @@ func (c *Client) UpdateTeam(ctx context.Context, teamName TeamName, body UpdateT return c.Client.Do(req) } +func (c *Client) DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddonsByTeamRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListAddonsByTeam(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonsByTeamRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamAPIKeysRequest(c.Server, teamName, params) if err != nil { @@ -1060,8 +1311,8 @@ func NewHealthCheckRequest(server string) (*http.Request, error) { return req, nil } -// NewListPluginsRequest generates requests for ListPlugins -func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Request, error) { +// NewListAddonsRequest generates requests for ListAddons +func NewListAddonsRequest(server string, params *ListAddonsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1069,7 +1320,7 @@ func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Requ return nil, err } - operationPath := fmt.Sprintf("/plugins") + operationPath := fmt.Sprintf("/addons") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1141,19 +1392,19 @@ func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Requ return req, nil } -// NewCreatePluginRequest calls the generic CreatePlugin builder with application/json body -func NewCreatePluginRequest(server string, body CreatePluginJSONRequestBody) (*http.Request, error) { +// NewCreateAddonRequest calls the generic CreateAddon builder with application/json body +func NewCreateAddonRequest(server string, body CreateAddonJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginRequestWithBody(server, "application/json", bodyReader) + return NewCreateAddonRequestWithBody(server, "application/json", bodyReader) } -// NewCreatePluginRequestWithBody generates requests for CreatePlugin with any type of body -func NewCreatePluginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateAddonRequestWithBody generates requests for CreateAddon with any type of body +func NewCreateAddonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -1161,7 +1412,7 @@ func NewCreatePluginRequestWithBody(server string, contentType string, body io.R return nil, err } - operationPath := fmt.Sprintf("/plugins") + operationPath := fmt.Sprintf("/addons") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1181,8 +1432,8 @@ func NewCreatePluginRequestWithBody(server string, contentType string, body io.R return req, nil } -// NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName -func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewDeleteAddonByTeamAndNameRequest generates requests for DeleteAddonByTeamAndName +func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonName AddonName) (*http.Request, error) { var err error var pathParam0 string @@ -1194,14 +1445,7 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1211,7 +1455,7 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1229,8 +1473,8 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, return req, nil } -// NewGetPluginRequest generates requests for GetPlugin -func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewGetAddonRequest generates requests for GetAddon +func NewGetAddonRequest(server string, teamName TeamName, addonName AddonName) (*http.Request, error) { var err error var pathParam0 string @@ -1242,14 +1486,7 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1259,7 +1496,7 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1277,19 +1514,19 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind return req, nil } -// NewUpdatePluginRequest calls the generic UpdatePlugin builder with application/json body -func NewUpdatePluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { +// NewUpdateAddonRequest calls the generic UpdateAddon builder with application/json body +func NewUpdateAddonRequest(server string, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdatePluginRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) + return NewUpdateAddonRequestWithBody(server, teamName, addonName, "application/json", bodyReader) } -// NewUpdatePluginRequestWithBody generates requests for UpdatePlugin with any type of body -func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateAddonRequestWithBody generates requests for UpdateAddon with any type of body +func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonName AddonName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1301,14 +1538,7 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1318,7 +1548,7 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1338,8 +1568,8 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind return req, nil } -// NewListPluginVersionsRequest generates requests for ListPluginVersions -func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { +// NewListAddonVersionsRequest generates requests for ListAddonVersions +func NewListAddonVersionsRequest(server string, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams) (*http.Request, error) { var err error var pathParam0 string @@ -1351,14 +1581,7 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1368,7 +1591,7 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s/versions", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1456,8 +1679,8 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P return req, nil } -// NewGetPluginVersionRequest generates requests for GetPluginVersion -func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { +// NewGetAddonVersionRequest generates requests for GetAddonVersion +func NewGetAddonVersionRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1469,21 +1692,14 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind Plu var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1493,7 +1709,7 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind Plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1511,19 +1727,19 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind Plu return req, nil } -// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body -func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { +// NewUpdateAddonVersionRequest calls the generic UpdateAddonVersion builder with application/json body +func NewUpdateAddonVersionRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewUpdateAddonVersionRequestWithBody(server, teamName, addonName, versionName, "application/json", bodyReader) } -// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body -func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateAddonVersionRequestWithBody generates requests for UpdateAddonVersion with any type of body +func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1535,21 +1751,14 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1559,7 +1768,7 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1579,19 +1788,19 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu return req, nil } -// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body -func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { +// NewCreateAddonVersionRequest calls the generic CreateAddonVersion builder with application/json body +func NewCreateAddonVersionRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewCreateAddonVersionRequestWithBody(server, teamName, addonName, versionName, "application/json", bodyReader) } -// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body -func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateAddonVersionRequestWithBody generates requests for CreateAddonVersion with any type of body +func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1603,21 +1812,14 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1627,7 +1829,7 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1647,8 +1849,8 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu return req, nil } -// NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset -func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { +// NewDownloadAddonAssetRequest generates requests for DownloadAddonAsset +func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1660,28 +1862,14 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - - var pathParam4 string - - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1691,7 +1879,7 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1709,8 +1897,8 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind return req, nil } -// NewUploadPluginAssetRequest generates requests for UploadPluginAsset -func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { +// NewUploadAddonAssetRequest generates requests for UploadAddonAsset +func NewUploadAddonAssetRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1722,38 +1910,51 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind Pl var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam4 string + operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } + return req, nil +} + +// NewListPluginsRequest generates requests for ListPlugins +func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + operationPath := fmt.Sprintf("/plugins") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1763,7 +1964,61 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind Pl return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + if params != nil { + queryValues := queryURL.Query() + + if params.SortBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -1771,19 +2026,48 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind Pl return req, nil } -// NewDeletePluginVersionDocsRequest calls the generic DeletePluginVersionDocs builder with application/json body -func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { +// NewCreatePluginRequest calls the generic CreatePlugin builder with application/json body +func NewCreatePluginRequest(server string, body CreatePluginJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewCreatePluginRequestWithBody(server, "application/json", bodyReader) } -// NewDeletePluginVersionDocsRequestWithBody generates requests for DeletePluginVersionDocs with any type of body -func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePluginRequestWithBody generates requests for CreatePlugin with any type of body +func NewCreatePluginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName +func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -1807,19 +2091,12 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1829,18 +2106,16 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListPluginVersionDocsRequest generates requests for ListPluginVersionDocs -func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { +// NewGetPluginRequest generates requests for GetPlugin +func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -1864,19 +2139,12 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKin return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1886,44 +2154,6 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKin return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -1932,19 +2162,19 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKin return req, nil } -// NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body -func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { +// NewUpdatePluginRequest calls the generic UpdatePlugin builder with application/json body +func NewUpdatePluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewUpdatePluginRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) } -// NewCreatePluginVersionDocsRequestWithBody generates requests for CreatePluginVersionDocs with any type of body -func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdatePluginRequestWithBody generates requests for UpdatePlugin with any type of body +func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1968,19 +2198,12 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1990,7 +2213,7 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -2000,19 +2223,126 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, return req, nil } -// NewDeletePluginVersionTablesRequest calls the generic DeletePluginVersionTables builder with application/json body -func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewListPluginVersionsRequest generates requests for ListPluginVersions +func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.SortBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeDrafts != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil } -// NewDeletePluginVersionTablesRequestWithBody generates requests for DeletePluginVersionTables with any type of body -func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetPluginVersionRequest generates requests for GetPluginVersion +func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -2048,7 +2378,7 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2058,18 +2388,27 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListPluginVersionTablesRequest generates requests for ListPluginVersionTables -func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { +// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body +func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body +func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2105,7 +2444,7 @@ func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginK return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2115,65 +2454,29 @@ func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginK return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCreatePluginVersionTablesRequest calls the generic CreatePluginVersionTables builder with application/json body -func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { +// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body +func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewCreatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } -// NewCreatePluginVersionTablesRequestWithBody generates requests for CreatePluginVersionTables with any type of body -func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body +func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2209,7 +2512,7 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2229,8 +2532,8 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam return req, nil } -// NewGetPluginVersionTableRequest generates requests for GetPluginVersionTable -func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { +// NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset +func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { var err error var pathParam0 string @@ -2263,7 +2566,7 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin var pathParam4 string - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) if err != nil { return nil, err } @@ -2273,7 +2576,7 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2291,16 +2594,51 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return req, nil } -// NewListTeamsRequest generates requests for ListTeams -func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { +// NewUploadPluginAssetRequest generates requests for UploadPluginAsset +func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams") + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2310,99 +2648,53 @@ func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } return req, nil } -// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body -func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { +// NewDeletePluginVersionDocsRequest calls the generic DeletePluginVersionDocs builder with application/json body +func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) + return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } -// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body -func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewDeletePluginVersionDocsRequestWithBody generates requests for DeletePluginVersionDocs with any type of body +func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetTeamByNameRequest generates requests for GetTeamByName -func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string + var pathParam3 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -2412,7 +2704,7 @@ func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, e return nil, err } - operationPath := fmt.Sprintf("/teams/%s", pathParam0) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2422,27 +2714,18 @@ func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, e return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewUpdateTeamRequest calls the generic UpdateTeam builder with application/json body -func NewUpdateTeamRequest(server string, teamName TeamName, body UpdateTeamJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateTeamRequestWithBody(server, teamName, "application/json", bodyReader) + return req, nil } -// NewUpdateTeamRequestWithBody generates requests for UpdateTeam with any type of body -func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewListPluginVersionDocsRequest generates requests for ListPluginVersionDocs +func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { var err error var pathParam0 string @@ -2452,38 +2735,23 @@ func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType return nil, err } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys -func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { - var err error - - var pathParam0 string + var pathParam3 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -2493,7 +2761,7 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2506,9 +2774,9 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea if params != nil { queryValues := queryURL.Query() - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2522,9 +2790,9 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea } - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2549,19 +2817,19 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea return req, nil } -// NewCreateTeamAPIKeyRequest calls the generic CreateTeamAPIKey builder with application/json body -func NewCreateTeamAPIKeyRequest(server string, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody) (*http.Request, error) { +// NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body +func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateTeamAPIKeyRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } -// NewCreateTeamAPIKeyRequestWithBody generates requests for CreateTeamAPIKey with any type of body -func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePluginVersionDocsRequestWithBody generates requests for CreatePluginVersionDocs with any type of body +func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2571,12 +2839,33 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2586,7 +2875,7 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -2596,8 +2885,19 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten return req, nil } -// NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey -func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName APIKeyPathName) (*http.Request, error) { +// NewDeletePluginVersionTablesRequest calls the generic DeletePluginVersionTables builder with application/json body +func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewDeletePluginVersionTablesRequestWithBody generates requests for DeletePluginVersionTables with any type of body +func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2609,7 +2909,21 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, aPIKeyPathName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -2619,7 +2933,7 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2629,16 +2943,18 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListTeamInvitationsRequest generates requests for ListTeamInvitations -func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { +// NewListPluginVersionTablesRequest generates requests for ListPluginVersionTables +func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { var err error var pathParam0 string @@ -2648,12 +2964,33 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2709,19 +3046,19 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body -func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { +// NewCreatePluginVersionTablesRequest calls the generic CreatePluginVersionTables builder with application/json body +func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } -// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body -func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePluginVersionTablesRequestWithBody generates requests for CreatePluginVersionTables with any type of body +func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2731,49 +3068,23 @@ func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, con return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam2 string - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body -func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body -func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - var pathParam0 string + var pathParam3 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -2783,7 +3094,7 @@ func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, co return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2793,7 +3104,7 @@ func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, co return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -2803,8 +3114,8 @@ func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, co return req, nil } -// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation -func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Email) (*http.Request, error) { +// NewGetPluginVersionTableRequest generates requests for GetPluginVersionTable +func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { var err error var pathParam0 string @@ -2816,41 +3127,28 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam2 string - queryURL, err := serverURL.Parse(operationPath) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } - return req, nil -} - -// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships -func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { - var err error - - var pathParam0 string + var pathParam4 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) if err != nil { return nil, err } @@ -2860,7 +3158,7 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2870,44 +3168,6 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -2916,23 +3176,16 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return req, nil } -// NewListMonthlyLimitsByTeamRequest generates requests for ListMonthlyLimitsByTeam -func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params *ListMonthlyLimitsByTeamParams) (*http.Request, error) { +// NewListTeamsRequest generates requests for ListTeams +func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) + operationPath := fmt.Sprintf("/teams") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2945,9 +3198,9 @@ func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2961,9 +3214,9 @@ func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params } - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2988,34 +3241,27 @@ func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params return req, nil } -// NewCreateMonthlyLimitRequest calls the generic CreateMonthlyLimit builder with application/json body -func NewCreateMonthlyLimitRequest(server string, teamName TeamName, body CreateMonthlyLimitJSONRequestBody) (*http.Request, error) { +// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body +func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateMonthlyLimitRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) } -// NewCreateMonthlyLimitRequestWithBody generates requests for CreateMonthlyLimit with any type of body -func NewCreateMonthlyLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body +func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) + operationPath := fmt.Sprintf("/teams") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3035,8 +3281,8 @@ func NewCreateMonthlyLimitRequestWithBody(server string, teamName TeamName, cont return req, nil } -// NewDeleteMonthlyLimitRequest generates requests for DeleteMonthlyLimit -func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewGetTeamByNameRequest generates requests for GetTeamByName +func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -3046,33 +3292,12 @@ func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam P return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3082,7 +3307,7 @@ func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam P return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -3090,34 +3315,24 @@ func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam P return req, nil } -// NewGetMonthlyLimitRequest generates requests for GetMonthlyLimit -func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) +// NewUpdateTeamRequest calls the generic UpdateTeam builder with application/json body +func NewUpdateTeamRequest(server string, teamName TeamName, body UpdateTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewUpdateTeamRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } +// NewUpdateTeamRequestWithBody generates requests for UpdateTeam with any type of body +func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - var pathParam3 string + var pathParam0 string - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -3127,7 +3342,7 @@ func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam Plug return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3137,27 +3352,18 @@ func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam Plug return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewUpdateMonthlyLimitRequest calls the generic UpdateMonthlyLimit builder with application/json body -func NewUpdateMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateMonthlyLimitRequestWithBody(server, teamName, pluginTeam, pluginKind, pluginName, "application/json", bodyReader) + return req, nil } -// NewUpdateMonthlyLimitRequestWithBody generates requests for UpdateMonthlyLimit with any type of body -func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteAddonsByTeamRequest generates requests for DeleteAddonsByTeam +func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -3167,23 +3373,36 @@ func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, plug return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + return req, nil +} + +// NewListAddonsByTeamRequest generates requests for ListAddonsByTeam +func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAddonsByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -3193,77 +3412,7 @@ func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, plug return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PUT", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam -func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam -func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3335,8 +3484,8 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return req, nil } -// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage -func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { +// NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys +func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { var err error var pathParam0 string @@ -3351,7 +3500,7 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3364,9 +3513,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3380,9 +3529,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis } - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3407,19 +3556,19 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body -func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { +// NewCreateTeamAPIKeyRequest calls the generic CreateTeamAPIKey builder with application/json body +func NewCreateTeamAPIKeyRequest(server string, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateTeamAPIKeyRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body -func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateTeamAPIKeyRequestWithBody generates requests for CreateTeamAPIKey with any type of body +func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -3434,7 +3583,7 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3454,8 +3603,8 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return req, nil } -// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage -func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey +func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName APIKeyPathName) (*http.Request, error) { var err error var pathParam0 string @@ -3467,21 +3616,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, aPIKeyPathName) if err != nil { return nil, err } @@ -3491,7 +3626,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/apikeys/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3501,7 +3636,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -3509,8 +3644,8 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return req, nil } -// NewListUsersByTeamRequest generates requests for ListUsersByTeam -func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { +// NewListTeamInvitationsRequest generates requests for ListTeamInvitations +func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { var err error var pathParam0 string @@ -3525,7 +3660,7 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return nil, err } - operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3538,9 +3673,9 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse if params != nil { queryValues := queryURL.Query() - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3554,9 +3689,9 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse } - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3581,16 +3716,34 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return req, nil } -// NewUploadImageRequest generates requests for UploadImage -func NewUploadImageRequest(server string) (*http.Request, error) { +// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body +func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body +func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/upload/image") + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3600,24 +3753,44 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { +// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body +func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body +func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3627,35 +3800,40 @@ func NewGetCurrentUserRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body -func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation +func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Email) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) -} -// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body -func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3665,26 +3843,31 @@ func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations -func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { +// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships +func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/invitations") + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3740,16 +3923,23 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser return req, nil } -// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships -func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { +// NewListMonthlyLimitsByTeamRequest generates requests for ListMonthlyLimitsByTeam +func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params *ListMonthlyLimitsByTeamParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/memberships") + operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3805,727 +3995,1882 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } +// NewCreateMonthlyLimitRequest calls the generic CreateMonthlyLimit builder with application/json body +func NewCreateMonthlyLimitRequest(server string, teamName TeamName, body CreateMonthlyLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil + bodyReader = bytes.NewReader(buf) + return NewCreateMonthlyLimitRequestWithBody(server, teamName, "application/json", bodyReader) } -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} +// NewCreateMonthlyLimitRequestWithBody generates requests for CreateMonthlyLimit with any type of body +func NewCreateMonthlyLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // HealthCheckWithResponse request - HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - // ListPluginsWithResponse request - ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // CreatePluginWithBodyWithResponse request with any body - CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - // DeletePluginByTeamAndPluginNameWithResponse request - DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + req.Header.Add("Content-Type", contentType) - // GetPluginWithResponse request - GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + return req, nil +} - // UpdatePluginWithBodyWithResponse request with any body - UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) +// NewDeleteMonthlyLimitRequest generates requests for DeleteMonthlyLimit +func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error - UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + var pathParam0 string - // ListPluginVersionsWithResponse request - ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - // GetPluginVersionWithResponse request - GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + var pathParam1 string - // UpdatePluginVersionWithBodyWithResponse request with any body - UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } - UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + var pathParam2 string - // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + var pathParam3 string - // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } - // UploadPluginAssetWithResponse request - UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // DeletePluginVersionDocsWithBodyWithResponse request with any body - DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ListPluginVersionDocsWithResponse request - ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CreatePluginVersionDocsWithBodyWithResponse request with any body - CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + return req, nil +} - CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) +// NewGetMonthlyLimitRequest generates requests for GetMonthlyLimit +func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error - // DeletePluginVersionTablesWithBodyWithResponse request with any body - DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + var pathParam0 string - DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - // ListPluginVersionTablesWithResponse request - ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + var pathParam1 string - // CreatePluginVersionTablesWithBodyWithResponse request with any body - CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } - CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + var pathParam2 string - // GetPluginVersionTableWithResponse request - GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } - // ListTeamsWithResponse request - ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + var pathParam3 string - // CreateTeamWithBodyWithResponse request with any body - CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } - CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // GetTeamByNameWithResponse request - GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // UpdateTeamWithBodyWithResponse request with any body - UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // ListTeamAPIKeysWithResponse request - ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + return req, nil +} - // CreateTeamAPIKeyWithBodyWithResponse request with any body - CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) +// NewUpdateMonthlyLimitRequest calls the generic UpdateMonthlyLimit builder with application/json body +func NewUpdateMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateMonthlyLimitRequestWithBody(server, teamName, pluginTeam, pluginKind, pluginName, "application/json", bodyReader) +} - CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) +// NewUpdateMonthlyLimitRequestWithBody generates requests for UpdateMonthlyLimit with any type of body +func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { + var err error - // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + var pathParam0 string - // ListTeamInvitationsWithResponse request - ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - // EmailTeamInvitationWithBodyWithResponse request with any body - EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + var pathParam1 string - EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } - // AcceptTeamInvitationWithBodyWithResponse request with any body - AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + var pathParam2 string - AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } - // CancelTeamInvitationWithResponse request - CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + var pathParam3 string - // GetTeamMembershipsWithResponse request - GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } - // ListMonthlyLimitsByTeamWithResponse request - ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CreateMonthlyLimitWithBodyWithResponse request with any body - CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // DeleteMonthlyLimitWithResponse request - DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - // GetMonthlyLimitWithResponse request - GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) + req.Header.Add("Content-Type", contentType) - // UpdateMonthlyLimitWithBodyWithResponse request with any body - UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + return req, nil +} - UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) +// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam +func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error - // DeletePluginsByTeamWithResponse request - DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + var pathParam0 string - // ListPluginsByTeamWithResponse request - ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - // ListTeamPluginUsageWithResponse request - ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // IncreaseTeamPluginUsageWithBodyWithResponse request with any body - IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // GetTeamPluginUsageWithResponse request - GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - // ListUsersByTeamWithResponse request - ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) + return req, nil +} - // UploadImageWithResponse request - UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) +// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam +func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { + var err error - // GetCurrentUserWithResponse request - GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + var pathParam0 string - // UpdateCurrentUserWithBodyWithResponse request with any body - UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ListCurrentUserInvitationsWithResponse request - ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // GetCurrentUserMembershipsWithResponse request - GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) -} + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } -type HealthCheckResponse struct { - Body []byte - HTTPResponse *http.Response -} + if params != nil { + queryValues := queryURL.Query() -// Status returns HTTPResponse.Status -func (r HealthCheckResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + if params.Page != nil { -// StatusCode returns HTTPResponse.StatusCode -func (r HealthCheckResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -type ListPluginsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []ListPlugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON500 *InternalError -} + } -// Status returns HTTPResponse.Status -func (r ListPluginsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + if params.PerPage != nil { -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -type CreatePluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Plugin - JSON400 *BadRequest - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} + } -// Status returns HTTPResponse.Status -func (r CreatePluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + if params.IncludePrivate != nil { -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -type DeletePluginByTeamAndPluginNameResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} + } -// Status returns HTTPResponse.Status -func (r DeletePluginByTeamAndPluginNameResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL.RawQuery = queryValues.Encode() } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginByTeamAndPluginNameResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return 0 -} -type GetPluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Plugin - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + return req, nil } -// Status returns HTTPResponse.Status -func (r GetPluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type UpdatePluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Plugin - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdatePluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r UpdatePluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return 0 -} -type ListPluginVersionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []PluginVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginVersionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return http.StatusText(0) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return 0 + bodyReader = bytes.NewReader(buf) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) } -type GetPluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersion - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error -// Status returns HTTPResponse.Status -func (r GetPluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type UpdatePluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersion - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } -// Status returns HTTPResponse.Status -func (r UpdatePluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r UpdatePluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err } - return 0 -} -type CreatePluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersion - JSON201 *PluginVersion - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError + req.Header.Add("Content-Type", contentType) + + return req, nil } -// Status returns HTTPResponse.Status -func (r CreatePluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage +func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err } - return 0 -} -type DownloadPluginAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} + var pathParam2 string -// Status returns HTTPResponse.Status -func (r DownloadPluginAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DownloadPluginAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err } - return 0 -} -type UploadPluginAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ReleaseURL - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } -// Status returns HTTPResponse.Status -func (r UploadPluginAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r UploadPluginAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return 0 -} -type DeletePluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 + return req, nil } -type ListPluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []PluginDocsPage `json:"items"` - Metadata ListMetadata `json:"metadata"` +// NewListUsersByTeamRequest generates requests for ListUsersByTeam +func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} -type CreatePluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r CreatePluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return 0 -} -type DeletePluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + return req, nil } -// Status returns HTTPResponse.Status -func (r DeletePluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewUploadImageRequest generates requests for UploadImage +func NewUploadImageRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/upload/image") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} -type ListPluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []PluginTable `json:"items"` - Metadata ListMetadata `json:"metadata"` + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err } - return http.StatusText(0) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type CreatePluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - Names *[]PluginTableName `json:"names,omitempty"` + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r CreatePluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return 0 -} -type GetPluginVersionTableResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginTableDetails - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + return req, nil } -// Status returns HTTPResponse.Status -func (r GetPluginVersionTableResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return http.StatusText(0) + bodyReader = bytes.NewReader(buf) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginVersionTableResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations +func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/invitations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships +func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/memberships") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // HealthCheckWithResponse request + HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) + + // ListAddonsWithResponse request + ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) + + // CreateAddonWithBodyWithResponse request with any body + CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + + CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + + // DeleteAddonByTeamAndNameWithResponse request + DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) + + // GetAddonWithResponse request + GetAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) + + // UpdateAddonWithBodyWithResponse request with any body + UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + + UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + + // ListAddonVersionsWithResponse request + ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) + + // GetAddonVersionWithResponse request + GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) + + // UpdateAddonVersionWithBodyWithResponse request with any body + UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + + UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + + // CreateAddonVersionWithBodyWithResponse request with any body + CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + + CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + + // DownloadAddonAssetWithResponse request + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + + // UploadAddonAssetWithResponse request + UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + + // ListPluginsWithResponse request + ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + + // CreatePluginWithBodyWithResponse request with any body + CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + // DeletePluginByTeamAndPluginNameWithResponse request + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + + // GetPluginWithResponse request + GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + + // UpdatePluginWithBodyWithResponse request with any body + UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + // ListPluginVersionsWithResponse request + ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + + // GetPluginVersionWithResponse request + GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + + // UpdatePluginVersionWithBodyWithResponse request with any body + UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + // CreatePluginVersionWithBodyWithResponse request with any body + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + // DownloadPluginAssetWithResponse request + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + + // UploadPluginAssetWithResponse request + UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + + // DeletePluginVersionDocsWithBodyWithResponse request with any body + DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + // ListPluginVersionDocsWithResponse request + ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + + // CreatePluginVersionDocsWithBodyWithResponse request with any body + CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + // DeletePluginVersionTablesWithBodyWithResponse request with any body + DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + // ListPluginVersionTablesWithResponse request + ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + + // CreatePluginVersionTablesWithBodyWithResponse request with any body + CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + // GetPluginVersionTableWithResponse request + GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + + // ListTeamsWithResponse request + ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + + // CreateTeamWithBodyWithResponse request with any body + CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + // GetTeamByNameWithResponse request + GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + + // UpdateTeamWithBodyWithResponse request with any body + UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + // DeleteAddonsByTeamWithResponse request + DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) + + // ListAddonsByTeamWithResponse request + ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + + // ListTeamAPIKeysWithResponse request + ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + + // CreateTeamAPIKeyWithBodyWithResponse request with any body + CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + // DeleteTeamAPIKeyWithResponse request + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + + // ListTeamInvitationsWithResponse request + ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + + // EmailTeamInvitationWithBodyWithResponse request with any body + EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + // AcceptTeamInvitationWithBodyWithResponse request with any body + AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + // CancelTeamInvitationWithResponse request + CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + + // GetTeamMembershipsWithResponse request + GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + + // ListMonthlyLimitsByTeamWithResponse request + ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) + + // CreateMonthlyLimitWithBodyWithResponse request with any body + CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + // DeleteMonthlyLimitWithResponse request + DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) + + // GetMonthlyLimitWithResponse request + GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) + + // UpdateMonthlyLimitWithBodyWithResponse request with any body + UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + + UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + + // ListPluginsByTeamWithResponse request + ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + + // ListTeamPluginUsageWithResponse request + ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) + + // IncreaseTeamPluginUsageWithBodyWithResponse request with any body + IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + // GetTeamPluginUsageWithResponse request + GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) + + // ListUsersByTeamWithResponse request + ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) + + // UploadImageWithResponse request + UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + + // GetCurrentUserWithResponse request + GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + + // UpdateCurrentUserWithBodyWithResponse request with any body + UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + + UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + + // ListCurrentUserInvitationsWithResponse request + ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) + + // GetCurrentUserMembershipsWithResponse request + GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) +} + +type HealthCheckResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r HealthCheckResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r HealthCheckResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []Addon `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Addon + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteAddonByTeamAndNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteAddonByTeamAndNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddonByTeamAndNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Addon + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Addon + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []AddonVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON201 *AddonVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DownloadAddonAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadAddonAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadAddonAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UploadAddonAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ReleaseURL + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UploadAddonAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UploadAddonAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []ListPlugin `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Plugin + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginByTeamAndPluginNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginByTeamAndPluginNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginByTeamAndPluginNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Plugin + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdatePluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Plugin + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdatePluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatePluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []PluginVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersion + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdatePluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdatePluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatePluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersion + JSON201 *PluginVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DownloadPluginAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadPluginAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadPluginAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UploadPluginAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ReleaseURL + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UploadPluginAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UploadPluginAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []PluginDocsPage `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` + } + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []PluginTable `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Names *[]PluginTableName `json:"names,omitempty"` + } + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginVersionTableResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginTableDetails + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginVersionTableResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginVersionTableResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } return 0 } @@ -4638,6 +5983,61 @@ func (r UpdateTeamResponse) StatusCode() int { return 0 } +type DeleteAddonsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteAddonsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddonsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []Addon `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamAPIKeysResponse struct { Body []byte HTTPResponse *http.Response @@ -4863,7 +6263,223 @@ type ListMonthlyLimitsByTeamResponse struct { } // Status returns HTTPResponse.Status -func (r ListMonthlyLimitsByTeamResponse) Status() string { +func (r ListMonthlyLimitsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListMonthlyLimitsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *MonthlyLimit + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *MonthlyLimit + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateMonthlyLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *MonthlyLimit + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateMonthlyLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateMonthlyLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []Plugin `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []UsageCurrent `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncreaseTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageCurrent + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r IncreaseTeamPluginUsageResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4871,26 +6487,25 @@ func (r ListMonthlyLimitsByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListMonthlyLimitsByTeamResponse) StatusCode() int { +func (r IncreaseTeamPluginUsageResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateMonthlyLimitResponse struct { +type GetTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *MonthlyLimit + JSON200 *UsageCurrent JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateMonthlyLimitResponse) Status() string { +func (r GetTeamPluginUsageResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4898,24 +6513,29 @@ func (r CreateMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateMonthlyLimitResponse) StatusCode() int { +func (r GetTeamPluginUsageResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteMonthlyLimitResponse struct { +type ListUsersByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *struct { + Items []User `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteMonthlyLimitResponse) Status() string { +func (r ListUsersByTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4923,25 +6543,22 @@ func (r DeleteMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteMonthlyLimitResponse) StatusCode() int { +func (r ListUsersByTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMonthlyLimitResponse struct { +type UploadImageResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonthlyLimit - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound + JSON200 *ImageURL JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetMonthlyLimitResponse) Status() string { +func (r UploadImageResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4949,26 +6566,24 @@ func (r GetMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMonthlyLimitResponse) StatusCode() int { +func (r UploadImageResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateMonthlyLimitResponse struct { +type GetCurrentUserResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonthlyLimit - JSON400 *BadRequest + JSON200 *User JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateMonthlyLimitResponse) Status() string { +func (r GetCurrentUserResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -4976,25 +6591,26 @@ func (r UpdateMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateMonthlyLimitResponse) StatusCode() int { +func (r GetCurrentUserResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeletePluginsByTeamResponse struct { +type UpdateCurrentUserResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *User JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON404 *NotFound + JSON405 *MethodNotAllowed JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeletePluginsByTeamResponse) Status() string { +func (r UpdateCurrentUserResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5002,28 +6618,25 @@ func (r DeletePluginsByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginsByTeamResponse) StatusCode() int { +func (r UpdateCurrentUserResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListPluginsByTeamResponse struct { +type ListCurrentUserInvitationsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []InvitationWithToken `json:"items"` + Metadata ListMetadata `json:"metadata"` } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListPluginsByTeamResponse) Status() string { +func (r ListCurrentUserInvitationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5031,28 +6644,27 @@ func (r ListPluginsByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListPluginsByTeamResponse) StatusCode() int { +func (r ListCurrentUserInvitationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListTeamPluginUsageResponse struct { +type GetCurrentUserMembershipsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []UsageCurrent `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []MembershipWithTeam `json:"items"` + Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListTeamPluginUsageResponse) Status() string { +func (r GetCurrentUserMembershipsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5060,797 +6672,1327 @@ func (r ListTeamPluginUsageResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTeamPluginUsageResponse) StatusCode() int { +func (r GetCurrentUserMembershipsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncreaseTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageCurrent - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError +// HealthCheckWithResponse request returning *HealthCheckResponse +func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { + rsp, err := c.HealthCheck(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseHealthCheckResponse(rsp) +} + +// ListAddonsWithResponse request returning *ListAddonsResponse +func (c *ClientWithResponses) ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) { + rsp, err := c.ListAddons(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonsResponse(rsp) +} + +// CreateAddonWithBodyWithResponse request with arbitrary body returning *CreateAddonResponse +func (c *ClientWithResponses) CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddonWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonResponse(rsp) +} + +func (c *ClientWithResponses) CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddon(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonResponse(rsp) +} + +// DeleteAddonByTeamAndNameWithResponse request returning *DeleteAddonByTeamAndNameResponse +func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { + rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAddonByTeamAndNameResponse(rsp) +} + +// GetAddonWithResponse request returning *GetAddonResponse +func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { + rsp, err := c.GetAddon(ctx, teamName, addonName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonResponse(rsp) +} + +// UpdateAddonWithBodyWithResponse request with arbitrary body returning *UpdateAddonResponse +func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonResponse(rsp) +} + +func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddon(ctx, teamName, addonName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonResponse(rsp) +} + +// ListAddonVersionsWithResponse request returning *ListAddonVersionsResponse +func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { + rsp, err := c.ListAddonVersions(ctx, teamName, addonName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonVersionsResponse(rsp) +} + +// GetAddonVersionWithResponse request returning *GetAddonVersionResponse +func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { + rsp, err := c.GetAddonVersion(ctx, teamName, addonName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonVersionResponse(rsp) +} + +// UpdateAddonVersionWithBodyWithResponse request with arbitrary body returning *UpdateAddonVersionResponse +func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonVersionResponse(rsp) +} + +func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersion(ctx, teamName, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonVersionResponse(rsp) +} + +// CreateAddonVersionWithBodyWithResponse request with arbitrary body returning *CreateAddonVersionResponse +func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonVersionResponse(rsp) +} + +func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersion(ctx, teamName, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonVersionResponse(rsp) +} + +// DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse +func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { + rsp, err := c.DownloadAddonAsset(ctx, teamName, addonName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDownloadAddonAssetResponse(rsp) +} + +// UploadAddonAssetWithResponse request returning *UploadAddonAssetResponse +func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { + rsp, err := c.UploadAddonAsset(ctx, teamName, addonName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadAddonAssetResponse(rsp) +} + +// ListPluginsWithResponse request returning *ListPluginsResponse +func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { + rsp, err := c.ListPlugins(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginsResponse(rsp) +} + +// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse +func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePlugin(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginResponse(rsp) +} + +// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse +func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { + rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginByTeamAndPluginNameResponse(rsp) +} + +// GetPluginWithResponse request returning *GetPluginResponse +func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { + rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPluginResponse(rsp) +} + +// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse +func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePluginResponse(rsp) +} + +func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePluginResponse(rsp) +} + +// ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse +func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { + rsp, err := c.ListPluginVersions(ctx, teamName, pluginKind, pluginName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginVersionsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncreaseTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// GetPluginVersionWithResponse request returning *GetPluginVersionResponse +func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { + rsp, err := c.GetPluginVersion(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseGetPluginVersionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncreaseTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// UpdatePluginVersionWithBodyWithResponse request with arbitrary body returning *UpdatePluginVersionResponse +func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseUpdatePluginVersionResponse(rsp) } -type GetTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageCurrent - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError +func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePluginVersionResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse +func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreatePluginVersionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseCreatePluginVersionResponse(rsp) } -type ListUsersByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []User `json:"items"` - Metadata ListMetadata `json:"metadata"` +// DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse +func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { + rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) + if err != nil { + return nil, err } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + return ParseDownloadPluginAssetResponse(rsp) } -// Status returns HTTPResponse.Status -func (r ListUsersByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// UploadPluginAssetWithResponse request returning *UploadPluginAssetResponse +func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { + rsp, err := c.UploadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseUploadPluginAssetResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListUsersByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// DeletePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionDocsResponse +func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseDeletePluginVersionDocsResponse(rsp) } -type UploadImageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ImageURL - JSON500 *InternalError +func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionDocsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r UploadImageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ListPluginVersionDocsWithResponse request returning *ListPluginVersionDocsResponse +func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { + rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseListPluginVersionDocsResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r UploadImageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse +func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseCreatePluginVersionDocsResponse(rsp) } -type GetCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError +func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionDocsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// DeletePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionTablesResponse +func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseDeletePluginVersionTablesResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseDeletePluginVersionTablesResponse(rsp) } -type UpdateCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON405 *MethodNotAllowed - JSON500 *InternalError +// ListPluginVersionTablesWithResponse request returning *ListPluginVersionTablesResponse +func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { + rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginVersionTablesResponse(rsp) } -// Status returns HTTPResponse.Status -func (r UpdateCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// CreatePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionTablesResponse +func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreatePluginVersionTablesResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseCreatePluginVersionTablesResponse(rsp) } -type ListCurrentUserInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []InvitationWithToken `json:"items"` - Metadata ListMetadata `json:"metadata"` +// GetPluginVersionTableWithResponse request returning *GetPluginVersionTableResponse +func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { + rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginKind, pluginName, versionName, tableName, reqEditors...) + if err != nil { + return nil, err } - JSON500 *InternalError + return ParseGetPluginVersionTableResponse(rsp) } -// Status returns HTTPResponse.Status -func (r ListCurrentUserInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ListTeamsWithResponse request returning *ListTeamsResponse +func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { + rsp, err := c.ListTeams(ctx, params, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseListTeamsResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListCurrentUserInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// CreateTeamWithBodyWithResponse request with arbitrary body returning *CreateTeamResponse +func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { + rsp, err := c.CreateTeamWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseCreateTeamResponse(rsp) } -type GetCurrentUserMembershipsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []MembershipWithTeam `json:"items"` - Metadata ListMetadata `json:"metadata"` +func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { + rsp, err := c.CreateTeam(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamResponse(rsp) +} + +// GetTeamByNameWithResponse request returning *GetTeamByNameResponse +func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) { + rsp, err := c.GetTeamByName(ctx, teamName, reqEditors...) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError + return ParseGetTeamByNameResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetCurrentUserMembershipsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// UpdateTeamWithBodyWithResponse request with arbitrary body returning *UpdateTeamResponse +func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseUpdateTeamResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserMembershipsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseUpdateTeamResponse(rsp) } -// HealthCheckWithResponse request returning *HealthCheckResponse -func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { - rsp, err := c.HealthCheck(ctx, reqEditors...) +// DeleteAddonsByTeamWithResponse request returning *DeleteAddonsByTeamResponse +func (c *ClientWithResponses) DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) { + rsp, err := c.DeleteAddonsByTeam(ctx, teamName, reqEditors...) if err != nil { return nil, err } - return ParseHealthCheckResponse(rsp) + return ParseDeleteAddonsByTeamResponse(rsp) } -// ListPluginsWithResponse request returning *ListPluginsResponse -func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { - rsp, err := c.ListPlugins(ctx, params, reqEditors...) +// ListAddonsByTeamWithResponse request returning *ListAddonsByTeamResponse +func (c *ClientWithResponses) ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) { + rsp, err := c.ListAddonsByTeam(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseListPluginsResponse(rsp) + return ParseListAddonsByTeamResponse(rsp) } -// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse -func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) +// ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse +func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { + rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginResponse(rsp) + return ParseListTeamAPIKeysResponse(rsp) } -func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePlugin(ctx, body, reqEditors...) +// CreateTeamAPIKeyWithBodyWithResponse request with arbitrary body returning *CreateTeamAPIKeyResponse +func (c *ClientWithResponses) CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKeyWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginResponse(rsp) + return ParseCreateTeamAPIKeyResponse(rsp) } -// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse -func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { - rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) +func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKey(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseDeletePluginByTeamAndPluginNameResponse(rsp) + return ParseCreateTeamAPIKeyResponse(rsp) } -// GetPluginWithResponse request returning *GetPluginResponse -func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { - rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) +// DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse +func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { + rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyPathName, reqEditors...) if err != nil { return nil, err } - return ParseGetPluginResponse(rsp) + return ParseDeleteTeamAPIKeyResponse(rsp) } -// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse -func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) +// ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse +func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { + rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdatePluginResponse(rsp) + return ParseListTeamInvitationsResponse(rsp) } -func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) +// EmailTeamInvitationWithBodyWithResponse request with arbitrary body returning *EmailTeamInvitationResponse +func (c *ClientWithResponses) EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { + rsp, err := c.EmailTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdatePluginResponse(rsp) + return ParseEmailTeamInvitationResponse(rsp) } -// ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse -func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { - rsp, err := c.ListPluginVersions(ctx, teamName, pluginKind, pluginName, params, reqEditors...) +func (c *ClientWithResponses) EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { + rsp, err := c.EmailTeamInvitation(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseListPluginVersionsResponse(rsp) + return ParseEmailTeamInvitationResponse(rsp) } -// GetPluginVersionWithResponse request returning *GetPluginVersionResponse -func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { - rsp, err := c.GetPluginVersion(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) +// AcceptTeamInvitationWithBodyWithResponse request with arbitrary body returning *AcceptTeamInvitationResponse +func (c *ClientWithResponses) AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetPluginVersionResponse(rsp) + return ParseAcceptTeamInvitationResponse(rsp) } -// UpdatePluginVersionWithBodyWithResponse request with arbitrary body returning *UpdatePluginVersionResponse -func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitation(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdatePluginVersionResponse(rsp) + return ParseAcceptTeamInvitationResponse(rsp) } -func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) +// CancelTeamInvitationWithResponse request returning *CancelTeamInvitationResponse +func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { + rsp, err := c.CancelTeamInvitation(ctx, teamName, email, reqEditors...) if err != nil { return nil, err } - return ParseUpdatePluginVersionResponse(rsp) + return ParseCancelTeamInvitationResponse(rsp) } -// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse -func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) +// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse +func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { + rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginVersionResponse(rsp) + return ParseGetTeamMembershipsResponse(rsp) } -func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) +// ListMonthlyLimitsByTeamWithResponse request returning *ListMonthlyLimitsByTeamResponse +func (c *ClientWithResponses) ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) { + rsp, err := c.ListMonthlyLimitsByTeam(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginVersionResponse(rsp) + return ParseListMonthlyLimitsByTeamResponse(rsp) } -// DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse -func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { - rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) +// CreateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *CreateMonthlyLimitResponse +func (c *ClientWithResponses) CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { + rsp, err := c.CreateMonthlyLimitWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseDownloadPluginAssetResponse(rsp) + return ParseCreateMonthlyLimitResponse(rsp) } -// UploadPluginAssetWithResponse request returning *UploadPluginAssetResponse -func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { - rsp, err := c.UploadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) +func (c *ClientWithResponses) CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { + rsp, err := c.CreateMonthlyLimit(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseUploadPluginAssetResponse(rsp) + return ParseCreateMonthlyLimitResponse(rsp) } -// DeletePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionDocsResponse -func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) +// DeleteMonthlyLimitWithResponse request returning *DeleteMonthlyLimitResponse +func (c *ClientWithResponses) DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) { + rsp, err := c.DeleteMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } - return ParseDeletePluginVersionDocsResponse(rsp) + return ParseDeleteMonthlyLimitResponse(rsp) } -func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) +// GetMonthlyLimitWithResponse request returning *GetMonthlyLimitResponse +func (c *ClientWithResponses) GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) { + rsp, err := c.GetMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } - return ParseDeletePluginVersionDocsResponse(rsp) + return ParseGetMonthlyLimitResponse(rsp) } -// ListPluginVersionDocsWithResponse request returning *ListPluginVersionDocsResponse -func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { - rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) +// UpdateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *UpdateMonthlyLimitResponse +func (c *ClientWithResponses) UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { + rsp, err := c.UpdateMonthlyLimitWithBody(ctx, teamName, pluginTeam, pluginKind, pluginName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseListPluginVersionDocsResponse(rsp) + return ParseUpdateMonthlyLimitResponse(rsp) } -// CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse -func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { + rsp, err := c.UpdateMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginVersionDocsResponse(rsp) + return ParseUpdateMonthlyLimitResponse(rsp) } -func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) +// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse +func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { + rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginVersionDocsResponse(rsp) + return ParseDeletePluginsByTeamResponse(rsp) } -// DeletePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionTablesResponse -func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) +// ListPluginsByTeamWithResponse request returning *ListPluginsByTeamResponse +func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) { + rsp, err := c.ListPluginsByTeam(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseDeletePluginVersionTablesResponse(rsp) + return ParseListPluginsByTeamResponse(rsp) } -func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) +// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse +func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { + rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseDeletePluginVersionTablesResponse(rsp) + return ParseListTeamPluginUsageResponse(rsp) } -// ListPluginVersionTablesWithResponse request returning *ListPluginVersionTablesResponse -func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { - rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) +// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseListPluginVersionTablesResponse(rsp) + return ParseIncreaseTeamPluginUsageResponse(rsp) } -// CreatePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionTablesResponse -func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginVersionTablesResponse(rsp) + return ParseIncreaseTeamPluginUsageResponse(rsp) } -func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) +// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse +func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { + rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } - return ParseCreatePluginVersionTablesResponse(rsp) + return ParseGetTeamPluginUsageResponse(rsp) } -// GetPluginVersionTableWithResponse request returning *GetPluginVersionTableResponse -func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { - rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginKind, pluginName, versionName, tableName, reqEditors...) +// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse +func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { + rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseGetPluginVersionTableResponse(rsp) + return ParseListUsersByTeamResponse(rsp) } -// ListTeamsWithResponse request returning *ListTeamsResponse -func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { - rsp, err := c.ListTeams(ctx, params, reqEditors...) +// UploadImageWithResponse request returning *UploadImageResponse +func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImage(ctx, reqEditors...) if err != nil { return nil, err } - return ParseListTeamsResponse(rsp) + return ParseUploadImageResponse(rsp) } -// CreateTeamWithBodyWithResponse request with arbitrary body returning *CreateTeamResponse -func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { - rsp, err := c.CreateTeamWithBody(ctx, contentType, body, reqEditors...) +// GetCurrentUserWithResponse request returning *GetCurrentUserResponse +func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { + rsp, err := c.GetCurrentUser(ctx, reqEditors...) if err != nil { return nil, err } - return ParseCreateTeamResponse(rsp) + return ParseGetCurrentUserResponse(rsp) } -func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { - rsp, err := c.CreateTeam(ctx, body, reqEditors...) +// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse +func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateTeamResponse(rsp) + return ParseUpdateCurrentUserResponse(rsp) } -// GetTeamByNameWithResponse request returning *GetTeamByNameResponse -func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) { - rsp, err := c.GetTeamByName(ctx, teamName, reqEditors...) +func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseGetTeamByNameResponse(rsp) + return ParseUpdateCurrentUserResponse(rsp) } -// UpdateTeamWithBodyWithResponse request with arbitrary body returning *UpdateTeamResponse -func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { - rsp, err := c.UpdateTeamWithBody(ctx, teamName, contentType, body, reqEditors...) +// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse +func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { + rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdateTeamResponse(rsp) + return ParseListCurrentUserInvitationsResponse(rsp) } -func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { - rsp, err := c.UpdateTeam(ctx, teamName, body, reqEditors...) +// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse +func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { + rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdateTeamResponse(rsp) + return ParseGetCurrentUserMembershipsResponse(rsp) } -// ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse -func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { - rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) +// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call +func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListTeamAPIKeysResponse(rsp) -} -// CreateTeamAPIKeyWithBodyWithResponse request with arbitrary body returning *CreateTeamAPIKeyResponse -func (c *ClientWithResponses) CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { - rsp, err := c.CreateTeamAPIKeyWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &HealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCreateTeamAPIKeyResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { - rsp, err := c.CreateTeamAPIKey(ctx, teamName, body, reqEditors...) +// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call +func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCreateTeamAPIKeyResponse(rsp) + + response := &ListAddonsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []Addon `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse -func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { - rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyPathName, reqEditors...) +// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call +func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseDeleteTeamAPIKeyResponse(rsp) + + response := &CreateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse -func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { - rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) +// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call +func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListTeamInvitationsResponse(rsp) + + response := &DeleteAddonByTeamAndNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// EmailTeamInvitationWithBodyWithResponse request with arbitrary body returning *EmailTeamInvitationResponse -func (c *ClientWithResponses) EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { - rsp, err := c.EmailTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) +// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call +func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseEmailTeamInvitationResponse(rsp) + + response := &GetAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -func (c *ClientWithResponses) EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { - rsp, err := c.EmailTeamInvitation(ctx, teamName, body, reqEditors...) +// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call +func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseEmailTeamInvitationResponse(rsp) -} -// AcceptTeamInvitationWithBodyWithResponse request with arbitrary body returning *AcceptTeamInvitationResponse -func (c *ClientWithResponses) AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { - rsp, err := c.AcceptTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &UpdateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseAcceptTeamInvitationResponse(rsp) -} -func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { - rsp, err := c.AcceptTeamInvitation(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAcceptTeamInvitationResponse(rsp) + return response, nil } -// CancelTeamInvitationWithResponse request returning *CancelTeamInvitationResponse -func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { - rsp, err := c.CancelTeamInvitation(ctx, teamName, email, reqEditors...) +// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call +func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCancelTeamInvitationResponse(rsp) -} -// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse -func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { - rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err + response := &ListAddonVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetTeamMembershipsResponse(rsp) -} -// ListMonthlyLimitsByTeamWithResponse request returning *ListMonthlyLimitsByTeamResponse -func (c *ClientWithResponses) ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) { - rsp, err := c.ListMonthlyLimitsByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []AddonVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseListMonthlyLimitsByTeamResponse(rsp) + + return response, nil } -// CreateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *CreateMonthlyLimitResponse -func (c *ClientWithResponses) CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { - rsp, err := c.CreateMonthlyLimitWithBody(ctx, teamName, contentType, body, reqEditors...) +// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call +func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCreateMonthlyLimitResponse(rsp) -} -func (c *ClientWithResponses) CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { - rsp, err := c.CreateMonthlyLimit(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err + response := &GetAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCreateMonthlyLimitResponse(rsp) -} -// DeleteMonthlyLimitWithResponse request returning *DeleteMonthlyLimitResponse -func (c *ClientWithResponses) DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) { - rsp, err := c.DeleteMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseDeleteMonthlyLimitResponse(rsp) + + return response, nil } -// GetMonthlyLimitWithResponse request returning *GetMonthlyLimitResponse -func (c *ClientWithResponses) GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) { - rsp, err := c.GetMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) +// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call +func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetMonthlyLimitResponse(rsp) -} -// UpdateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *UpdateMonthlyLimitResponse -func (c *ClientWithResponses) UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { - rsp, err := c.UpdateMonthlyLimitWithBody(ctx, teamName, pluginTeam, pluginKind, pluginName, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &UpdateAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseUpdateMonthlyLimitResponse(rsp) -} -func (c *ClientWithResponses) UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { - rsp, err := c.UpdateMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseUpdateMonthlyLimitResponse(rsp) + + return response, nil } -// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse -func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { - rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) +// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call +func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseDeletePluginsByTeamResponse(rsp) -} -// ListPluginsByTeamWithResponse request returning *ListPluginsByTeamResponse -func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) { - rsp, err := c.ListPluginsByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err + response := &CreateAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseListPluginsByTeamResponse(rsp) -} -// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse -func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { - rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamPluginUsageResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err } - return ParseIncreaseTeamPluginUsageResponse(rsp) -} -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseIncreaseTeamPluginUsageResponse(rsp) + return response, nil } -// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse -func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { - rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) +// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call +func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetTeamPluginUsageResponse(rsp) -} -// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse -func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { - rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err + response := &DownloadAddonAssetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseListUsersByTeamResponse(rsp) -} -// UploadImageWithResponse request returning *UploadImageResponse -func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { - rsp, err := c.UploadImage(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadImageResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -// GetCurrentUserWithResponse request returning *GetCurrentUserResponse -func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { - rsp, err := c.GetCurrentUser(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrentUserResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest -// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse -func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest -func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse -func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { - rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) - if err != nil { - return nil, err } - return ParseListCurrentUserInvitationsResponse(rsp) -} -// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse -func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { - rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrentUserMembershipsResponse(rsp) + return response, nil } -// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call -func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { +// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call +func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &HealthCheckResponse{ + response := &UploadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } @@ -7075,6 +9217,117 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } +// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call +func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAddonsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call +func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []Addon `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index f42161e..3b4d534 100644 --- a/models.gen.go +++ b/models.gen.go @@ -18,13 +18,39 @@ const ( ReadAndWrite APIKeyScope = "read-and-write" ) +// Defines values for AddonCategory. +const ( + AddonCategoryCloudInfrastructure AddonCategory = "cloud-infrastructure" + AddonCategoryDatabases AddonCategory = "databases" + AddonCategoryEngineeringAnalytics AddonCategory = "engineering-analytics" + AddonCategoryOther AddonCategory = "other" + AddonCategorySalesMarketing AddonCategory = "sales-marketing" +) + +// Defines values for AddonFormat. +const ( + Zip AddonFormat = "zip" +) + +// Defines values for AddonTier. +const ( + AddonTierFree AddonTier = "free" + AddonTierPaid AddonTier = "paid" +) + +// Defines values for AddonType. +const ( + Transformation AddonType = "transformation" + Visualization AddonType = "visualization" +) + // Defines values for PluginCategory. const ( - CloudInfrastructure PluginCategory = "cloud-infrastructure" - Databases PluginCategory = "databases" - EngineeringAnalytics PluginCategory = "engineering-analytics" - Other PluginCategory = "other" - SalesMarketing PluginCategory = "sales-marketing" + PluginCategoryCloudInfrastructure PluginCategory = "cloud-infrastructure" + PluginCategoryDatabases PluginCategory = "databases" + PluginCategoryEngineeringAnalytics PluginCategory = "engineering-analytics" + PluginCategoryOther PluginCategory = "other" + PluginCategorySalesMarketing PluginCategory = "sales-marketing" ) // Defines values for PluginKind. @@ -35,8 +61,8 @@ const ( // Defines values for PluginTier. const ( - Free PluginTier = "free" - Paid PluginTier = "paid" + PluginTierFree PluginTier = "free" + PluginTierPaid PluginTier = "paid" ) // Defines values for PluginVersionPackageType. @@ -45,6 +71,14 @@ const ( PluginVersionPackageTypeNative PluginVersionPackageType = "native" ) +// Defines values for AddonSortBy. +const ( + AddonSortByCreatedAt AddonSortBy = "created_at" + AddonSortByDownloads AddonSortBy = "downloads" + AddonSortByName AddonSortBy = "name" + AddonSortByUpdatedAt AddonSortBy = "updated_at" +) + // Defines values for PluginSortBy. const ( PluginSortByCreatedAt PluginSortBy = "created_at" @@ -58,6 +92,19 @@ const ( VersionSortByCreatedAt VersionSortBy = "created_at" ) +// Defines values for ListAddonsParamsSortBy. +const ( + ListAddonsParamsSortByCreatedAt ListAddonsParamsSortBy = "created_at" + ListAddonsParamsSortByDownloads ListAddonsParamsSortBy = "downloads" + ListAddonsParamsSortByName ListAddonsParamsSortBy = "name" + ListAddonsParamsSortByUpdatedAt ListAddonsParamsSortBy = "updated_at" +) + +// Defines values for ListAddonVersionsParamsSortBy. +const ( + ListAddonVersionsParamsSortByCreatedAt ListAddonVersionsParamsSortBy = "created_at" +) + // Defines values for ListPluginsParamsSortBy. const ( ListPluginsParamsSortByCreatedAt ListPluginsParamsSortBy = "created_at" @@ -68,7 +115,7 @@ const ( // Defines values for ListPluginVersionsParamsSortBy. const ( - ListPluginVersionsParamsSortByCreatedAt ListPluginVersionsParamsSortBy = "created_at" + CreatedAt ListPluginVersionsParamsSortBy = "created_at" ) // Defines values for CreatePluginVersionJSONBodyPackageType. @@ -107,6 +154,179 @@ type APIKeyName = string // APIKeyScope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins type APIKeyScope string +// Addon CloudQuery Addon +type Addon struct { + // AddonFormat Supported formats for addons + AddonFormat AddonFormat `json:"addon_format"` + + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` + + // Category Supported categories for addons + Category AddonCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` + + // DisplayName The addon's display name + DisplayName string `json:"display_name"` + Homepage *string `json:"homepage,omitempty"` + Logo string `json:"logo"` + + // Name The unique name for the addon. + Name AddonName `json:"name"` + + // Official True if the addon is maintained by CloudQuery, false otherwise + Official bool `json:"official"` + + // PriceUsd The price for 6 months + PriceUSD string `json:"price_usd"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier Supported tiers for addons + Tier AddonTier `json:"tier"` +} + +// AddonCategory Supported categories for addons +type AddonCategory string + +// AddonCreate CloudQuery AddonCreate +type AddonCreate struct { + // AddonFormat Supported formats for addons + AddonFormat AddonFormat `json:"addon_format"` + + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` + + // Category Supported categories for addons + Category AddonCategory `json:"category"` + + // DisplayName The addon's display name + DisplayName string `json:"display_name"` + Homepage *string `json:"homepage,omitempty"` + Logo string `json:"logo"` + + // Name The unique name for the addon. + Name AddonName `json:"name"` + + // PriceUsd The price for 6 months + PriceUSD *string `json:"price_usd,omitempty"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public bool `json:"public"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier Supported tiers for addons + Tier AddonTier `json:"tier"` +} + +// AddonFormat Supported formats for addons +type AddonFormat string + +// AddonName The unique name for the addon. +type AddonName = string + +// AddonTier Supported tiers for addons +type AddonTier string + +// AddonType Supported types for addons +type AddonType string + +// AddonUpdate CloudQuery AddonUpdate +type AddonUpdate struct { + // AddonFormat Supported formats for addons + AddonFormat *AddonFormat `json:"addon_format,omitempty"` + + // AddonType Supported types for addons + AddonType *AddonType `json:"addon_type,omitempty"` + + // Category Supported categories for addons + Category *AddonCategory `json:"category,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + + // DisplayName The addon's display name + DisplayName *string `json:"display_name,omitempty"` + Homepage *string `json:"homepage,omitempty"` + Logo *string `json:"logo,omitempty"` + + // PriceUsd The price for 6 months in USD + PriceUSD *string `json:"price_usd,omitempty"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription *string `json:"short_description,omitempty"` + + // Tier Supported tiers for addons + Tier *AddonTier `json:"tier,omitempty"` +} + +// AddonVersion CloudQuery Addon Version +type AddonVersion struct { + // AddonDeps list of other addons this addon depends on in the format of team_name/name@version + AddonDeps *[]string `json:"addon_deps,omitempty"` + + // Checksum The checksum of the addon asset + Checksum string `json:"checksum"` + + // CreatedAt The date and time the plugin version was created. + CreatedAt time.Time `json:"created_at"` + + // Doc Main README in MD format + Doc string `json:"doc"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. + Draft bool `json:"draft"` + + // Message Description of what's new or changed in this version (supports markdown) + Message string `json:"message"` + + // Name The version in semantic version format. + Name VersionName `json:"name"` + + // PluginDeps list of plugins the addon depends on in the format of team_name/kind/name@version + PluginDeps []string `json:"plugin_deps"` + + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted bool `json:"retracted"` +} + +// AddonVersionUpdate defines model for AddonVersionUpdate. +type AddonVersionUpdate struct { + // AddonDeps list of other addons this addon depends on in the format of team_name/name@version + AddonDeps *[]string `json:"addon_deps,omitempty"` + + // Checksum The checksum of the addon asset + Checksum *string `json:"checksum,omitempty"` + + // Doc Main README in MD format + Doc *string `json:"doc,omitempty"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. + Draft *bool `json:"draft,omitempty"` + + // Message Description of what's new or changed in this version (supports markdown) + Message *string `json:"message,omitempty"` + + // PluginDeps list of plugins the addon depends on in the format of team_name/kind/name@version + PluginDeps *[]string `json:"plugin_deps,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted *bool `json:"retracted,omitempty"` +} + // BasicError Basic Error type BasicError struct { Message string `json:"message"` @@ -626,6 +846,9 @@ type UserName = string // VersionName The version in semantic version format. type VersionName = string +// AddonSortBy defines model for addon_sort_by. +type AddonSortBy string + // APIKeyPathName defines model for apikey_name. type APIKeyPathName = string @@ -677,6 +900,59 @@ type TooManyRequests = BasicError // UnprocessableEntity defines model for UnprocessableEntity. type UnprocessableEntity = FieldError +// ListAddonsParams defines parameters for ListAddons. +type ListAddonsParams struct { + // SortBy The field to sort by + SortBy *ListAddonsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListAddonsParamsSortBy defines parameters for ListAddons. +type ListAddonsParamsSortBy string + +// ListAddonVersionsParams defines parameters for ListAddonVersions. +type ListAddonVersionsParams struct { + // SortBy The field to sort by + SortBy *ListAddonVersionsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludeDrafts Whether to include draft plugins + IncludeDrafts *IncludeDrafts `form:"include_drafts,omitempty" json:"include_drafts,omitempty"` +} + +// ListAddonVersionsParamsSortBy defines parameters for ListAddonVersions. +type ListAddonVersionsParamsSortBy string + +// CreateAddonVersionJSONBody defines parameters for CreateAddonVersion. +type CreateAddonVersionJSONBody struct { + // AddonDeps addon dependencies in the format of ['team_name/addon_name@version'] + AddonDeps *[]string `json:"addon_deps,omitempty"` + + // Checksum SHA-256 checksums for this addon version. + Checksum string `json:"checksum"` + + // Doc Main README in MD format + Doc string `json:"doc"` + + // Message A message describing what's new or changed in this version. + // This message will be displayed to users in the addon's changelog. + // Supports limited markdown syntax. + Message string `json:"message"` + + // PluginDeps plugin dependencies in the format of ['team_name/kind/plugin_name@version'] + PluginDeps *[]string `json:"plugin_deps,omitempty"` +} + // ListPluginsParams defines parameters for ListPlugins. type ListPluginsParams struct { // SortBy The field to sort by @@ -795,6 +1071,18 @@ type UpdateTeamJSONBody struct { DisplayName *string `json:"display_name,omitempty"` } +// ListAddonsByTeamParams defines parameters for ListAddonsByTeam. +type ListAddonsByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludePrivate Whether to include private plugins + IncludePrivate *IncludePrivate `form:"include_private,omitempty" json:"include_private,omitempty"` +} + // ListTeamAPIKeysParams defines parameters for ListTeamAPIKeys. type ListTeamAPIKeysParams struct { // PerPage The number of results per page (max 1000). @@ -908,6 +1196,18 @@ type GetCurrentUserMembershipsParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } +// CreateAddonJSONRequestBody defines body for CreateAddon for application/json ContentType. +type CreateAddonJSONRequestBody = AddonCreate + +// UpdateAddonJSONRequestBody defines body for UpdateAddon for application/json ContentType. +type UpdateAddonJSONRequestBody = AddonUpdate + +// UpdateAddonVersionJSONRequestBody defines body for UpdateAddonVersion for application/json ContentType. +type UpdateAddonVersionJSONRequestBody = AddonVersionUpdate + +// CreateAddonVersionJSONRequestBody defines body for CreateAddonVersion for application/json ContentType. +type CreateAddonVersionJSONRequestBody CreateAddonVersionJSONBody + // CreatePluginJSONRequestBody defines body for CreatePlugin for application/json ContentType. type CreatePluginJSONRequestBody = PluginCreate diff --git a/spec.json b/spec.json index b230fb9..cd70ed9 100644 --- a/spec.json +++ b/spec.json @@ -49,6 +49,9 @@ }, { "name": "usage" + }, + { + "name": "addons" } ], "paths": { @@ -568,7 +571,6 @@ "$ref": "#/components/responses/InternalError" } }, - "security": [], "tags": [ "plugins" ] @@ -623,7 +625,6 @@ "$ref": "#/components/responses/InternalError" } }, - "security": [], "tags": [ "plugins" ] @@ -1189,27 +1190,28 @@ "$ref": "#/components/responses/InternalError" } }, - "security": [], "tags": [ "plugins" ] } }, - "/teams": { + "/addons": { "get": { - "description": "List all teams", - "operationId": "ListTeams", + "description": "List all addons", + "operationId": "ListAddons", "parameters": [ { - "$ref": "#/components/parameters/per_page" + "$ref": "#/components/parameters/addon_sort_by" }, { "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "Response", "content": { "application/json": { "schema": { @@ -1220,9 +1222,27 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/Addon" }, - "type": "array" + "type": "array", + "example": [ + { + "name": "aws-policies", + "team_name": "cloudquery", + "display_name": "AWS Policies", + "category": "cloud-infrastructure", + "created_at": "2017-07-14T16:53:42Z", + "homepage": "https://cloudquery.io", + "logo": "https://images.cloudquery.io/logos/aws.png", + "official": true, + "short_description": "Sync data from AWS to any destination", + "repository": "https://github.com/cloudquery/cloudquery", + "tier": "free", + "price_usd": "50", + "addon_type": "visualization", + "addon_format": "zip" + } + ] }, "metadata": { "$ref": "#/components/schemas/ListMetadata" @@ -1230,51 +1250,31 @@ } } } - } + }, + "description": "Response" }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, "500": { "$ref": "#/components/responses/InternalError" } }, + "security": [], "tags": [ - "teams", - "users" + "addons" ] }, "post": { - "description": "Create a team owned by the current user.", - "operationId": "CreateTeam", + "description": "Create an addon owned by the specified team. User must be part of that team.", + "operationId": "CreateAddon", "parameters": [], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": false, - "required": [ - "name", - "display_name" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/TeamName" - }, - "display_name": { - "type": "string", - "description": "The team's display name", - "minLength": 1, - "maxLength": 255 - } - } + "$ref": "#/components/schemas/AddonCreate" } } } @@ -1284,7 +1284,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/Addon" } } }, @@ -1293,8 +1293,8 @@ "400": { "$ref": "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "403": { + "$ref": "#/components/responses/Forbidden" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" @@ -1304,39 +1304,36 @@ } }, "tags": [ - "teams" + "addons" ] } }, - "/teams/{team_name}": { + "/addons/{team_name}/{addon_name}": { "get": { - "description": "Get a team by name", - "operationId": "GetTeamByName", + "description": "Get details about a given addon.", + "operationId": "GetAddon", "parameters": [ { "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/addon_name" } ], "responses": { "200": { - "description": "Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/Addon" } } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" + }, + "description": "Response" }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -1344,41 +1341,41 @@ "$ref": "#/components/responses/InternalError" } }, + "security": [], "tags": [ - "teams" + "addons" ] }, "patch": { - "description": "Update team attributes", - "operationId": "UpdateTeam", + "description": "Update an Addon", + "operationId": "UpdateAddon", + "tags": [ + "addons" + ], "parameters": [ { "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/addon_name" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "type": "string", - "description": "The team's display name" - } - } + "$ref": "#/components/schemas/AddonUpdate" } } } }, "responses": { "200": { - "description": "Response", + "description": "Updated", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/Addon" } } } @@ -1386,108 +1383,29 @@ "400": { "$ref": "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams" - ] - } - }, - "/teams/{team_name}/plugins": { - "get": { - "description": "List all plugins for the team.", - "operationId": "ListPluginsByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include_private" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Plugin" - }, - "type": "array", - "example": [ - { - "name": "aws-source", - "kind": "source", - "team_name": "cloudquery", - "display_name": "AWS Source Plugin", - "category": "cloud-infrastructure", - "created_at": "2017-07-14T16:53:42Z", - "homepage": "https://cloudquery.io", - "logo": "https://images.cloudquery.io/logos/aws.png", - "official": true, - "short_description": "Sync data from AWS to any destination", - "repository": "https://github.com/cloudquery/cloudquery", - "tier": "paid", - "usd_per_row": "0.00123", - "free_rows_per_month": 10000 - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" + "422": { + "$ref": "#/components/responses/UnprocessableEntity" }, "500": { "$ref": "#/components/responses/InternalError" } - }, - "tags": [ - "plugins" - ] + } }, "delete": { - "description": "Delete plugins by team", - "operationId": "DeletePluginsByTeam", + "description": "Delete addon by team and addon name", + "operationId": "DeleteAddonByTeamAndName", "parameters": [ { "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/addon_name" } ], "responses": { @@ -1511,24 +1429,32 @@ } }, "tags": [ - "teams", - "plugins" + "addons" ] } }, - "/teams/{team_name}/memberships": { + "/addons/{team_name}/{addon_name}/versions": { "get": { - "description": "Get memberships to the team.", - "operationId": "GetTeamMemberships", + "description": "List all versions for a given addon", + "operationId": "ListAddonVersions", "parameters": [ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_name" + }, + { + "$ref": "#/components/parameters/version_sort_by" + }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include_drafts" } ], "responses": { @@ -1543,20 +1469,9 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/MembershipWithUser" + "$ref": "#/components/schemas/AddonVersion" }, - "type": "array", - "example": [ - { - "role": "admin", - "user": { - "created_at": "2017-07-14T16:53:42Z", - "email": "user@clouduery.io", - "name": "user", - "updated_at": "2017-07-14T16:53:42Z" - } - } - ] + "type": "array" }, "metadata": { "$ref": "#/components/schemas/ListMetadata" @@ -1567,9 +1482,6 @@ }, "description": "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1583,51 +1495,37 @@ "$ref": "#/components/responses/InternalError" } }, + "security": [], "tags": [ - "teams", - "users" + "addons" ] } }, - "/teams/{team_name}/monthly-limits": { + "/addons/{team_name}/{addon_name}/versions/{version_name}": { "get": { - "description": "List all monthly limits for the team.", - "operationId": "ListMonthlyLimitsByTeam", + "description": "Get details about a given addon version.", + "operationId": "GetAddonVersion", "parameters": [ { "$ref": "#/components/parameters/team_name" }, { - "$ref": "#/components/parameters/page" + "$ref": "#/components/parameters/addon_name" }, { - "$ref": "#/components/parameters/per_page" + "$ref": "#/components/parameters/version_name" } ], "responses": { "200": { - "description": "List of monthly limits for the team.", "content": { "application/json": { "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/MonthlyLimit" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "$ref": "#/components/schemas/AddonVersion" } } - } + }, + "description": "Response" }, "401": { "$ref": "#/components/responses/RequiresAuthentication" @@ -1642,40 +1540,93 @@ "$ref": "#/components/responses/InternalError" } }, + "security": [], "tags": [ - "teams", - "plugins", - "limits" + "plugins" ] }, - "post": { - "description": "Create a monthly limit for a plugin", - "operationId": "CreateMonthlyLimit", + "put": { + "description": "Create a new addon version, or update a draft version", + "operationId": "CreateAddonVersion", "parameters": [ { "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/addon_name" + }, + { + "$ref": "#/components/parameters/version_name" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MonthlyLimitCreate" + "type": "object", + "required": [ + "message", + "doc", + "checksum" + ], + "properties": { + "message": { + "type": "string", + "minLength": 1, + "maxLength": 30000, + "description": "A message describing what's new or changed in this version.\nThis message will be displayed to users in the addon's changelog.\nSupports limited markdown syntax.\n" + }, + "doc": { + "type": "string", + "description": "Main README in MD format" + }, + "plugin_deps": { + "type": "array", + "items": { + "type": "string" + }, + "description": "plugin dependencies in the format of ['team_name/kind/plugin_name@version']" + }, + "addon_deps": { + "type": "array", + "items": { + "type": "string" + }, + "description": "addon dependencies in the format of ['team_name/addon_name@version']" + }, + "checksum": { + "type": "string", + "description": "SHA-256 checksums for this addon version." + } + } } } } }, "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonVersion" + } + } + } + }, "201": { - "description": "New monthly limit created.", + "description": "Success (the addon version was created)", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MonthlyLimit" + "$ref": "#/components/schemas/AddonVersion" } } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1685,49 +1636,51 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, "500": { "$ref": "#/components/responses/InternalError" } }, "tags": [ - "teams", - "plugins", - "limits" + "addons" ] - } - }, - "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}": { - "get": { - "description": "Get a monthly limit for a plugin", - "operationId": "GetMonthlyLimit", + }, + "patch": { + "description": "Update a given addon version", + "operationId": "UpdateAddonVersion", "parameters": [ { "$ref": "#/components/parameters/team_name" }, { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" + "$ref": "#/components/parameters/addon_name" }, { - "$ref": "#/components/parameters/plugin_name" + "$ref": "#/components/parameters/version_name" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonVersionUpdate" + } + } + } + }, "responses": { "200": { - "description": "Monthly limit retrieved.", + "description": "Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MonthlyLimit" + "$ref": "#/components/schemas/AddonVersion" } } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -1742,90 +1695,78 @@ } }, "tags": [ - "teams", - "plugins", - "limits" + "addons" ] - }, - "put": { - "description": "Update a monthly limit for a plugin", - "operationId": "UpdateMonthlyLimit", + } + }, + "/addons/{team_name}/{addon_name}/versions/{version_name}/assets": { + "get": { + "description": "Download a asset for a given version", + "operationId": "DownloadAddonAsset", "parameters": [ { "$ref": "#/components/parameters/team_name" }, { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" + "$ref": "#/components/parameters/addon_name" }, { - "$ref": "#/components/parameters/plugin_name" + "$ref": "#/components/parameters/version_name" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MonthlyLimitUpdate" - } - } - } - }, "responses": { - "200": { - "description": "Monthly limit updated.", - "content": { - "application/json": { + "302": { + "description": "Response", + "headers": { + "Location": { "schema": { - "$ref": "#/components/schemas/MonthlyLimit" + "type": "string" } } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, "404": { "$ref": "#/components/responses/NotFound" }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, "500": { "$ref": "#/components/responses/InternalError" } }, + "security": [], "tags": [ - "teams", - "plugins", - "limits" + "addons" ] }, - "delete": { - "description": "Delete a monthly limit for a plugin", - "operationId": "DeleteMonthlyLimit", + "post": { + "description": "Get a URL to upload an asset for a given addon version", + "operationId": "UploadAddonAsset", "parameters": [ { "$ref": "#/components/parameters/team_name" }, { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" + "$ref": "#/components/parameters/addon_name" }, { - "$ref": "#/components/parameters/plugin_name" + "$ref": "#/components/parameters/version_name" } ], "responses": { - "204": { - "description": "Monthly limit deleted." + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReleaseURL" + } + } + } }, "401": { "$ref": "#/components/responses/RequiresAuthentication" @@ -1833,38 +1774,30 @@ "403": { "$ref": "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" - }, "500": { "$ref": "#/components/responses/InternalError" } }, "tags": [ - "teams", - "plugins", - "limits" + "addons" ] } }, - "/teams/{team_name}/usage": { + "/teams": { "get": { - "description": "List plugin usage for the current calendar month.", - "operationId": "ListTeamPluginUsage", + "description": "List all teams", + "operationId": "ListTeams", "parameters": [ { - "$ref": "#/components/parameters/team_name" + "$ref": "#/components/parameters/per_page" }, { "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "List plugin usage for the current calendar month.", + "description": "Response", "content": { "application/json": { "schema": { @@ -1875,7 +1808,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/UsageCurrent" + "$ref": "#/components/schemas/Team" }, "type": "array" }, @@ -1902,47 +1835,55 @@ }, "tags": [ "teams", - "plugins", - "usage" + "users" ] }, "post": { - "description": "Increase the usage of a plugin. This can incur billing costs and should be used only by plugin SDKs.", - "operationId": "IncreaseTeamPluginUsage", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], + "description": "Create a team owned by the current user.", + "operationId": "CreateTeam", + "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UsageIncrease" + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "display_name" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/TeamName" + }, + "display_name": { + "type": "string", + "description": "The team's display name", + "minLength": 1, + "maxLength": 255 + } + } } } } }, "responses": { - "200": { - "description": "Plugin usage for the current calendar month.", + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UsageCurrent" + "$ref": "#/components/schemas/Team" } } - } + }, + "description": "Created" + }, + "400": { + "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, @@ -1951,41 +1892,33 @@ } }, "tags": [ - "teams", - "plugins", - "usage" + "teams" ] } }, - "/teams/{team_name}/usage/{plugin_team}/{plugin_kind}/{plugin_name}": { + "/teams/{team_name}": { "get": { - "description": "Get plugin usage for the current calendar month.", - "operationId": "GetTeamPluginUsage", + "description": "Get a team by name", + "operationId": "GetTeamByName", "parameters": [ { "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" } ], "responses": { "200": { - "description": "Plugin usage for the current calendar month.", + "description": "Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UsageCurrent" + "$ref": "#/components/schemas/Team" } } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -2000,71 +1933,12 @@ } }, "tags": [ - "teams", - "plugins", - "usage" + "teams" ] - } - }, - "/teams/{team_name}/invitations": { - "get": { - "operationId": "ListTeamInvitations", - "description": "List of open invitations to the team", - "tags": [ - "teams", - "users" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invitation" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - } - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } }, - "post": { - "operationId": "EmailTeamInvitation", - "description": "Invite a user to join a team with their email address", - "tags": [ - "teams", - "users" - ], + "patch": { + "description": "Update team attributes", + "operationId": "UpdateTeam", "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -2075,21 +1949,11 @@ "application/json": { "schema": { "type": "object", - "required": [ - "email", - "role" - ], + "additionalProperties": false, "properties": { - "email": { - "type": "string", - "format": "email" - }, - "role": { + "display_name": { "type": "string", - "enum": [ - "admin", - "member" - ] + "description": "The team's display name" } } } @@ -2102,7 +1966,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Invitation" + "$ref": "#/components/schemas/Team" } } } @@ -2110,91 +1974,108 @@ "400": { "$ref": "#/components/responses/BadRequest" }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, "403": { "$ref": "#/components/responses/Forbidden" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } - } + }, + "tags": [ + "teams" + ] } }, - "/teams/{team_name}/invitations/accept": { - "post": { - "operationId": "AcceptTeamInvitation", - "description": "Accept an invitation to the team, creating a user membership", - "tags": [ - "teams", - "users" - ], + "/teams/{team_name}/plugins": { + "get": { + "description": "List all plugins for the team.", + "operationId": "ListPluginsByTeam", "parameters": [ { "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/include_private" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "token" - ], - "properties": { - "token": { - "type": "string", - "format": "uuid" - } - } - } - } - } - }, "responses": { - "201": { - "description": "The invitation has been accepted and the authenticated user is now a member of the team.", + "200": { + "description": "Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MembershipWithTeam" + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Plugin" + }, + "type": "array", + "example": [ + { + "name": "aws-source", + "kind": "source", + "team_name": "cloudquery", + "display_name": "AWS Source Plugin", + "category": "cloud-infrastructure", + "created_at": "2017-07-14T16:53:42Z", + "homepage": "https://cloudquery.io", + "logo": "https://images.cloudquery.io/logos/aws.png", + "official": true, + "short_description": "Sync data from AWS to any destination", + "repository": "https://github.com/cloudquery/cloudquery", + "tier": "paid", + "usd_per_row": "0.00123", + "free_rows_per_month": 10000 + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } } } } }, - "303": { - "description": "The authenticated user is already a member of this team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MembershipWithTeam" - } - } - } + "401": { + "$ref": "#/components/responses/RequiresAuthentication" }, "403": { - "description": "You do not have an invitation to join this team.", "$ref": "#/components/responses/Forbidden" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } - } - } - }, - "/teams/{team_name}/invitations/{email}": { - "delete": { - "operationId": "CancelTeamInvitation", - "description": "Cancel an invitation to the team, preventing the user becoming a team member", + }, "tags": [ - "teams", - "users" - ], + "plugins" + ] + }, + "delete": { + "description": "Delete plugins by team", + "operationId": "DeletePluginsByTeam", "parameters": [ { "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/email" } ], "responses": { @@ -2216,22 +2097,29 @@ "500": { "$ref": "#/components/responses/InternalError" } - } + }, + "tags": [ + "teams", + "plugins" + ] } }, - "/teams/{team_name}/users": { + "/teams/{team_name}/addons": { "get": { - "description": "List all users in the current team.", - "operationId": "ListUsersByTeam", + "description": "List all addons for the team.", + "operationId": "ListAddonsByTeam", "parameters": [ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/page" + }, { "$ref": "#/components/parameters/per_page" }, { - "$ref": "#/components/parameters/page" + "$ref": "#/components/parameters/include_private" } ], "responses": { @@ -2247,9 +2135,27 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/Addon" }, - "type": "array" + "type": "array", + "example": [ + { + "name": "aws-policies", + "team_name": "cloudquery", + "display_name": "AWS Policies", + "category": "cloud-infrastructure", + "created_at": "2017-07-14T16:53:42Z", + "homepage": "https://cloudquery.io", + "logo": "https://images.cloudquery.io/logos/aws.png", + "official": true, + "short_description": "AWS policies", + "repository": "https://github.com/cloudquery/cloudquery", + "tier": "paid", + "price_usd": "50", + "addon_type": "visualization", + "addon_format": "zip" + } + ] }, "metadata": { "$ref": "#/components/schemas/ListMetadata" @@ -2259,6 +2165,35 @@ } } }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "addons" + ] + }, + "delete": { + "description": "Delete addons by team", + "operationId": "DeleteAddonsByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "responses": { + "204": { + "description": "Response" + }, "400": { "$ref": "#/components/responses/BadRequest" }, @@ -2277,146 +2212,18 @@ }, "tags": [ "teams", - "users" + "addons" ] } }, - "/user": { - "get": { - "description": "Get the current authenticated user from the OAuth token\n", - "operationId": "GetCurrentUser", - "parameters": [], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "users" - ] - }, - "patch": { - "description": "Update attributes for the current authenticated user from the OAuth token", - "operationId": "UpdateCurrentUser", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The user's name", - "minLength": 1, - "maxLength": 255 - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "405": { - "$ref": "#/components/responses/MethodNotAllowed" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "users" - ] - } - }, - "/user/invitations": { + "/teams/{team_name}/memberships": { "get": { - "operationId": "ListCurrentUserInvitations", - "description": "List of the current user's unaccepted invitations", - "tags": [ - "teams", - "users" - ], + "description": "Get memberships to the team.", + "operationId": "GetTeamMemberships", "parameters": [ { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvitationWithToken" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - } + "$ref": "#/components/parameters/team_name" }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - } - }, - "/user/memberships": { - "get": { - "description": "Get memberships that the user has accepted.", - "operationId": "GetCurrentUserMemberships", - "parameters": [ { "$ref": "#/components/parameters/page" }, @@ -2430,22 +2237,23 @@ "application/json": { "schema": { "required": [ - "metadata", - "items" + "items", + "metadata" ], "properties": { "items": { "items": { - "$ref": "#/components/schemas/MembershipWithTeam" + "$ref": "#/components/schemas/MembershipWithUser" }, "type": "array", "example": [ { "role": "admin", - "team": { + "user": { "created_at": "2017-07-14T16:53:42Z", - "name": "cloudquery", - "display_name": "CloudQuery" + "email": "user@clouduery.io", + "name": "user", + "updated_at": "2017-07-14T16:53:42Z" } } ] @@ -2459,12 +2267,18 @@ }, "description": "Response" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, "403": { "$ref": "#/components/responses/Forbidden" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -2475,27 +2289,24 @@ ] } }, - "/teams/{team_name}/apikeys": { + "/teams/{team_name}/monthly-limits": { "get": { - "description": "List all team API Keys", - "operationId": "ListTeamAPIKeys", - "tags": [ - "teams" - ], + "description": "List all monthly limits for the team.", + "operationId": "ListMonthlyLimitsByTeam", "parameters": [ { "$ref": "#/components/parameters/team_name" }, { - "$ref": "#/components/parameters/per_page" + "$ref": "#/components/parameters/page" }, { - "$ref": "#/components/parameters/page" + "$ref": "#/components/parameters/per_page" } ], "responses": { "200": { - "description": "Response", + "description": "List of monthly limits for the team.", "content": { "application/json": { "schema": { @@ -2506,7 +2317,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/APIKey" + "$ref": "#/components/schemas/MonthlyLimit" }, "type": "array" }, @@ -2521,17 +2332,25 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } - } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] }, "post": { - "description": "Create new team API Key. This is useful in CI", - "operationId": "CreateTeamAPIKey", - "tags": [ - "teams" - ], + "description": "Create a monthly limit for a plugin", + "operationId": "CreateMonthlyLimit", "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -2541,77 +2360,958 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "expires_at", - "role", - "name" - ], - "properties": { - "name": { - "type": "string", - "maxLength": 255 - }, - "expires_at": { - "type": "string", - "format": "date-time" - }, - "scope": { - "$ref": "#/components/schemas/APIKeyScope" - } - } + "$ref": "#/components/schemas/MonthlyLimitCreate" } } } }, "responses": { "201": { - "description": "Response", + "description": "New monthly limit created.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKey" + "$ref": "#/components/schemas/MonthlyLimit" } } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "500": { "$ref": "#/components/responses/InternalError" } - } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] } }, - "/teams/{team_name}/apikeys/{apikey_name}": { - "delete": { - "description": "Delete API Key. This will remove any future access by this API Key.", - "operationId": "DeleteTeamAPIKey", - "tags": [ - "teams" - ], + "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}": { + "get": { + "description": "Get a monthly limit for a plugin", + "operationId": "GetMonthlyLimit", "parameters": [ { "$ref": "#/components/parameters/team_name" }, { - "$ref": "#/components/parameters/apikey_name" + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" } ], "responses": { - "204": { - "description": "Deleted" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, + "200": { + "description": "Monthly limit retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimit" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + }, + "put": { + "description": "Update a monthly limit for a plugin", + "operationId": "UpdateMonthlyLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimitUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Monthly limit updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonthlyLimit" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + }, + "delete": { + "description": "Delete a monthly limit for a plugin", + "operationId": "DeleteMonthlyLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "204": { + "description": "Monthly limit deleted." + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "limits" + ] + } + }, + "/teams/{team_name}/usage": { + "get": { + "description": "List plugin usage for the current calendar month.", + "operationId": "ListTeamPluginUsage", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "List plugin usage for the current calendar month.", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/UsageCurrent" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "usage" + ] + }, + "post": { + "description": "Increase the usage of a plugin. This can incur billing costs and should be used only by plugin SDKs.", + "operationId": "IncreaseTeamPluginUsage", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageIncrease" + } + } + } + }, + "responses": { + "200": { + "description": "Plugin usage for the current calendar month.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageCurrent" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "usage" + ] + } + }, + "/teams/{team_name}/usage/{plugin_team}/{plugin_kind}/{plugin_name}": { + "get": { + "description": "Get plugin usage for the current calendar month.", + "operationId": "GetTeamPluginUsage", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "200": { + "description": "Plugin usage for the current calendar month.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageCurrent" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "usage" + ] + } + }, + "/teams/{team_name}/invitations": { + "get": { + "operationId": "ListTeamInvitations", + "description": "List of open invitations to the team", + "tags": [ + "teams", + "users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invitation" + } + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "post": { + "operationId": "EmailTeamInvitation", + "description": "Invite a user to join a team with their email address", + "tags": [ + "teams", + "users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email", + "role" + ], + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "role": { + "type": "string", + "enum": [ + "admin", + "member" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/invitations/accept": { + "post": { + "operationId": "AcceptTeamInvitation", + "description": "Accept an invitation to the team, creating a user membership", + "tags": [ + "teams", + "users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "format": "uuid" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "The invitation has been accepted and the authenticated user is now a member of the team.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MembershipWithTeam" + } + } + } + }, + "303": { + "description": "The authenticated user is already a member of this team.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MembershipWithTeam" + } + } + } + }, + "403": { + "description": "You do not have an invitation to join this team.", + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/invitations/{email}": { + "delete": { + "operationId": "CancelTeamInvitation", + "description": "Cancel an invitation to the team, preventing the user becoming a team member", + "tags": [ + "teams", + "users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/email" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/users": { + "get": { + "description": "List all users in the current team.", + "operationId": "ListUsersByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "users" + ] + } + }, + "/user": { + "get": { + "description": "Get the current authenticated user from the OAuth token\n", + "operationId": "GetCurrentUser", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "users" + ] + }, + "patch": { + "description": "Update attributes for the current authenticated user from the OAuth token", + "operationId": "UpdateCurrentUser", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The user's name", + "minLength": 1, + "maxLength": 255 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "405": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "users" + ] + } + }, + "/user/invitations": { + "get": { + "operationId": "ListCurrentUserInvitations", + "description": "List of the current user's unaccepted invitations", + "tags": [ + "teams", + "users" + ], + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvitationWithToken" + } + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/user/memberships": { + "get": { + "description": "Get memberships that the user has accepted.", + "operationId": "GetCurrentUserMemberships", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "required": [ + "metadata", + "items" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/MembershipWithTeam" + }, + "type": "array", + "example": [ + { + "role": "admin", + "team": { + "created_at": "2017-07-14T16:53:42Z", + "name": "cloudquery", + "display_name": "CloudQuery" + } + } + ] + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "users" + ] + } + }, + "/teams/{team_name}/apikeys": { + "get": { + "description": "List all team API Keys", + "operationId": "ListTeamAPIKeys", + "tags": [ + "teams" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/APIKey" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "post": { + "description": "Create new team API Key. This is useful in CI", + "operationId": "CreateTeamAPIKey", + "tags": [ + "teams" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "expires_at", + "role", + "name" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255 + }, + "expires_at": { + "type": "string", + "format": "date-time" + }, + "scope": { + "$ref": "#/components/schemas/APIKeyScope" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIKey" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/apikeys/{apikey_name}": { + "delete": { + "description": "Delete API Key. This will remove any future access by this API Key.", + "operationId": "DeleteTeamAPIKey", + "tags": [ + "teams" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/apikey_name" + } + ], + "responses": { + "204": { + "description": "Deleted" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -3064,305 +3764,676 @@ ] } }, - "title": "CloudQuery Plugin Version", + "title": "CloudQuery Plugin Version", + "type": "object" + }, + "PluginVersionUpdate": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Description of what's new or changed in this version (supports markdown)", + "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" + }, + "draft": { + "type": "boolean", + "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated." + }, + "retracted": { + "type": "boolean", + "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." + }, + "protocols": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "The supported CloudQuery protocols by this plugin version", + "example": [ + 1, + 2 + ] + }, + "supported_targets": { + "type": "array", + "items": { + "type": "string" + } + }, + "checksums": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The SHA-256 checksums of the plugin binaries, one per supported target." + }, + "package_type": { + "type": "string", + "description": "The package type of the plugin binaries" + } + } + }, + "PluginDocsPageName": { + "description": "The unique name for the plugin documentation page.", + "maxLength": 255, + "pattern": "^[\\w,\\s-]+$", + "type": "string", + "example": "overview" + }, + "PluginDocsPage": { + "additionalProperties": false, + "description": "CloudQuery Plugin Documentation Page", + "required": [ + "name", + "content" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/PluginDocsPageName" + }, + "content": { + "type": "string", + "description": "The content of the documentation page. Supports markdown.", + "example": "# Getting Started\n\nThis is the getting started page." + } + }, + "title": "CloudQuery Plugin Documentation Page", + "type": "object" + }, + "PluginDocsPageCreate": { + "additionalProperties": false, + "description": "CloudQuery Plugin Documentation Page", + "required": [ + "name", + "content" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/PluginDocsPageName" + }, + "content": { + "type": "string", + "description": "The content of the documentation page. Supports markdown.", + "example": "# Getting Started\n\nThis is the getting started page." + } + }, + "title": "CloudQuery Plugin Documentation Page", + "type": "object" + }, + "PluginTableName": { + "description": "Name of the table", + "maxLength": 255, + "pattern": "^[a-z](_?[a-z0-9]+)+$", + "type": "string", + "example": "aws_ec2_instances" + }, + "PluginTable": { + "additionalProperties": false, + "description": "CloudQuery Plugin Table", + "required": [ + "description", + "is_incremental", + "name", + "relations", + "title" + ], + "properties": { + "description": { + "description": "Description of the table", + "type": "string", + "example": "AWS S3 Buckets" + }, + "is_incremental": { + "description": "Whether the table is incremental", + "type": "boolean" + }, + "name": { + "$ref": "#/components/schemas/PluginTableName" + }, + "parent": { + "description": "Name of the parent table, if any", + "type": "string", + "example": "nil" + }, + "relations": { + "description": "Names of the tables that depend on this table", + "items": { + "type": "string" + }, + "type": "array", + "example": [ + "aws_s3_bucket_cors_rules" + ] + }, + "title": { + "description": "Title of the table", + "type": "string", + "example": "AWS S3 Buckets" + } + }, + "title": "CloudQuery Plugin Table", + "type": "object" + }, + "PluginTableColumn": { + "additionalProperties": false, + "description": "CloudQuery Plugin Column", + "required": [ + "description", + "incremental_key", + "name", + "not_null", + "primary_key", + "type", + "unique" + ], + "properties": { + "description": { + "description": "Description of the column", + "type": "string" + }, + "incremental_key": { + "description": "Whether the column is used as an incremental key", + "type": "boolean" + }, + "name": { + "description": "Name of the column", + "type": "string" + }, + "not_null": { + "description": "Whether the column is nullable", + "type": "boolean" + }, + "primary_key": { + "description": "Whether the column is part of the primary key", + "type": "boolean" + }, + "type": { + "description": "Arrow Type of the column", + "type": "string" + }, + "unique": { + "description": "Whether the column has a unique constraint", + "type": "boolean" + } + }, + "title": "CloudQuery Plugin Table Column", "type": "object" }, - "PluginVersionUpdate": { - "type": "object", + "PluginTableCreate": { + "additionalProperties": false, + "description": "CloudQuery Plugin Table", + "required": [ + "name" + ], "properties": { - "message": { + "description": { + "description": "Description of the table", "type": "string", - "description": "Description of what's new or changed in this version (supports markdown)", - "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" + "example": "AWS S3 Buckets" }, - "draft": { - "type": "boolean", - "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated." + "is_incremental": { + "description": "Whether the table is incremental", + "type": "boolean" }, - "retracted": { - "type": "boolean", - "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." + "name": { + "$ref": "#/components/schemas/PluginTableName" }, - "protocols": { - "type": "array", + "parent": { + "description": "Name of the parent table, if any", + "type": "string", + "example": "nil" + }, + "relations": { + "description": "Names of the tables that depend on this table", "items": { - "type": "integer" + "type": "string" }, - "description": "The supported CloudQuery protocols by this plugin version", + "type": "array", "example": [ - 1, - 2 + "aws_s3_bucket_cors_rules" ] }, - "supported_targets": { - "type": "array", - "items": { - "type": "string" - } + "title": { + "description": "Title of the table", + "type": "string", + "example": "AWS S3 Buckets" }, - "checksums": { + "columns": { "type": "array", "items": { - "type": "string" - }, - "description": "The SHA-256 checksums of the plugin binaries, one per supported target." - }, - "package_type": { - "type": "string", - "description": "The package type of the plugin binaries" + "$ref": "#/components/schemas/PluginTableColumn" + } } - } - }, - "PluginDocsPageName": { - "description": "The unique name for the plugin documentation page.", - "maxLength": 255, - "pattern": "^[\\w,\\s-]+$", - "type": "string", - "example": "overview" + }, + "title": "CloudQuery Plugin Table", + "type": "object" }, - "PluginDocsPage": { + "PluginTableDetails": { "additionalProperties": false, - "description": "CloudQuery Plugin Documentation Page", "required": [ + "columns", + "description", + "is_incremental", "name", - "content" + "relations", + "title" ], "properties": { + "columns": { + "description": "List of columns", + "items": { + "$ref": "#/components/schemas/PluginTableColumn" + }, + "type": "array" + }, + "description": { + "description": "Description of the table", + "type": "string" + }, + "is_incremental": { + "description": "Whether the table is incremental", + "type": "boolean" + }, "name": { - "$ref": "#/components/schemas/PluginDocsPageName" + "description": "Name of the table", + "type": "string" }, - "content": { - "type": "string", - "description": "The content of the documentation page. Supports markdown.", - "example": "# Getting Started\n\nThis is the getting started page." + "parent": { + "description": "Name of the parent table, if any", + "type": "string" + }, + "relations": { + "description": "Names of the tables that depend on this table", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "Title of the table", + "type": "string" } }, - "title": "CloudQuery Plugin Documentation Page", "type": "object" }, - "PluginDocsPageCreate": { - "additionalProperties": false, - "description": "CloudQuery Plugin Documentation Page", + "ReleaseURL": { "required": [ - "name", - "content" + "url" ], "properties": { - "name": { - "$ref": "#/components/schemas/PluginDocsPageName" - }, - "content": { - "type": "string", - "description": "The content of the documentation page. Supports markdown.", - "example": "# Getting Started\n\nThis is the getting started page." + "url": { + "type": "string" } - }, - "title": "CloudQuery Plugin Documentation Page", - "type": "object" + } }, - "PluginTableName": { - "description": "Name of the table", + "AddonName": { + "description": "The unique name for the addon.", "maxLength": 255, - "pattern": "^[a-z](_?[a-z0-9]+)+$", + "pattern": "^[a-z](-?[a-z0-9]+)+$", "type": "string", - "example": "aws_ec2_instances" + "example": "aws-policy" }, - "PluginTable": { + "AddonCategory": { + "description": "Supported categories for addons", + "type": "string", + "enum": [ + "cloud-infrastructure", + "databases", + "sales-marketing", + "engineering-analytics", + "other" + ] + }, + "AddonType": { + "description": "Supported types for addons", + "type": "string", + "enum": [ + "transformation", + "visualization" + ] + }, + "AddonFormat": { + "description": "Supported formats for addons", + "type": "string", + "enum": [ + "zip" + ] + }, + "AddonTier": { + "description": "Supported tiers for addons", + "type": "string", + "enum": [ + "free", + "paid" + ] + }, + "Addon": { "additionalProperties": false, - "description": "CloudQuery Plugin Table", + "description": "CloudQuery Addon", + "properties": { + "team_name": { + "$ref": "#/components/schemas/TeamName" + }, + "name": { + "$ref": "#/components/schemas/AddonName" + }, + "official": { + "description": "True if the addon is maintained by CloudQuery, false otherwise", + "type": "boolean" + }, + "category": { + "$ref": "#/components/schemas/AddonCategory" + }, + "addon_type": { + "$ref": "#/components/schemas/AddonType" + }, + "addon_format": { + "$ref": "#/components/schemas/AddonFormat" + }, + "tier": { + "$ref": "#/components/schemas/AddonTier" + }, + "price_usd": { + "type": "string", + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price for 6 months", + "example": "50", + "x-go-name": "PriceUSD" + }, + "short_description": { + "type": "string", + "minLength": 1, + "maxLength": 512, + "example": "AWS Asset inventory dashboard for grafana" + }, + "display_name": { + "description": "The addon's display name", + "type": "string", + "minLength": 1, + "maxLength": 50, + "example": "AWS Asset inventory" + }, + "homepage": { + "type": "string", + "example": "https://cloudquery.io" + }, + "repository": { + "type": "string", + "example": "https://github.com/cloudquery/cloudquery" + }, + "logo": { + "type": "string", + "example": "https://images.cloudquery.io/logos/aws.png" + }, + "public": { + "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type": "boolean" + }, + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + } + }, "required": [ - "description", - "is_incremental", + "team_name", "name", - "relations", - "title" + "display_name", + "official", + "category", + "addon_type", + "addon_format", + "tier", + "price_usd", + "short_description", + "logo", + "created_at" ], + "title": "CloudQuery Addon", + "type": "object" + }, + "AddonCreate": { + "additionalProperties": false, + "description": "CloudQuery AddonCreate", "properties": { - "description": { - "description": "Description of the table", + "team_name": { + "$ref": "#/components/schemas/TeamName" + }, + "name": { + "$ref": "#/components/schemas/AddonName" + }, + "category": { + "$ref": "#/components/schemas/AddonCategory" + }, + "addon_type": { + "$ref": "#/components/schemas/AddonType" + }, + "addon_format": { + "$ref": "#/components/schemas/AddonFormat" + }, + "tier": { + "$ref": "#/components/schemas/AddonTier" + }, + "price_usd": { "type": "string", - "example": "AWS S3 Buckets" + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price for 6 months", + "example": "50", + "x-go-name": "PriceUSD" }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" + "short_description": { + "type": "string", + "minLength": 1, + "maxLength": 512, + "example": "AWS Asset inventory dashboard for grafana" }, - "name": { - "$ref": "#/components/schemas/PluginTableName" + "display_name": { + "description": "The addon's display name", + "type": "string", + "minLength": 1, + "maxLength": 50, + "example": "AWS Asset inventory" }, - "parent": { - "description": "Name of the parent table, if any", + "homepage": { "type": "string", - "example": "nil" + "example": "https://cloudquery.io" }, - "relations": { - "description": "Names of the tables that depend on this table", - "items": { - "type": "string" - }, - "type": "array", - "example": [ - "aws_s3_bucket_cors_rules" - ] + "repository": { + "type": "string", + "example": "https://github.com/cloudquery/cloudquery" }, - "title": { - "description": "Title of the table", + "logo": { "type": "string", - "example": "AWS S3 Buckets" + "example": "https://images.cloudquery.io/logos/aws.png" + }, + "public": { + "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type": "boolean" } }, - "title": "CloudQuery Plugin Table", - "type": "object" - }, - "PluginTableColumn": { - "additionalProperties": false, - "description": "CloudQuery Plugin Column", "required": [ - "description", - "incremental_key", + "team_name", "name", - "not_null", - "primary_key", - "type", - "unique" + "category", + "addon_type", + "addon_format", + "tier", + "display_name", + "short_description", + "logo", + "public" ], + "title": "CloudQuery Addon", + "type": "object" + }, + "AddonUpdate": { + "additionalProperties": false, + "description": "CloudQuery AddonUpdate", "properties": { - "description": { - "description": "Description of the column", - "type": "string" + "category": { + "$ref": "#/components/schemas/AddonCategory" }, - "incremental_key": { - "description": "Whether the column is used as an incremental key", - "type": "boolean" + "addon_type": { + "$ref": "#/components/schemas/AddonType" }, - "name": { - "description": "Name of the column", - "type": "string" + "addon_format": { + "$ref": "#/components/schemas/AddonFormat" }, - "not_null": { - "description": "Whether the column is nullable", - "type": "boolean" + "tier": { + "$ref": "#/components/schemas/AddonTier" }, - "primary_key": { - "description": "Whether the column is part of the primary key", - "type": "boolean" + "price_usd": { + "type": "string", + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price for 6 months in USD", + "example": "50", + "x-go-name": "PriceUSD" }, - "type": { - "description": "Arrow Type of the column", - "type": "string" + "short_description": { + "type": "string", + "minLength": 1, + "maxLength": 512, + "example": "AWS Asset inventory dashboard for grafana" }, - "unique": { - "description": "Whether the column has a unique constraint", + "display_name": { + "description": "The addon's display name", + "type": "string", + "minLength": 1, + "maxLength": 50, + "example": "AWS Asset inventory" + }, + "homepage": { + "type": "string", + "example": "https://cloudquery.io" + }, + "repository": { + "type": "string", + "example": "https://github.com/cloudquery/cloudquery" + }, + "logo": { + "type": "string", + "example": "https://images.cloudquery.io/logos/aws.png" + }, + "public": { + "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", "type": "boolean" + }, + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" } }, - "title": "CloudQuery Plugin Table Column", + "title": "CloudQuery Addon", "type": "object" }, - "PluginTableCreate": { + "AddonVersion": { "additionalProperties": false, - "description": "CloudQuery Plugin Table", + "description": "CloudQuery Addon Version", "required": [ - "name" + "created_at", + "name", + "message", + "doc", + "plugin_deps", + "draft", + "retracted", + "checksum", + "plugin_deps" ], "properties": { - "description": { - "description": "Description of the table", + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", "type": "string", - "example": "AWS S3 Buckets" + "description": "The date and time the plugin version was created." }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" + "published_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "The date and time the plugin version was set to non-draft (published)." }, "name": { - "$ref": "#/components/schemas/PluginTableName" + "$ref": "#/components/schemas/VersionName" }, - "parent": { - "description": "Name of the parent table, if any", + "message": { "type": "string", - "example": "nil" + "description": "Description of what's new or changed in this version (supports markdown)", + "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" }, - "relations": { - "description": "Names of the tables that depend on this table", + "doc": { + "type": "string", + "description": "Main README in MD format" + }, + "draft": { + "type": "boolean", + "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version." + }, + "plugin_deps": { + "type": "array", "items": { - "type": "string" + "type": "string", + "minItems": 1 }, - "type": "array", - "example": [ - "aws_s3_bucket_cors_rules" - ] - }, - "title": { - "description": "Title of the table", - "type": "string", - "example": "AWS S3 Buckets" + "description": "list of plugins the addon depends on in the format of team_name/kind/name@version" }, - "columns": { + "addon_deps": { "type": "array", "items": { - "$ref": "#/components/schemas/PluginTableColumn" - } + "type": "string" + }, + "description": "list of other addons this addon depends on in the format of team_name/name@version" + }, + "retracted": { + "type": "boolean", + "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." + }, + "checksum": { + "type": "string", + "description": "The checksum of the addon asset" } }, - "title": "CloudQuery Plugin Table", + "title": "CloudQuery Addon Version", "type": "object" }, - "PluginTableDetails": { - "additionalProperties": false, - "required": [ - "columns", - "description", - "is_incremental", - "name", - "relations", - "title" - ], + "AddonVersionUpdate": { + "type": "object", "properties": { - "columns": { - "description": "List of columns", - "items": { - "$ref": "#/components/schemas/PluginTableColumn" - }, - "type": "array" - }, - "description": { - "description": "Description of the table", - "type": "string" + "message": { + "type": "string", + "description": "Description of what's new or changed in this version (supports markdown)", + "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" + "doc": { + "type": "string", + "description": "Main README in MD format" }, - "name": { - "description": "Name of the table", - "type": "string" + "draft": { + "type": "boolean", + "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version." }, - "parent": { - "description": "Name of the parent table, if any", - "type": "string" + "plugin_deps": { + "type": "array", + "items": { + "type": "string" + }, + "description": "list of plugins the addon depends on in the format of team_name/kind/name@version" }, - "relations": { - "description": "Names of the tables that depend on this table", + "addon_deps": { + "type": "array", "items": { "type": "string" }, - "type": "array" + "description": "list of other addons this addon depends on in the format of team_name/name@version" }, - "title": { - "description": "Title of the table", - "type": "string" - } - }, - "type": "object" - }, - "ReleaseURL": { - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" + "retracted": { + "type": "boolean", + "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." + }, + "checksum": { + "type": "string", + "description": "The checksum of the addon asset" } } }, @@ -3930,6 +5001,29 @@ "type": "string" } }, + "addon_sort_by": { + "description": "The field to sort by", + "in": "query", + "name": "sort_by", + "required": false, + "schema": { + "enum": [ + "created_at", + "updated_at", + "name", + "downloads" + ], + "type": "string" + } + }, + "addon_name": { + "in": "path", + "name": "addon_name", + "required": true, + "schema": { + "$ref": "#/components/schemas/AddonName" + } + }, "include_private": { "description": "Whether to include private plugins", "in": "query", From 715a2cea507ec10cd23f92e7278238ea5841db41 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:40:21 +0300 Subject: [PATCH 032/343] chore(main): Release v1.2.9 (#39) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c02deb0..e54fce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.8...v1.2.9) (2023-10-17) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#38](https://github.com/cloudquery/cloudquery-api-go/issues/38)) ([4a4f899](https://github.com/cloudquery/cloudquery-api-go/commit/4a4f8997c4457634b94e0740727f6a2f5a80b795)) + ## [1.2.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.7...v1.2.8) (2023-10-12) From 0bffdb20ef7533cac3d3953f593d56fc7dc09e24 Mon Sep 17 00:00:00 2001 From: Martin Norbury Date: Tue, 17 Oct 2023 12:46:02 +0100 Subject: [PATCH 033/343] feat: Moving configuration and auth logic (#37) This is being moved from cloudquery/cli to allow it to be shared by both the `plugin-sdk` and `cloudquery/cli` components. This may not be the best place for this code in the long run, but for now we want to share the code between `cloudquery/cli` and `plugin-sdk` without having `cloudquery/cli` introduce a dependency on the `plugin-sdk`. This PR also modifies the token issuing logic, to only refresh the ID token if the existing token is close to expiry. This is to minimise the API calls needed during the sync upsert process. --- .github/workflows/lint_golang.yml | 23 ++++ .github/workflows/unittest.yml | 28 +++++ .gitignore | 3 + Makefile | 8 ++ auth/token.go | 176 ++++++++++++++++++++++++++++++ auth/token_test.go | 144 ++++++++++++++++++++++++ config/config.go | 90 +++++++++++++++ config/config_test.go | 38 +++++++ go.mod | 9 +- go.sum | 51 +++++++++ 10 files changed, 569 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint_golang.yml create mode 100644 .github/workflows/unittest.yml create mode 100644 Makefile create mode 100644 auth/token.go create mode 100644 auth/token_test.go create mode 100644 config/config.go create mode 100644 config/config_test.go diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml new file mode 100644 index 0000000..e7eb9c7 --- /dev/null +++ b/.github/workflows/lint_golang.yml @@ -0,0 +1,23 @@ +name: Lint +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + golangci: + name: Lint with GolangCI + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.2 diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 0000000..4a51cad --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,28 @@ +name: "Unit tests" +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + unitests: + timeout-minutes: 30 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + - name: Set up Go 1.x + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - run: go mod download + - run: go build ./... + - name: Run tests + run: make test diff --git a/.gitignore b/.gitignore index 3b735ec..35a66d0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ # Go workspace file go.work + +# Intellij IDE file +.idea diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ced3bd --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +.PHONY: test +test: + go test -tags=assert -race ./... + +.PHONY: lint +lint: + golangci-lint run + diff --git a/auth/token.go b/auth/token.go new file mode 100644 index 0000000..c6d80d0 --- /dev/null +++ b/auth/token.go @@ -0,0 +1,176 @@ +package auth + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "os" + "strings" + "time" + + "github.com/adrg/xdg" +) + +const ( + FirebaseAPIKey = "AIzaSyCxsrwjABEF-dWLzUqmwiL-ct02cnG9GCs" + TokenBaseURL = "https://securetoken.googleapis.com" + EnvVarCloudQueryAPIKey = "CLOUDQUERY_API_KEY" + ExpiryBuffer = 60 * time.Second +) + +type tokenResponse struct { + AccessToken string `json:"access_token"` + ExpiresIn string `json:"expires_in"` + TokenType string `json:"token_type"` + RefreshToken string `json:"refresh_token"` + IDToken string `json:"id_token"` + UserID string `json:"user_id"` + ProjectID string `json:"project_id"` +} + +type TokenClient struct { + url string + apiKey string + idToken string + expiresAt time.Time +} + +func NewTokenClient() *TokenClient { + return &TokenClient{ + url: TokenBaseURL, + apiKey: FirebaseAPIKey, + } +} + +// GetToken returns the ID token +// If CLOUDQUERY_API_KEY is set, it returns that value, otherwise it returns an ID token generated from the refresh token. +func (tc *TokenClient) GetToken() (string, error) { + if token := os.Getenv(EnvVarCloudQueryAPIKey); token != "" { + return token, nil + } + + // If the token is not expired, return it + if !tc.expiresAt.IsZero() && tc.expiresAt.Sub(time.Now().UTC()) > ExpiryBuffer { + return tc.idToken, nil + } + + refreshToken, err := ReadRefreshToken() + if err != nil { + return "", fmt.Errorf("failed to read refresh token: %w. Hint: You may need to run `cloudquery login` or set %s", err, EnvVarCloudQueryAPIKey) + } + if refreshToken == "" { + return "", fmt.Errorf("authentication token not found. Hint: You may need to run `cloudquery login` or set %s", EnvVarCloudQueryAPIKey) + } + tokenResponse, err := tc.generateToken(refreshToken) + if err != nil { + return "", fmt.Errorf("failed to sign in with custom token: %w", err) + } + + if err := SaveRefreshToken(tokenResponse.RefreshToken); err != nil { + return "", fmt.Errorf("failed to save refresh token: %w", err) + } + + if err := tc.updateIDToken(tokenResponse); err != nil { + return "", fmt.Errorf("failed to update ID token: %w", err) + } + + return tc.idToken, nil +} + +func (tc *TokenClient) generateToken(refreshToken string) (*tokenResponse, error) { + data := url.Values{} + data.Set("grant_type", "refresh_token") + data.Set("refresh_token", refreshToken) + + resp, err := http.PostForm(fmt.Sprintf("%s/v1/token?key=%s", tc.url, tc.apiKey), data) + if err != nil { + return nil, err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + body, readErr := io.ReadAll(resp.Body) + if readErr != nil { + return nil, fmt.Errorf("failed to read response body: %w", readErr) + } + return nil, fmt.Errorf("failed to refresh token: %s: %s", resp.Status, body) + } + + var tr tokenResponse + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + if err := parseToken(body, &tr); err != nil { + return nil, err + } + + return &tr, nil +} + +func (tc *TokenClient) updateIDToken(tr *tokenResponse) error { + // Convert string duration in seconds to time.Duration + duration, err := time.ParseDuration(tr.ExpiresIn + "s") + if err != nil { + return err + } + + tc.expiresAt = time.Now().UTC().Add(duration) + tc.idToken = tr.IDToken + return nil +} + +func parseToken(response []byte, tr *tokenResponse) error { + err := json.Unmarshal(response, tr) + if err != nil { + return err + } + return nil +} + +// SaveRefreshToken saves the refresh token to the token file +func SaveRefreshToken(refreshToken string) error { + tokenFilePath, err := xdg.DataFile("cloudquery/token") + if err != nil { + return fmt.Errorf("failed to get token file path: %w", err) + } + tokenFile, err := os.OpenFile(tokenFilePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + if err != nil { + return fmt.Errorf("failed to open token file %q for writing: %w", tokenFilePath, err) + } + defer func() { + if closeErr := tokenFile.Close(); closeErr != nil { + fmt.Printf("error closing token file: %v", closeErr) + } + }() + if _, err = tokenFile.WriteString(refreshToken); err != nil { + return fmt.Errorf("failed to write token to %q: %w", tokenFilePath, err) + } + return nil +} + +// ReadRefreshToken reads the refresh token from the token file +func ReadRefreshToken() (string, error) { + tokenFilePath, err := xdg.DataFile("cloudquery/token") + if err != nil { + return "", fmt.Errorf("failed to get token file path: %w", err) + } + b, err := os.ReadFile(tokenFilePath) + if err != nil { + return "", fmt.Errorf("failed to read token file: %w", err) + } + return strings.TrimSpace(string(b)), nil +} + +// RemoveRefreshToken removes the token file +func RemoveRefreshToken() error { + tokenFilePath, err := xdg.DataFile("cloudquery/token") + if err != nil { + return fmt.Errorf("failed to get token file path: %w", err) + } + if err := os.RemoveAll(tokenFilePath); err != nil { + return fmt.Errorf("failed to remove token file %q: %w", tokenFilePath, err) + } + return nil +} diff --git a/auth/token_test.go b/auth/token_test.go new file mode 100644 index 0000000..bbaffa8 --- /dev/null +++ b/auth/token_test.go @@ -0,0 +1,144 @@ +package auth + +import ( + "encoding/json" + "fmt" + "github.com/stretchr/testify/require" + "net/http" + "net/http/httptest" + "os" + "testing" + "time" +) + +func TestRefreshToken_RoundTrip(t *testing.T) { + token := "my_token" + + err := SaveRefreshToken(token) + require.NoError(t, err) + + readToken, err := ReadRefreshToken() + require.NoError(t, err) + + require.Equal(t, token, readToken) +} + +func TestRefreshToken_Removal(t *testing.T) { + token := "my_token" + + err := SaveRefreshToken(token) + require.NoError(t, err) + + _, err = ReadRefreshToken() + require.NoError(t, err) + + err = RemoveRefreshToken() + require.NoError(t, err) + + _, err = ReadRefreshToken() + require.Error(t, err) +} + +func TestTokenClient_EnvironmentVariable(t *testing.T) { + reset := overrideEnvironmentVariable(t, EnvVarCloudQueryAPIKey, "my_token") + defer reset() + + token, err := NewTokenClient().GetToken() + require.NoError(t, err) + + require.Equal(t, "my_token", token) +} + +func TestTokenClient_GetToken_ShortExpiry(t *testing.T) { + server, closer := fakeAuthServer(t, "0") + defer closer() + + err := SaveRefreshToken("my_refresh_token") + require.NoError(t, err) + + t0 := time.Now().UTC() + + tc := TokenClient{ + url: server.URL, + apiKey: "my-api-key", + expiresAt: t0, + } + + token, err := tc.GetToken() + require.NoError(t, err) + require.Equal(t, "my_id_token_0", token, "first token") + + tc.expiresAt = t0 + + token, err = tc.GetToken() + require.NoError(t, err) + require.Equal(t, "my_id_token_1", token, "expected to issue new token") +} + +func TestTokenClient_GetToken_LongExpiry(t *testing.T) { + server, closer := fakeAuthServer(t, "3600") + defer closer() + + err := SaveRefreshToken("my_refresh_token") + require.NoError(t, err) + + tc := TokenClient{ + url: server.URL, + apiKey: "my-api-key", + } + + token, err := tc.GetToken() + require.NoError(t, err) + require.Equal(t, "my_id_token_0", token, "first token") + + token, err = tc.GetToken() + require.NoError(t, err) + require.Equal(t, "my_id_token_0", token, "expected to reuse token") +} + +func overrideEnvironmentVariable(t *testing.T, key, value string) func() { + originalValue := os.Getenv(key) + resetFn := func() { + err := os.Setenv(key, originalValue) + require.NoError(t, err) + } + + err := os.Setenv(key, value) + require.NoError(t, err) + + return resetFn +} + +func fakeAuthServer(t *testing.T, expiresIn string) (*httptest.Server, func()) { + tokenCount := 0 + + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + require.Equal(t, http.MethodPost, r.Method) + require.Equal(t, "/v1/token?key=my-api-key", r.URL.String()) + + err := r.ParseForm() + require.NoError(t, err) + + require.Equal(t, "my_refresh_token", r.Form.Get("refresh_token")) + require.Equal(t, "refresh_token", r.Form.Get("grant_type")) + + w.Header().Set("Content-Type", "application/json") + response := tokenResponse{ + AccessToken: "my_access_token", + ExpiresIn: expiresIn, + TokenType: "Bearer", + RefreshToken: "my_refresh_token", + IDToken: fmt.Sprintf("my_id_token_%d", tokenCount), + UserID: "abcd-1234", + ProjectID: "project-1", + } + err = json.NewEncoder(w).Encode(response) + require.NoError(t, err) + + tokenCount++ + })) + + return server, func() { + server.Close() + } +} diff --git a/config/config.go b/config/config.go new file mode 100644 index 0000000..deb7c01 --- /dev/null +++ b/config/config.go @@ -0,0 +1,90 @@ +package config + +import ( + "encoding/json" + "fmt" + "os" + "slices" + "strings" + + "github.com/adrg/xdg" +) + +const configPath = "cloudquery/config.json" + +var configKeys = []string{ + "team", +} + +// GetValue reads the value of a config key from the config file +func GetValue(key string) (string, error) { + if !slices.Contains(configKeys, key) { + return "", fmt.Errorf("invalid config key %v (options are: %v)", key, strings.Join(configKeys, ", ")) + } + configFilePath, err := xdg.ConfigFile(configPath) + if err != nil { + return "", fmt.Errorf("failed to get config file path: %w", err) + } + b, err := os.ReadFile(configFilePath) + if err != nil { + return "", fmt.Errorf("failed to read config file: %w", err) + } + var config map[string]any + err = json.Unmarshal(b, &config) + if err != nil { + return "", fmt.Errorf("failed to parse config file: %w", err) + } + if _, ok := config[key]; !ok { + return "", nil + } + return config[key].(string), nil +} + +// SetValue updates the value of a config key in the config file +func SetValue(key, val string) error { + return setValue(key, &val) +} + +// UnsetValue removes the value of a config key from the config file +func UnsetValue(key string) error { + return setValue(key, nil) +} + +func setValue(key string, val *string) error { + if !slices.Contains(configKeys, key) { + return fmt.Errorf("invalid config key %v (options are: %v)", key, strings.Join(configKeys, ", ")) + } + configFilePath, err := xdg.ConfigFile(configPath) + if err != nil { + return fmt.Errorf("failed to get config file path: %w", err) + } + var config map[string]any + b, err := os.ReadFile(configFilePath) + switch { + case err == nil: + err = json.Unmarshal(b, &config) + if err != nil { + return fmt.Errorf("failed to parse config file: %w", err) + } + case os.IsNotExist(err): + config = make(map[string]any) + default: + return fmt.Errorf("failed to read config file: %w", err) + } + if val == nil { + // unset + delete(config, key) + } else { + // set + config[key] = val + } + b, err = json.Marshal(config) + if err != nil { + return fmt.Errorf("failed to marshal config: %w", err) + } + err = os.WriteFile(configFilePath, b, 0o644) + if err != nil { + return fmt.Errorf("failed to write config file: %w", err) + } + return nil +} diff --git a/config/config_test.go b/config/config_test.go new file mode 100644 index 0000000..89d7762 --- /dev/null +++ b/config/config_test.go @@ -0,0 +1,38 @@ +package config + +import ( + "testing" + + "github.com/adrg/xdg" +) + +func TestSetGetValue(t *testing.T) { + t.Setenv("XDG_CONFIG_HOME", t.TempDir()) + xdg.Reload() + + err := SetValue("team", "my-team") + if err != nil { + t.Fatal(err) + } + + got, err := GetValue("team") + if err != nil { + t.Fatal(err) + } + if got != "my-team" { + t.Fatalf("expected %q, got %q", "my-team", got) + } + + err = UnsetValue("team") + if err != nil { + t.Fatal(err) + } + + got, err = GetValue("team") + if err != nil { + t.Fatal(err) + } + if got != "" { + t.Fatalf("expected %q, got %q", "", got) + } +} diff --git a/go.mod b/go.mod index 567ffe1..a1a6a36 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,12 @@ module github.com/cloudquery/cloudquery-api-go go 1.21.0 +require ( + github.com/adrg/xdg v0.4.0 + github.com/deepmap/oapi-codegen v1.15.0 + github.com/stretchr/testify v1.8.4 +) + require ( github.com/BurntSushi/toml v1.3.2 // indirect github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect @@ -13,7 +19,7 @@ require ( github.com/aymerick/douceur v0.2.0 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/deepmap/oapi-codegen v1.15.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/flosch/pongo2/v4 v4.0.2 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect @@ -49,6 +55,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/schollz/closestmatch v2.1.0+incompatible // indirect github.com/sirupsen/logrus v1.8.1 // indirect diff --git a/go.sum b/go.sum index da96c7d..70e4993 100644 --- a/go.sum +++ b/go.sum @@ -4,12 +4,17 @@ github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4s github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= +github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= +github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= +github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= +github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= @@ -24,9 +29,12 @@ github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deepmap/oapi-codegen v1.15.0 h1:SQqViaeb4k2vMul8gx12oDOIadEtoRqTdLkxjzqtQ90= github.com/deepmap/oapi-codegen v1.15.0/go.mod h1:a6KoHV7lMRwsPoEg2C6NDHiXYV3EQfiFocOlJ8dgJQE= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= @@ -37,12 +45,16 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -50,12 +62,21 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= +github.com/iris-contrib/httpexpect/v2 v2.15.2/go.mod h1:JLDgIqnFy5loDSUv1OA2j0mb6p/rDhiCqigP22Uq9xE= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -81,6 +102,7 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= @@ -101,19 +123,27 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= +github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= @@ -129,10 +159,13 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= +github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= @@ -147,8 +180,20 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= @@ -174,6 +219,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -194,17 +240,22 @@ golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= +moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From 9ca0d70352b225a6028f28efb77e493b798a3c44 Mon Sep 17 00:00:00 2001 From: Martin Norbury Date: Tue, 17 Oct 2023 12:58:43 +0100 Subject: [PATCH 034/343] chore: Remove `-tags=assert` test tags (#41) These tags are required for arrow based tests - which are needed in this project refs: https://github.com/cloudquery/cloudquery-issues/issues/668 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8ced3bd..357a92a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: test test: - go test -tags=assert -race ./... + go test -race ./... .PHONY: lint lint: From 3b53c4512fb2cee37c37e120f4f4bbd420efccf9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:03:00 +0300 Subject: [PATCH 035/343] chore(main): Release v1.3.0 (#40) :robot: I have created a release *beep* *boop* --- ## [1.3.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.9...v1.3.0) (2023-10-17) ### Features * Moving configuration and auth logic ([#37](https://github.com/cloudquery/cloudquery-api-go/issues/37)) ([0bffdb2](https://github.com/cloudquery/cloudquery-api-go/commit/0bffdb20ef7533cac3d3953f593d56fc7dc09e24)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e54fce0..61cc2af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.9...v1.3.0) (2023-10-17) + + +### Features + +* Moving configuration and auth logic ([#37](https://github.com/cloudquery/cloudquery-api-go/issues/37)) ([0bffdb2](https://github.com/cloudquery/cloudquery-api-go/commit/0bffdb20ef7533cac3d3953f593d56fc7dc09e24)) + ## [1.2.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.8...v1.2.9) (2023-10-17) From 32351436b1bbf3bfd3247a692d2d990f058f2250 Mon Sep 17 00:00:00 2001 From: Martin Norbury Date: Tue, 17 Oct 2023 16:37:50 +0100 Subject: [PATCH 036/343] feat: Allow configurable config home directory (#42) --- auth/token.go | 42 +++------------------- config/config.go | 84 +++++++++++++++++++++++++++++++++++++++++++ config/config_test.go | 51 ++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 37 deletions(-) diff --git a/auth/token.go b/auth/token.go index c6d80d0..5813743 100644 --- a/auth/token.go +++ b/auth/token.go @@ -3,14 +3,12 @@ package auth import ( "encoding/json" "fmt" + "github.com/cloudquery/cloudquery-api-go/config" "io" "net/http" "net/url" "os" - "strings" "time" - - "github.com/adrg/xdg" ) const ( @@ -18,6 +16,7 @@ const ( TokenBaseURL = "https://securetoken.googleapis.com" EnvVarCloudQueryAPIKey = "CLOUDQUERY_API_KEY" ExpiryBuffer = 60 * time.Second + tokenFilePath = "cloudquery/token" ) type tokenResponse struct { @@ -131,46 +130,15 @@ func parseToken(response []byte, tr *tokenResponse) error { // SaveRefreshToken saves the refresh token to the token file func SaveRefreshToken(refreshToken string) error { - tokenFilePath, err := xdg.DataFile("cloudquery/token") - if err != nil { - return fmt.Errorf("failed to get token file path: %w", err) - } - tokenFile, err := os.OpenFile(tokenFilePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) - if err != nil { - return fmt.Errorf("failed to open token file %q for writing: %w", tokenFilePath, err) - } - defer func() { - if closeErr := tokenFile.Close(); closeErr != nil { - fmt.Printf("error closing token file: %v", closeErr) - } - }() - if _, err = tokenFile.WriteString(refreshToken); err != nil { - return fmt.Errorf("failed to write token to %q: %w", tokenFilePath, err) - } - return nil + return config.SaveDataString(tokenFilePath, refreshToken) } // ReadRefreshToken reads the refresh token from the token file func ReadRefreshToken() (string, error) { - tokenFilePath, err := xdg.DataFile("cloudquery/token") - if err != nil { - return "", fmt.Errorf("failed to get token file path: %w", err) - } - b, err := os.ReadFile(tokenFilePath) - if err != nil { - return "", fmt.Errorf("failed to read token file: %w", err) - } - return strings.TrimSpace(string(b)), nil + return config.ReadDataString(tokenFilePath) } // RemoveRefreshToken removes the token file func RemoveRefreshToken() error { - tokenFilePath, err := xdg.DataFile("cloudquery/token") - if err != nil { - return fmt.Errorf("failed to get token file path: %w", err) - } - if err := os.RemoveAll(tokenFilePath); err != nil { - return fmt.Errorf("failed to remove token file %q: %w", tokenFilePath, err) - } - return nil + return config.DeleteDataString(tokenFilePath) } diff --git a/config/config.go b/config/config.go index deb7c01..7b259e3 100644 --- a/config/config.go +++ b/config/config.go @@ -16,6 +16,16 @@ var configKeys = []string{ "team", } +// SetConfigHome sets the configuration home directory - useful for testing +func SetConfigHome(configDir string) error { + return setXDGEnv("XDG_CONFIG_HOME", configDir) +} + +// UnsetConfigHome unsets the configuration home directory returning to the default value +func UnsetConfigHome() error { + return unsetXDGEnv("XDG_CONFIG_HOME") +} + // GetValue reads the value of a config key from the config file func GetValue(key string) (string, error) { if !slices.Contains(configKeys, key) { @@ -88,3 +98,77 @@ func setValue(key string, val *string) error { } return nil } + +// SetDataHome sets the data home directory - useful for testing +func SetDataHome(dataHome string) error { + return setXDGEnv("XDG_DATA_HOME", dataHome) +} + +// UnsetDataHome unsets the data home directory returning to the default value +func UnsetDataHome() error { + return unsetXDGEnv("XDG_DATA_HOME") +} + +// SaveDataString saves a string to a file in the data home directory +func SaveDataString(relPath string, data string) error { + filePath, err := xdg.DataFile(relPath) + if err != nil { + return fmt.Errorf("failed to get file path: %w", err) + } + file, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + if err != nil { + return fmt.Errorf("failed to open file %q for writing: %w", filePath, err) + } + defer func() { + if closeErr := file.Close(); closeErr != nil { + fmt.Printf("error closing file: %v", closeErr) + } + }() + if _, err = file.WriteString(data); err != nil { + return fmt.Errorf("failed to write data to %q: %w", filePath, err) + } + return nil +} + +// ReadDataString reads a string from a file in the data home directory +func ReadDataString(relPath string) (string, error) { + filePath, err := xdg.DataFile(relPath) + if err != nil { + return "", fmt.Errorf("failed to get file path: %w", err) + } + b, err := os.ReadFile(filePath) + if err != nil { + return "", fmt.Errorf("failed to read file: %w", err) + } + return strings.TrimSpace(string(b)), nil +} + +// DeleteDataString deletes a file in the data home directory +func DeleteDataString(relPath string) error { + filePath, err := xdg.DataFile(relPath) + if err != nil { + return fmt.Errorf("failed to get file path: %w", err) + } + if err := os.RemoveAll(filePath); err != nil { + return fmt.Errorf("failed to remove file %q: %w", filePath, err) + } + return nil +} + +func setXDGEnv(key, value string) error { + err := os.Setenv(key, value) + if err != nil { + return fmt.Errorf("failed to set %s: %w", key, err) + } + xdg.Reload() + return nil +} + +func unsetXDGEnv(key string) error { + err := os.Unsetenv(key) + if err != nil { + return fmt.Errorf("failed to unset %s: %w", key, err) + } + xdg.Reload() + return nil +} diff --git a/config/config_test.go b/config/config_test.go index 89d7762..d637917 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -1,6 +1,9 @@ package config import ( + "github.com/stretchr/testify/require" + "os" + "path" "testing" "github.com/adrg/xdg" @@ -36,3 +39,51 @@ func TestSetGetValue(t *testing.T) { t.Fatalf("expected %q, got %q", "", got) } } + +func TestSetConfigHome(t *testing.T) { + r := require.New(t) + configDir := t.TempDir() + + err := SetConfigHome(configDir) + r.NoError(err) + + r.Equal(configDir, xdg.ConfigHome) + + err = SetValue("team", "set-config-test-value") + r.NoError(err) + + // check that the config file was created in the temporary directory, + // not somewhere else + _, err = os.Stat(path.Join(configDir, "cloudquery", "config.json")) + r.NoError(err) + + err = UnsetConfigHome() + r.NoError(err) + + // check that we are no longer set to the temporary directory + r.NotEqual(configDir, xdg.ConfigHome) +} + +func TestSetDataHome(t *testing.T) { + r := require.New(t) + configDir := t.TempDir() + + err := SetDataHome(configDir) + r.NoError(err) + + r.Equal(configDir, xdg.DataHome) + + err = SaveDataString("cloudquery/token", "my-token") + r.NoError(err) + + // check that the config file was created in the temporary directory, + // not somewhere else + _, err = os.Stat(path.Join(configDir, "cloudquery", "token")) + r.NoError(err) + + err = UnsetDataHome() + r.NoError(err) + + // check that we are no longer set to the temporary directory + r.NotEqual(configDir, xdg.DataHome) +} From aec92fa6f7a78e50dd44424cb1ada8e0733ba22f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 17 Oct 2023 18:46:26 +0300 Subject: [PATCH 037/343] chore(main): Release v1.4.0 (#43) :robot: I have created a release *beep* *boop* --- ## [1.4.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.3.0...v1.4.0) (2023-10-17) ### Features * Allow configurable config home directory ([#42](https://github.com/cloudquery/cloudquery-api-go/issues/42)) ([3235143](https://github.com/cloudquery/cloudquery-api-go/commit/32351436b1bbf3bfd3247a692d2d990f058f2250)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61cc2af..2744723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.3.0...v1.4.0) (2023-10-17) + + +### Features + +* Allow configurable config home directory ([#42](https://github.com/cloudquery/cloudquery-api-go/issues/42)) ([3235143](https://github.com/cloudquery/cloudquery-api-go/commit/32351436b1bbf3bfd3247a692d2d990f058f2250)) + ## [1.3.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.9...v1.3.0) (2023-10-17) From abcb4233fe7c653c78c8ecfdab29188bdc76f0f4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 18 Oct 2023 13:55:57 +0300 Subject: [PATCH 038/343] fix: Generate CloudQuery Go API Client from `spec.json` (#44) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 4 ++-- spec.json | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/models.gen.go b/models.gen.go index 3b4d534..ebc7e51 100644 --- a/models.gen.go +++ b/models.gen.go @@ -938,7 +938,7 @@ type CreateAddonVersionJSONBody struct { // AddonDeps addon dependencies in the format of ['team_name/addon_name@version'] AddonDeps *[]string `json:"addon_deps,omitempty"` - // Checksum SHA-256 checksums for this addon version. + // Checksum SHA-256 checksum for the addon asset Checksum string `json:"checksum"` // Doc Main README in MD format @@ -950,7 +950,7 @@ type CreateAddonVersionJSONBody struct { Message string `json:"message"` // PluginDeps plugin dependencies in the format of ['team_name/kind/plugin_name@version'] - PluginDeps *[]string `json:"plugin_deps,omitempty"` + PluginDeps []string `json:"plugin_deps"` } // ListPluginsParams defines parameters for ListPlugins. diff --git a/spec.json b/spec.json index cd70ed9..bb3074c 100644 --- a/spec.json +++ b/spec.json @@ -1567,7 +1567,8 @@ "required": [ "message", "doc", - "checksum" + "checksum", + "plugin_deps" ], "properties": { "message": { @@ -1585,7 +1586,8 @@ "items": { "type": "string" }, - "description": "plugin dependencies in the format of ['team_name/kind/plugin_name@version']" + "description": "plugin dependencies in the format of ['team_name/kind/plugin_name@version']", + "minItems": 1 }, "addon_deps": { "type": "array", @@ -1596,7 +1598,7 @@ }, "checksum": { "type": "string", - "description": "SHA-256 checksums for this addon version." + "description": "SHA-256 checksum for the addon asset" } } } @@ -4338,8 +4340,7 @@ "plugin_deps", "draft", "retracted", - "checksum", - "plugin_deps" + "checksum" ], "properties": { "created_at": { From 92b90f97a7ed6ad96f53ebaaf78204b61d40c0b1 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:00:03 +0300 Subject: [PATCH 039/343] chore(main): Release v1.4.1 (#45) :robot: I have created a release *beep* *boop* --- ## [1.4.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.0...v1.4.1) (2023-10-18) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#44](https://github.com/cloudquery/cloudquery-api-go/issues/44)) ([abcb423](https://github.com/cloudquery/cloudquery-api-go/commit/abcb4233fe7c653c78c8ecfdab29188bdc76f0f4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2744723..09c71cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.0...v1.4.1) (2023-10-18) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#44](https://github.com/cloudquery/cloudquery-api-go/issues/44)) ([abcb423](https://github.com/cloudquery/cloudquery-api-go/commit/abcb4233fe7c653c78c8ecfdab29188bdc76f0f4)) + ## [1.4.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.3.0...v1.4.0) (2023-10-17) From 5f83a82d4cbf79271609c12c612ba495c6613ef6 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:00:23 +0300 Subject: [PATCH 040/343] fix: Generate CloudQuery Go API Client from `spec.json` (#46) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ models.gen.go | 3 +++ spec.json | 11 ++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/client.gen.go b/client.gen.go index 726b20b..9be7269 100644 --- a/client.gen.go +++ b/client.gen.go @@ -6046,6 +6046,7 @@ type ListTeamAPIKeysResponse struct { Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication + JSON404 *NotFound JSON500 *InternalError } @@ -9359,6 +9360,13 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index ebc7e51..e7a5706 100644 --- a/models.gen.go +++ b/models.gen.go @@ -135,6 +135,9 @@ type APIKey struct { CreatedAt *time.Time `json:"created_at,omitempty"` CreatedBy *Email `json:"created_by,omitempty"` + // Expired Whether the API key has expired or not + Expired bool `json:"expired"` + // ExpiresAt Timestamp at which API key will stop working ExpiresAt time.Time `json:"expires_at"` diff --git a/spec.json b/spec.json index bb3074c..ffc88c5 100644 --- a/spec.json +++ b/spec.json @@ -3223,6 +3223,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -4786,7 +4789,8 @@ "required": [ "name", "scope", - "expires_at" + "expires_at", + "expired" ], "properties": { "name": { @@ -4812,6 +4816,11 @@ "format": "date-time", "example": "2017-07-14T16:53:42Z" }, + "expired": { + "type": "boolean", + "description": "Whether the API key has expired or not", + "example": false + }, "scope": { "$ref": "#/components/schemas/APIKeyScope" } From 7dfeae55de35be96272a16b56cce36b4250e03b0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:26:25 +0300 Subject: [PATCH 041/343] fix: Generate CloudQuery Go API Client from `spec.json` (#48) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 --- spec.json | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/models.gen.go b/models.gen.go index e7a5706..207acb7 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1099,9 +1099,6 @@ type ListTeamAPIKeysParams struct { type CreateTeamAPIKeyJSONBody struct { ExpiresAt time.Time `json:"expires_at"` Name string `json:"name"` - - // Scope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins - Scope *APIKeyScope `json:"scope,omitempty"` } // ListTeamInvitationsParams defines parameters for ListTeamInvitations. diff --git a/spec.json b/spec.json index ffc88c5..5e5a01a 100644 --- a/spec.json +++ b/spec.json @@ -3232,7 +3232,7 @@ } }, "post": { - "description": "Create new team API Key. This is useful in CI", + "description": "Create new team API Key.", "operationId": "CreateTeamAPIKey", "tags": [ "teams" @@ -3249,20 +3249,17 @@ "type": "object", "required": [ "expires_at", - "role", "name" ], "properties": { "name": { "type": "string", + "minLength": 1, "maxLength": 255 }, "expires_at": { "type": "string", "format": "date-time" - }, - "scope": { - "$ref": "#/components/schemas/APIKeyScope" } } } From b67368efe71d56298d64b101c92e3c14733cdf0b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:10:47 +0300 Subject: [PATCH 042/343] fix: Generate CloudQuery Go API Client from `spec.json` (#49) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 8 +++++--- spec.json | 12 +++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/models.gen.go b/models.gen.go index 207acb7..06ed97b 100644 --- a/models.gen.go +++ b/models.gen.go @@ -852,8 +852,8 @@ type VersionName = string // AddonSortBy defines model for addon_sort_by. type AddonSortBy string -// APIKeyPathName defines model for apikey_name. -type APIKeyPathName = string +// APIKeyPathName Name of the API key +type APIKeyPathName = APIKeyName // IncludeDrafts defines model for include_drafts. type IncludeDrafts = bool @@ -1098,7 +1098,9 @@ type ListTeamAPIKeysParams struct { // CreateTeamAPIKeyJSONBody defines parameters for CreateTeamAPIKey. type CreateTeamAPIKeyJSONBody struct { ExpiresAt time.Time `json:"expires_at"` - Name string `json:"name"` + + // Name Name of the API key + Name APIKeyName `json:"name"` } // ListTeamInvitationsParams defines parameters for ListTeamInvitations. diff --git a/spec.json b/spec.json index 5e5a01a..990d71f 100644 --- a/spec.json +++ b/spec.json @@ -3253,9 +3253,7 @@ ], "properties": { "name": { - "type": "string", - "minLength": 1, - "maxLength": 255 + "$ref": "#/components/schemas/APIKeyName" }, "expires_at": { "type": "string", @@ -4771,7 +4769,7 @@ "example": "cli-api-key", "maxLength": 255, "minLength": 1, - "pattern": "^[a-zA-Z0-9-]+$" + "pattern": "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$" }, "APIKeyScope": { "description": "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", @@ -5061,11 +5059,7 @@ "in": "path", "required": true, "schema": { - "type": "string", - "example": "cli-api-key", - "maxLength": 255, - "minLength": 1, - "pattern": "^[a-zA-Z0-9-]+$" + "$ref": "#/components/schemas/APIKeyName" }, "x-go-name": "APIKeyPathName" } From eeb9744efd103f9f499355fd68735d8d4d2c6f6d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 24 Oct 2023 18:07:05 +0300 Subject: [PATCH 043/343] fix: Generate CloudQuery Go API Client from `spec.json` (#50) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++-------- models.gen.go | 10 ++++++++-- spec.json | 23 +++++++++++++++++------ 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/client.gen.go b/client.gen.go index 9be7269..69909ec 100644 --- a/client.gen.go +++ b/client.gen.go @@ -234,7 +234,7 @@ type ClientInterface interface { CreateTeamAPIKey(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTeamAPIKey request - DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeamInvitations request ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -948,8 +948,8 @@ func (c *Client) CreateTeamAPIKey(ctx context.Context, teamName TeamName, body C return c.Client.Do(req) } -func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, aPIKeyPathName) +func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, aPIKeyID) if err != nil { return nil, err } @@ -3604,7 +3604,7 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten } // NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey -func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName APIKeyPathName) (*http.Request, error) { +func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyID APIKeyID) (*http.Request, error) { var err error var pathParam0 string @@ -3616,7 +3616,7 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyPathName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, aPIKeyPathName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_id", runtime.ParamLocationPath, aPIKeyID) if err != nil { return nil, err } @@ -5000,7 +5000,7 @@ type ClientWithResponsesInterface interface { CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) // ListTeamInvitationsWithResponse request ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) @@ -7143,8 +7143,8 @@ func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, } // DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse -func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyPathName APIKeyPathName, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { - rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyPathName, reqEditors...) +func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { + rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyID, reqEditors...) if err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 06ed97b..86d90bb 100644 --- a/models.gen.go +++ b/models.gen.go @@ -141,6 +141,9 @@ type APIKey struct { // ExpiresAt Timestamp at which API key will stop working ExpiresAt time.Time `json:"expires_at"` + // Id ID of the API key + ID ID `json:"id"` + // Key API key. Will be shown only in the response when creating the key. Key *string `json:"key,omitempty"` @@ -151,6 +154,9 @@ type APIKey struct { Scope APIKeyScope `json:"scope"` } +// ID ID of the API key +type ID = openapi_types.UUID + // APIKeyName Name of the API key type APIKeyName = string @@ -852,8 +858,8 @@ type VersionName = string // AddonSortBy defines model for addon_sort_by. type AddonSortBy string -// APIKeyPathName Name of the API key -type APIKeyPathName = APIKeyName +// APIKeyID ID of the API key +type APIKeyID = ID // IncludeDrafts defines model for include_drafts. type IncludeDrafts = bool diff --git a/spec.json b/spec.json index 990d71f..987e713 100644 --- a/spec.json +++ b/spec.json @@ -3290,7 +3290,7 @@ } } }, - "/teams/{team_name}/apikeys/{apikey_name}": { + "/teams/{team_name}/apikeys/{apikey_id}": { "delete": { "description": "Delete API Key. This will remove any future access by this API Key.", "operationId": "DeleteTeamAPIKey", @@ -3302,7 +3302,7 @@ "$ref": "#/components/parameters/team_name" }, { - "$ref": "#/components/parameters/apikey_name" + "$ref": "#/components/parameters/apikey_id" } ], "responses": { @@ -4771,6 +4771,13 @@ "minLength": 1, "pattern": "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$" }, + "APIKeyID": { + "description": "ID of the API key", + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "x-go-name": "ID" + }, "APIKeyScope": { "description": "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", "type": "string", @@ -4782,6 +4789,7 @@ "description": "API Key to interact with CloudQuery Cloud under specific team", "type": "object", "required": [ + "id", "name", "scope", "expires_at", @@ -4795,6 +4803,9 @@ "$ref": "#/components/schemas/Email", "description": "email of the user that created the API key" }, + "id": { + "$ref": "#/components/schemas/APIKeyID" + }, "key": { "type": "string", "description": "API key. Will be shown only in the response when creating the key.", @@ -5054,14 +5065,14 @@ "$ref": "#/components/schemas/Email" } }, - "apikey_name": { - "name": "apikey_name", + "apikey_id": { + "name": "apikey_id", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/APIKeyName" + "$ref": "#/components/schemas/APIKeyID" }, - "x-go-name": "APIKeyPathName" + "x-go-name": "APIKeyID" } } } From c7fa339728fa234a9b4923567e2fa42d39f1e7ab Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:21:17 +0300 Subject: [PATCH 044/343] fix: Generate CloudQuery Go API Client from `spec.json` (#51) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ models.gen.go | 3 +++ spec.json | 13 +++++++++++++ 3 files changed, 24 insertions(+) diff --git a/client.gen.go b/client.gen.go index 69909ec..52d4c69 100644 --- a/client.gen.go +++ b/client.gen.go @@ -6477,6 +6477,7 @@ type IncreaseTeamPluginUsageResponse struct { JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError + JSON503 *ServiceUnavailable } // Status returns HTTPResponse.Status @@ -10239,6 +10240,13 @@ func ParseIncreaseTeamPluginUsageResponse(rsp *http.Response) (*IncreaseTeamPlug } response.JSON500 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + } return response, nil diff --git a/models.gen.go b/models.gen.go index 86d90bb..98207e6 100644 --- a/models.gen.go +++ b/models.gen.go @@ -903,6 +903,9 @@ type NotFound = BasicError // RequiresAuthentication Basic Error type RequiresAuthentication = BasicError +// ServiceUnavailable Basic Error +type ServiceUnavailable = BasicError + // TooManyRequests Basic Error type TooManyRequests = BasicError diff --git a/spec.json b/spec.json index 987e713..cd86d3c 100644 --- a/spec.json +++ b/spec.json @@ -2650,6 +2650,9 @@ }, "500": { "$ref": "#/components/responses/InternalError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" } }, "tags": [ @@ -4904,6 +4907,16 @@ }, "description": "Too Many Requests" }, + "ServiceUnavailable": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicError" + } + } + }, + "description": "Service unavailable" + }, "MethodNotAllowed": { "content": { "application/json": { From 71eb1d8cc41e859aede30765c7fae3b03d50185d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 25 Oct 2023 16:25:48 +0300 Subject: [PATCH 045/343] fix: Generate CloudQuery Go API Client from `spec.json` (#52) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 15 +++++++++------ spec.json | 37 ++++++++++++++----------------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/models.gen.go b/models.gen.go index 98207e6..3699719 100644 --- a/models.gen.go +++ b/models.gen.go @@ -593,6 +593,9 @@ type PluginKind string // PluginName The unique name for the plugin. type PluginName = string +// PluginProtocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). +type PluginProtocols = []int + // PluginTable CloudQuery Plugin Table type PluginTable struct { // Description Description of the table @@ -740,8 +743,8 @@ type PluginVersion struct { // PackageType The package type of the plugin assets PackageType PluginVersionPackageType `json:"package_type"` - // Protocols The CloudQuery protocols supported by this plugin version - Protocols []int `json:"protocols"` + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` // PublishedAt The date and time the plugin version was set to non-draft (published). PublishedAt *time.Time `json:"published_at,omitempty"` @@ -770,8 +773,8 @@ type PluginVersionUpdate struct { // PackageType The package type of the plugin binaries PackageType *string `json:"package_type,omitempty"` - // Protocols The supported CloudQuery protocols by this plugin version - Protocols *[]int `json:"protocols,omitempty"` + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols *PluginProtocols `json:"protocols,omitempty"` // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. Retracted *bool `json:"retracted,omitempty"` @@ -1011,8 +1014,8 @@ type CreatePluginVersionJSONBody struct { // PackageType The package type of the plugin assets PackageType CreatePluginVersionJSONBodyPackageType `json:"package_type"` - // Protocols List of protocols supported by this plugin version - Protocols []int `json:"protocols"` + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` // SupportedTargets The targets supported by this plugin version, formatted as _ SupportedTargets []string `json:"supported_targets"` diff --git a/spec.json b/spec.json index cd86d3c..8aa17ca 100644 --- a/spec.json +++ b/spec.json @@ -499,11 +499,7 @@ "description": "A message describing what's new or changed in this version.\nThis message will be displayed to users in the plugin's changelog.\nSupports limited markdown syntax.\n" }, "protocols": { - "type": "array", - "description": "List of protocols supported by this plugin version", - "items": { - "type": "integer" - } + "$ref": "#/components/schemas/PluginProtocols" }, "supported_targets": { "type": "array", @@ -3685,6 +3681,16 @@ } } }, + "PluginProtocols": { + "description": "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", + "type": "array", + "items": { + "type": "integer", + "enum": [ + 3 + ] + } + }, "PluginVersion": { "additionalProperties": false, "description": "CloudQuery Plugin Version", @@ -3729,15 +3735,7 @@ "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." }, "protocols": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "The CloudQuery protocols supported by this plugin version", - "example": [ - 1, - 2 - ] + "$ref": "#/components/schemas/PluginProtocols" }, "supported_targets": { "type": "array", @@ -3787,15 +3785,7 @@ "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." }, "protocols": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "The supported CloudQuery protocols by this plugin version", - "example": [ - 1, - 2 - ] + "$ref": "#/components/schemas/PluginProtocols" }, "supported_targets": { "type": "array", @@ -3856,6 +3846,7 @@ }, "content": { "type": "string", + "minLength": 1, "description": "The content of the documentation page. Supports markdown.", "example": "# Getting Started\n\nThis is the getting started page." } From a67bcba14f1d84b6898cf0d3bacb2bef7e69942d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:03:56 +0300 Subject: [PATCH 046/343] fix: Generate CloudQuery Go API Client from `spec.json` (#53) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 -------- spec.json | 11 ++--------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/client.gen.go b/client.gen.go index 52d4c69..a4d459b 100644 --- a/client.gen.go +++ b/client.gen.go @@ -6471,7 +6471,6 @@ func (r ListTeamPluginUsageResponse) StatusCode() int { type IncreaseTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *UsageCurrent JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound @@ -10198,13 +10197,6 @@ func ParseIncreaseTeamPluginUsageResponse(rsp *http.Response) (*IncreaseTeamPlug } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest UsageCurrent - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/spec.json b/spec.json index 8aa17ca..dfea90c 100644 --- a/spec.json +++ b/spec.json @@ -2622,15 +2622,8 @@ } }, "responses": { - "200": { - "description": "Plugin usage for the current calendar month.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UsageCurrent" - } - } - } + "204": { + "description": "Success (the plugin usage was increased). It may take some time to reflect in the usage list." }, "401": { "$ref": "#/components/responses/RequiresAuthentication" From 8b970bec590c9cf36c80ece0e8e40629664cf6e9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 27 Oct 2023 12:09:31 +0300 Subject: [PATCH 047/343] fix: Generate CloudQuery Go API Client from `spec.json` (#54) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 4 ++-- models.gen.go | 41 +++++++++++++++++++++++++++++++++++++++++ spec.json | 17 ++++++++++++++++- 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/client.gen.go b/client.gen.go index a4d459b..9c18d16 100644 --- a/client.gen.go +++ b/client.gen.go @@ -5103,7 +5103,7 @@ type ListAddonsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []Addon `json:"items"` + Items []ListAddon `json:"items"` Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication @@ -7420,7 +7420,7 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Addon `json:"items"` + Items []ListAddon `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 3699719..1df935a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -382,6 +382,47 @@ type InvitationWithToken struct { Token openapi_types.UUID `json:"token"` } +// ListAddon defines model for ListAddon. +type ListAddon struct { + // AddonFormat Supported formats for addons + AddonFormat AddonFormat `json:"addon_format"` + + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` + + // Category Supported categories for addons + Category AddonCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` + + // DisplayName The addon's display name + DisplayName string `json:"display_name"` + Homepage *string `json:"homepage,omitempty"` + + // LatestVersion The version in semantic version format. + LatestVersion *VersionName `json:"latest_version,omitempty"` + Logo string `json:"logo"` + + // Name The unique name for the addon. + Name AddonName `json:"name"` + + // Official True if the addon is maintained by CloudQuery, false otherwise + Official bool `json:"official"` + + // PriceUsd The price for 6 months + PriceUSD string `json:"price_usd"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier Supported tiers for addons + Tier AddonTier `json:"tier"` +} + // ListMetadata defines model for ListMetadata. type ListMetadata struct { LastPage *int `json:"last_page,omitempty"` diff --git a/spec.json b/spec.json index dfea90c..de16cf3 100644 --- a/spec.json +++ b/spec.json @@ -1218,7 +1218,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/Addon" + "$ref": "#/components/schemas/ListAddon" }, "type": "array", "example": [ @@ -4179,6 +4179,21 @@ "title": "CloudQuery Addon", "type": "object" }, + "ListAddon": { + "allOf": [ + { + "$ref": "#/components/schemas/Addon" + }, + { + "type": "object", + "properties": { + "latest_version": { + "$ref": "#/components/schemas/VersionName" + } + } + } + ] + }, "AddonCreate": { "additionalProperties": false, "description": "CloudQuery AddonCreate", From 0c915656da7e6cff881848bd1295896805c5e205 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:21:34 +0300 Subject: [PATCH 048/343] fix: Generate CloudQuery Go API Client from `spec.json` (#55) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 283 ++++++++++++++++++++++++++++++-------------------- models.gen.go | 3 - spec.json | 46 ++++++-- 3 files changed, 212 insertions(+), 120 deletions(-) diff --git a/client.gen.go b/client.gen.go index 9c18d16..745ee61 100644 --- a/client.gen.go +++ b/client.gen.go @@ -101,37 +101,37 @@ type ClientInterface interface { CreateAddon(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteAddonByTeamAndName request - DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAddon request - GetAddon(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) + GetAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateAddonWithBody request with any body - UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateAddon(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListAddonVersions request - ListAddonVersions(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + ListAddonVersions(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAddonVersion request - GetAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + GetAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateAddonVersionWithBody request with any body - UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateAddonVersionWithBody request with any body - CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DownloadAddonAsset request - DownloadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) // UploadAddonAsset request - UploadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) // ListPlugins request ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -360,8 +360,8 @@ func (c *Client) CreateAddon(ctx context.Context, body CreateAddonJSONRequestBod return c.Client.Do(req) } -func (c *Client) DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteAddonByTeamAndNameRequest(c.Server, teamName, addonName) +func (c *Client) DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddonByTeamAndNameRequest(c.Server, teamName, addonType, addonName) if err != nil { return nil, err } @@ -372,8 +372,8 @@ func (c *Client) DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName return c.Client.Do(req) } -func (c *Client) GetAddon(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetAddonRequest(c.Server, teamName, addonName) +func (c *Client) GetAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonRequest(c.Server, teamName, addonType, addonName) if err != nil { return nil, err } @@ -384,8 +384,8 @@ func (c *Client) GetAddon(ctx context.Context, teamName TeamName, addonName Addo return c.Client.Do(req) } -func (c *Client) UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAddonRequestWithBody(c.Server, teamName, addonName, contentType, body) +func (c *Client) UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonRequestWithBody(c.Server, teamName, addonType, addonName, contentType, body) if err != nil { return nil, err } @@ -396,8 +396,8 @@ func (c *Client) UpdateAddonWithBody(ctx context.Context, teamName TeamName, add return c.Client.Do(req) } -func (c *Client) UpdateAddon(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAddonRequest(c.Server, teamName, addonName, body) +func (c *Client) UpdateAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonRequest(c.Server, teamName, addonType, addonName, body) if err != nil { return nil, err } @@ -408,8 +408,8 @@ func (c *Client) UpdateAddon(ctx context.Context, teamName TeamName, addonName A return c.Client.Do(req) } -func (c *Client) ListAddonVersions(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListAddonVersionsRequest(c.Server, teamName, addonName, params) +func (c *Client) ListAddonVersions(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonVersionsRequest(c.Server, teamName, addonType, addonName, params) if err != nil { return nil, err } @@ -420,8 +420,8 @@ func (c *Client) ListAddonVersions(ctx context.Context, teamName TeamName, addon return c.Client.Do(req) } -func (c *Client) GetAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetAddonVersionRequest(c.Server, teamName, addonName, versionName) +func (c *Client) GetAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonVersionRequest(c.Server, teamName, addonType, addonName, versionName) if err != nil { return nil, err } @@ -432,8 +432,8 @@ func (c *Client) GetAddonVersion(ctx context.Context, teamName TeamName, addonNa return c.Client.Do(req) } -func (c *Client) UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAddonVersionRequestWithBody(c.Server, teamName, addonName, versionName, contentType, body) +func (c *Client) UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonVersionRequestWithBody(c.Server, teamName, addonType, addonName, versionName, contentType, body) if err != nil { return nil, err } @@ -444,8 +444,8 @@ func (c *Client) UpdateAddonVersionWithBody(ctx context.Context, teamName TeamNa return c.Client.Do(req) } -func (c *Client) UpdateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAddonVersionRequest(c.Server, teamName, addonName, versionName, body) +func (c *Client) UpdateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonVersionRequest(c.Server, teamName, addonType, addonName, versionName, body) if err != nil { return nil, err } @@ -456,8 +456,8 @@ func (c *Client) UpdateAddonVersion(ctx context.Context, teamName TeamName, addo return c.Client.Do(req) } -func (c *Client) CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateAddonVersionRequestWithBody(c.Server, teamName, addonName, versionName, contentType, body) +func (c *Client) CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonVersionRequestWithBody(c.Server, teamName, addonType, addonName, versionName, contentType, body) if err != nil { return nil, err } @@ -468,8 +468,8 @@ func (c *Client) CreateAddonVersionWithBody(ctx context.Context, teamName TeamNa return c.Client.Do(req) } -func (c *Client) CreateAddonVersion(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateAddonVersionRequest(c.Server, teamName, addonName, versionName, body) +func (c *Client) CreateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonVersionRequest(c.Server, teamName, addonType, addonName, versionName, body) if err != nil { return nil, err } @@ -480,8 +480,8 @@ func (c *Client) CreateAddonVersion(ctx context.Context, teamName TeamName, addo return c.Client.Do(req) } -func (c *Client) DownloadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadAddonAssetRequest(c.Server, teamName, addonName, versionName) +func (c *Client) DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadAddonAssetRequest(c.Server, teamName, addonType, addonName, versionName) if err != nil { return nil, err } @@ -492,8 +492,8 @@ func (c *Client) DownloadAddonAsset(ctx context.Context, teamName TeamName, addo return c.Client.Do(req) } -func (c *Client) UploadAddonAsset(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUploadAddonAssetRequest(c.Server, teamName, addonName, versionName) +func (c *Client) UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadAddonAssetRequest(c.Server, teamName, addonType, addonName, versionName) if err != nil { return nil, err } @@ -1433,7 +1433,7 @@ func NewCreateAddonRequestWithBody(server string, contentType string, body io.Re } // NewDeleteAddonByTeamAndNameRequest generates requests for DeleteAddonByTeamAndName -func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonName AddonName) (*http.Request, error) { +func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { var err error var pathParam0 string @@ -1445,7 +1445,14 @@ func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonN var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1455,7 +1462,7 @@ func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonN return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1474,7 +1481,7 @@ func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonN } // NewGetAddonRequest generates requests for GetAddon -func NewGetAddonRequest(server string, teamName TeamName, addonName AddonName) (*http.Request, error) { +func NewGetAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { var err error var pathParam0 string @@ -1486,7 +1493,14 @@ func NewGetAddonRequest(server string, teamName TeamName, addonName AddonName) ( var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1496,7 +1510,7 @@ func NewGetAddonRequest(server string, teamName TeamName, addonName AddonName) ( return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1515,18 +1529,18 @@ func NewGetAddonRequest(server string, teamName TeamName, addonName AddonName) ( } // NewUpdateAddonRequest calls the generic UpdateAddon builder with application/json body -func NewUpdateAddonRequest(server string, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody) (*http.Request, error) { +func NewUpdateAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateAddonRequestWithBody(server, teamName, addonName, "application/json", bodyReader) + return NewUpdateAddonRequestWithBody(server, teamName, addonType, addonName, "application/json", bodyReader) } // NewUpdateAddonRequestWithBody generates requests for UpdateAddon with any type of body -func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonName AddonName, contentType string, body io.Reader) (*http.Request, error) { +func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1538,7 +1552,14 @@ func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonName A var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1548,7 +1569,7 @@ func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonName A return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1569,7 +1590,7 @@ func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonName A } // NewListAddonVersionsRequest generates requests for ListAddonVersions -func NewListAddonVersionsRequest(server string, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams) (*http.Request, error) { +func NewListAddonVersionsRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams) (*http.Request, error) { var err error var pathParam0 string @@ -1581,7 +1602,14 @@ func NewListAddonVersionsRequest(server string, teamName TeamName, addonName Add var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -1591,7 +1619,7 @@ func NewListAddonVersionsRequest(server string, teamName TeamName, addonName Add return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/versions", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1680,7 +1708,7 @@ func NewListAddonVersionsRequest(server string, teamName TeamName, addonName Add } // NewGetAddonVersionRequest generates requests for GetAddonVersion -func NewGetAddonVersionRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName) (*http.Request, error) { +func NewGetAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1692,14 +1720,21 @@ func NewGetAddonVersionRequest(server string, teamName TeamName, addonName Addon var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1709,7 +1744,7 @@ func NewGetAddonVersionRequest(server string, teamName TeamName, addonName Addon return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1728,18 +1763,18 @@ func NewGetAddonVersionRequest(server string, teamName TeamName, addonName Addon } // NewUpdateAddonVersionRequest calls the generic UpdateAddonVersion builder with application/json body -func NewUpdateAddonVersionRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody) (*http.Request, error) { +func NewUpdateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateAddonVersionRequestWithBody(server, teamName, addonName, versionName, "application/json", bodyReader) + return NewUpdateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) } // NewUpdateAddonVersionRequestWithBody generates requests for UpdateAddonVersion with any type of body -func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1751,14 +1786,21 @@ func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addo var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1768,7 +1810,7 @@ func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addo return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1789,18 +1831,18 @@ func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addo } // NewCreateAddonVersionRequest calls the generic CreateAddonVersion builder with application/json body -func NewCreateAddonVersionRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody) (*http.Request, error) { +func NewCreateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateAddonVersionRequestWithBody(server, teamName, addonName, versionName, "application/json", bodyReader) + return NewCreateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) } // NewCreateAddonVersionRequestWithBody generates requests for CreateAddonVersion with any type of body -func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -1812,14 +1854,21 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1829,7 +1878,7 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1850,7 +1899,7 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo } // NewDownloadAddonAssetRequest generates requests for DownloadAddonAsset -func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName) (*http.Request, error) { +func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1862,14 +1911,21 @@ func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonName Ad var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1879,7 +1935,7 @@ func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonName Ad return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1898,7 +1954,7 @@ func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonName Ad } // NewUploadAddonAssetRequest generates requests for UploadAddonAsset -func NewUploadAddonAssetRequest(server string, teamName TeamName, addonName AddonName, versionName VersionName) (*http.Request, error) { +func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -1910,14 +1966,21 @@ func NewUploadAddonAssetRequest(server string, teamName TeamName, addonName Addo var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -1927,7 +1990,7 @@ func NewUploadAddonAssetRequest(server string, teamName TeamName, addonName Addo return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4867,37 +4930,37 @@ type ClientWithResponsesInterface interface { CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) // DeleteAddonByTeamAndNameWithResponse request - DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) + DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) // GetAddonWithResponse request - GetAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) + GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) // UpdateAddonWithBodyWithResponse request with any body - UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) // ListAddonVersionsWithResponse request - ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) + ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) // GetAddonVersionWithResponse request - GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) + GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) // UpdateAddonVersionWithBodyWithResponse request with any body - UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) // CreateAddonVersionWithBodyWithResponse request with any body - CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) // DownloadAddonAssetWithResponse request - DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) // UploadAddonAssetWithResponse request - UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) // ListPluginsWithResponse request ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) @@ -6716,8 +6779,8 @@ func (c *ClientWithResponses) CreateAddonWithResponse(ctx context.Context, body } // DeleteAddonByTeamAndNameWithResponse request returning *DeleteAddonByTeamAndNameResponse -func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { - rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonName, reqEditors...) +func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { + rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonType, addonName, reqEditors...) if err != nil { return nil, err } @@ -6725,8 +6788,8 @@ func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.C } // GetAddonWithResponse request returning *GetAddonResponse -func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { - rsp, err := c.GetAddon(ctx, teamName, addonName, reqEditors...) +func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { + rsp, err := c.GetAddon(ctx, teamName, addonType, addonName, reqEditors...) if err != nil { return nil, err } @@ -6734,16 +6797,16 @@ func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName } // UpdateAddonWithBodyWithResponse request with arbitrary body returning *UpdateAddonResponse -func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { - rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonName, contentType, body, reqEditors...) +func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonType, addonName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseUpdateAddonResponse(rsp) } -func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { - rsp, err := c.UpdateAddon(ctx, teamName, addonName, body, reqEditors...) +func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddon(ctx, teamName, addonType, addonName, body, reqEditors...) if err != nil { return nil, err } @@ -6751,8 +6814,8 @@ func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamN } // ListAddonVersionsWithResponse request returning *ListAddonVersionsResponse -func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { - rsp, err := c.ListAddonVersions(ctx, teamName, addonName, params, reqEditors...) +func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { + rsp, err := c.ListAddonVersions(ctx, teamName, addonType, addonName, params, reqEditors...) if err != nil { return nil, err } @@ -6760,8 +6823,8 @@ func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, } // GetAddonVersionWithResponse request returning *GetAddonVersionResponse -func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { - rsp, err := c.GetAddonVersion(ctx, teamName, addonName, versionName, reqEditors...) +func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { + rsp, err := c.GetAddonVersion(ctx, teamName, addonType, addonName, versionName, reqEditors...) if err != nil { return nil, err } @@ -6769,16 +6832,16 @@ func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, t } // UpdateAddonVersionWithBodyWithResponse request with arbitrary body returning *UpdateAddonVersionResponse -func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { - rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseUpdateAddonVersionResponse(rsp) } -func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { - rsp, err := c.UpdateAddonVersion(ctx, teamName, addonName, versionName, body, reqEditors...) +func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -6786,16 +6849,16 @@ func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context } // CreateAddonVersionWithBodyWithResponse request with arbitrary body returning *CreateAddonVersionResponse -func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { - rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonName, versionName, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } return ParseCreateAddonVersionResponse(rsp) } -func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { - rsp, err := c.CreateAddonVersion(ctx, teamName, addonName, versionName, body, reqEditors...) +func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) if err != nil { return nil, err } @@ -6803,8 +6866,8 @@ func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context } // DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse -func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { - rsp, err := c.DownloadAddonAsset(ctx, teamName, addonName, versionName, reqEditors...) +func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { + rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) if err != nil { return nil, err } @@ -6812,8 +6875,8 @@ func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context } // UploadAddonAssetWithResponse request returning *UploadAddonAssetResponse -func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { - rsp, err := c.UploadAddonAsset(ctx, teamName, addonName, versionName, reqEditors...) +func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { + rsp, err := c.UploadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) if err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 1df935a..b4b9899 100644 --- a/models.gen.go +++ b/models.gen.go @@ -255,9 +255,6 @@ type AddonUpdate struct { // AddonFormat Supported formats for addons AddonFormat *AddonFormat `json:"addon_format,omitempty"` - // AddonType Supported types for addons - AddonType *AddonType `json:"addon_type,omitempty"` - // Category Supported categories for addons Category *AddonCategory `json:"category,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` diff --git a/spec.json b/spec.json index de16cf3..c4d064c 100644 --- a/spec.json +++ b/spec.json @@ -1304,7 +1304,7 @@ ] } }, - "/addons/{team_name}/{addon_name}": { + "/addons/{team_name}/{addon_type}/{addon_name}": { "get": { "description": "Get details about a given addon.", "operationId": "GetAddon", @@ -1312,6 +1312,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" } @@ -1352,6 +1355,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" } @@ -1400,6 +1406,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" } @@ -1429,7 +1438,7 @@ ] } }, - "/addons/{team_name}/{addon_name}/versions": { + "/addons/{team_name}/{addon_type}/{addon_name}/versions": { "get": { "description": "List all versions for a given addon", "operationId": "ListAddonVersions", @@ -1437,6 +1446,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" }, @@ -1497,7 +1509,7 @@ ] } }, - "/addons/{team_name}/{addon_name}/versions/{version_name}": { + "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}": { "get": { "description": "Get details about a given addon version.", "operationId": "GetAddonVersion", @@ -1505,6 +1517,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" }, @@ -1548,6 +1563,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" }, @@ -1649,6 +1667,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" }, @@ -1697,7 +1718,7 @@ ] } }, - "/addons/{team_name}/{addon_name}/versions/{version_name}/assets": { + "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}/assets": { "get": { "description": "Download a asset for a given version", "operationId": "DownloadAddonAsset", @@ -1705,6 +1726,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" }, @@ -1748,6 +1772,9 @@ { "$ref": "#/components/parameters/team_name" }, + { + "$ref": "#/components/parameters/addon_type" + }, { "$ref": "#/components/parameters/addon_name" }, @@ -4275,9 +4302,6 @@ "category": { "$ref": "#/components/schemas/AddonCategory" }, - "addon_type": { - "$ref": "#/components/schemas/AddonType" - }, "addon_format": { "$ref": "#/components/schemas/AddonFormat" }, @@ -5044,6 +5068,14 @@ "type": "string" } }, + "addon_type": { + "in": "path", + "name": "addon_type", + "required": true, + "schema": { + "$ref": "#/components/schemas/AddonType" + } + }, "addon_name": { "in": "path", "name": "addon_name", From 1ed6fdef22375e95cdbf3d882737ea936b8f6777 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:38:18 +0300 Subject: [PATCH 049/343] chore(main): Release v1.4.2 (#47) --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c71cc..31737f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [1.4.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.1...v1.4.2) (2023-10-27) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#46](https://github.com/cloudquery/cloudquery-api-go/issues/46)) ([5f83a82](https://github.com/cloudquery/cloudquery-api-go/commit/5f83a82d4cbf79271609c12c612ba495c6613ef6)) +* Generate CloudQuery Go API Client from `spec.json` ([#48](https://github.com/cloudquery/cloudquery-api-go/issues/48)) ([7dfeae5](https://github.com/cloudquery/cloudquery-api-go/commit/7dfeae55de35be96272a16b56cce36b4250e03b0)) +* Generate CloudQuery Go API Client from `spec.json` ([#49](https://github.com/cloudquery/cloudquery-api-go/issues/49)) ([b67368e](https://github.com/cloudquery/cloudquery-api-go/commit/b67368efe71d56298d64b101c92e3c14733cdf0b)) +* Generate CloudQuery Go API Client from `spec.json` ([#50](https://github.com/cloudquery/cloudquery-api-go/issues/50)) ([eeb9744](https://github.com/cloudquery/cloudquery-api-go/commit/eeb9744efd103f9f499355fd68735d8d4d2c6f6d)) +* Generate CloudQuery Go API Client from `spec.json` ([#51](https://github.com/cloudquery/cloudquery-api-go/issues/51)) ([c7fa339](https://github.com/cloudquery/cloudquery-api-go/commit/c7fa339728fa234a9b4923567e2fa42d39f1e7ab)) +* Generate CloudQuery Go API Client from `spec.json` ([#52](https://github.com/cloudquery/cloudquery-api-go/issues/52)) ([71eb1d8](https://github.com/cloudquery/cloudquery-api-go/commit/71eb1d8cc41e859aede30765c7fae3b03d50185d)) +* Generate CloudQuery Go API Client from `spec.json` ([#53](https://github.com/cloudquery/cloudquery-api-go/issues/53)) ([a67bcba](https://github.com/cloudquery/cloudquery-api-go/commit/a67bcba14f1d84b6898cf0d3bacb2bef7e69942d)) +* Generate CloudQuery Go API Client from `spec.json` ([#54](https://github.com/cloudquery/cloudquery-api-go/issues/54)) ([8b970be](https://github.com/cloudquery/cloudquery-api-go/commit/8b970bec590c9cf36c80ece0e8e40629664cf6e9)) +* Generate CloudQuery Go API Client from `spec.json` ([#55](https://github.com/cloudquery/cloudquery-api-go/issues/55)) ([0c91565](https://github.com/cloudquery/cloudquery-api-go/commit/0c915656da7e6cff881848bd1295896805c5e205)) + ## [1.4.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.0...v1.4.1) (2023-10-18) From 0f10e57098160bfd63a816813d7795c4f842523d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:37:24 +0200 Subject: [PATCH 050/343] fix: Generate CloudQuery Go API Client from `spec.json` (#56) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 51 +++++++++++++++++++++++++++++++++++++++++---------- spec.json | 34 ++++++++++++++++++++++++++++------ 2 files changed, 69 insertions(+), 16 deletions(-) diff --git a/models.gen.go b/models.gen.go index b4b9899..0248caf 100644 --- a/models.gen.go +++ b/models.gen.go @@ -59,6 +59,12 @@ const ( Source PluginKind = "source" ) +// Defines values for PluginReleaseStage. +const ( + Ga PluginReleaseStage = "ga" + Preview PluginReleaseStage = "preview" +) + // Defines values for PluginTier. const ( PluginTierFree PluginTier = "free" @@ -453,9 +459,14 @@ type ListPlugin struct { Official bool `json:"official"` // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. - Public *bool `json:"public,omitempty"` - Repository *string `json:"repository,omitempty"` - ShortDescription string `json:"short_description"` + Public *bool `json:"public,omitempty"` + + // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` @@ -549,9 +560,14 @@ type Plugin struct { Official bool `json:"official"` // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. - Public *bool `json:"public,omitempty"` - Repository *string `json:"repository,omitempty"` - ShortDescription string `json:"short_description"` + Public *bool `json:"public,omitempty"` + + // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` @@ -588,8 +604,13 @@ type PluginCreate struct { Name PluginName `json:"name"` // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team. - Public bool `json:"public"` - Repository *string `json:"repository,omitempty"` + Public bool `json:"public"` + + // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription string `json:"short_description"` @@ -634,6 +655,11 @@ type PluginName = string // PluginProtocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). type PluginProtocols = []int +// PluginReleaseStage Official plugins go through two release stages: Preview, and GA. +// Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: +// Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. +type PluginReleaseStage string + // PluginTable CloudQuery Plugin Table type PluginTable struct { // Description Description of the table @@ -748,8 +774,13 @@ type PluginUpdate struct { Logo *string `json:"logo,omitempty"` // Public If plugin is not public, it won't be visible to other teams in the CloudQuery Hub. - Public *bool `json:"public,omitempty"` - Repository *string `json:"repository,omitempty"` + Public *bool `json:"public,omitempty"` + + // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription *string `json:"short_description,omitempty"` diff --git a/spec.json b/spec.json index c4d064c..5501cc3 100644 --- a/spec.json +++ b/spec.json @@ -307,6 +307,7 @@ "delete": { "description": "Delete plugin by team and plugin name", "operationId": "DeletePluginByTeamAndPluginName", + "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -1402,6 +1403,7 @@ "delete": { "description": "Delete addon by team and addon name", "operationId": "DeleteAddonByTeamAndName", + "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -2098,6 +2100,7 @@ "delete": { "description": "Delete plugins by team", "operationId": "DeletePluginsByTeam", + "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -2210,6 +2213,7 @@ "delete": { "description": "Delete addons by team", "operationId": "DeleteAddonsByTeam", + "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -3420,6 +3424,15 @@ "other" ] }, + "PluginReleaseStage": { + "description": "Official plugins go through two release stages: Preview, and GA.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "type": "string", + "enum": [ + "preview", + "ga" + ], + "default": "preview" + }, "PluginTier": { "description": "Supported tiers for plugins", "type": "string", @@ -3468,6 +3481,9 @@ "description": "True if the plugin is maintained by CloudQuery, false otherwise", "type": "boolean" }, + "release_stage": { + "$ref": "#/components/schemas/PluginReleaseStage" + }, "repository": { "type": "string", "example": "https://github.com/cloudquery/cloudquery" @@ -3593,15 +3609,18 @@ "type": "string", "example": "https://cloudquery.io" }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, "public": { "type": "boolean", "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.", "example": true }, + "repository": { + "type": "string", + "example": "https://github.com/cloudquery/cloudquery" + }, + "release_stage": { + "$ref": "#/components/schemas/PluginReleaseStage" + }, "logo": { "type": "string", "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", @@ -3611,14 +3630,14 @@ "type": "string", "pattern": "^\\d+(?:\\.\\d{1,10})?$", "description": "The price per row in USD. This is used to calculate the price of a sync.", - "example": "0.0001", + "example": "0.00001", "x-go-name": "USDPerRow" }, "free_rows_per_month": { "type": "integer", "format": "int64", "description": "The number of rows that can be synced for free each month.", - "example": 1000 + "example": 10000 } } }, @@ -3686,6 +3705,9 @@ "type": "boolean", "description": "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub." }, + "release_stage": { + "$ref": "#/components/schemas/PluginReleaseStage" + }, "usd_per_row": { "type": "string", "pattern": "^\\d+(?:\\.\\d{1,10})?$", From 942941d67f10a20f188cf4cc014c52fbb4bc2d9f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:28:05 +0200 Subject: [PATCH 051/343] fix: Generate CloudQuery Go API Client from `spec.json` (#58) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 12 ++++++------ spec.json | 7 +++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/models.gen.go b/models.gen.go index 0248caf..86a8279 100644 --- a/models.gen.go +++ b/models.gen.go @@ -464,9 +464,9 @@ type ListPlugin struct { // ReleaseStage Official plugins go through two release stages: Preview, and GA. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. - ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` - Repository *string `json:"repository,omitempty"` - ShortDescription string `json:"short_description"` + ReleaseStage PluginReleaseStage `json:"release_stage"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` @@ -565,9 +565,9 @@ type Plugin struct { // ReleaseStage Official plugins go through two release stages: Preview, and GA. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. - ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` - Repository *string `json:"repository,omitempty"` - ShortDescription string `json:"short_description"` + ReleaseStage PluginReleaseStage `json:"release_stage"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` diff --git a/spec.json b/spec.json index 5501cc3..e469e99 100644 --- a/spec.json +++ b/spec.json @@ -141,7 +141,8 @@ "repository": "https://github.com/cloudquery/cloudquery", "tier": "paid", "usd_per_row": "0.00123", - "free_rows_per_month": 10000 + "free_rows_per_month": 10000, + "release_stage": "preview" } ] }, @@ -2068,7 +2069,8 @@ "repository": "https://github.com/cloudquery/cloudquery", "tier": "paid", "usd_per_row": "0.00123", - "free_rows_per_month": 10000 + "free_rows_per_month": 10000, + "release_stage": "preview" } ] }, @@ -3520,6 +3522,7 @@ "name", "kind", "category", + "release_stage", "created_at", "logo", "display_name", From 6fd3157f9c494926b1f3ce91023fdc0f082c4d55 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:11:21 +0200 Subject: [PATCH 052/343] fix: Generate CloudQuery Go API Client from `spec.json` (#59) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.json b/spec.json index e469e99..2311f61 100644 --- a/spec.json +++ b/spec.json @@ -1556,7 +1556,7 @@ }, "security": [], "tags": [ - "plugins" + "addons" ] }, "put": { From d97ae7e6165b7eebbd270de1060009dbc70e977c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:45:53 +0200 Subject: [PATCH 053/343] fix: Generate CloudQuery Go API Client from `spec.json` (#60) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 10 +++++----- spec.json | 16 ++++++---------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/models.gen.go b/models.gen.go index 86a8279..eaecc0c 100644 --- a/models.gen.go +++ b/models.gen.go @@ -284,7 +284,7 @@ type AddonUpdate struct { // AddonVersion CloudQuery Addon Version type AddonVersion struct { - // AddonDeps list of other addons this addon depends on in the format of team_name/name@version + // AddonDeps list of other addons this addon depends on in the format of team_name/type/name@version AddonDeps *[]string `json:"addon_deps,omitempty"` // Checksum The checksum of the addon asset @@ -306,7 +306,7 @@ type AddonVersion struct { Name VersionName `json:"name"` // PluginDeps list of plugins the addon depends on in the format of team_name/kind/name@version - PluginDeps []string `json:"plugin_deps"` + PluginDeps *[]string `json:"plugin_deps,omitempty"` // PublishedAt The date and time the plugin version was set to non-draft (published). PublishedAt *time.Time `json:"published_at,omitempty"` @@ -317,7 +317,7 @@ type AddonVersion struct { // AddonVersionUpdate defines model for AddonVersionUpdate. type AddonVersionUpdate struct { - // AddonDeps list of other addons this addon depends on in the format of team_name/name@version + // AddonDeps list of other addons this addon depends on in the format of team_name/type/name@version AddonDeps *[]string `json:"addon_deps,omitempty"` // Checksum The checksum of the addon asset @@ -1019,7 +1019,7 @@ type ListAddonVersionsParamsSortBy string // CreateAddonVersionJSONBody defines parameters for CreateAddonVersion. type CreateAddonVersionJSONBody struct { - // AddonDeps addon dependencies in the format of ['team_name/addon_name@version'] + // AddonDeps addon dependencies in the format of ['team_name/type/addon_name@version'] AddonDeps *[]string `json:"addon_deps,omitempty"` // Checksum SHA-256 checksum for the addon asset @@ -1034,7 +1034,7 @@ type CreateAddonVersionJSONBody struct { Message string `json:"message"` // PluginDeps plugin dependencies in the format of ['team_name/kind/plugin_name@version'] - PluginDeps []string `json:"plugin_deps"` + PluginDeps *[]string `json:"plugin_deps,omitempty"` } // ListPluginsParams defines parameters for ListPlugins. diff --git a/spec.json b/spec.json index 2311f61..db8db99 100644 --- a/spec.json +++ b/spec.json @@ -1584,8 +1584,7 @@ "required": [ "message", "doc", - "checksum", - "plugin_deps" + "checksum" ], "properties": { "message": { @@ -1603,15 +1602,14 @@ "items": { "type": "string" }, - "description": "plugin dependencies in the format of ['team_name/kind/plugin_name@version']", - "minItems": 1 + "description": "plugin dependencies in the format of ['team_name/kind/plugin_name@version']" }, "addon_deps": { "type": "array", "items": { "type": "string" }, - "description": "addon dependencies in the format of ['team_name/addon_name@version']" + "description": "addon dependencies in the format of ['team_name/type/addon_name@version']" }, "checksum": { "type": "string", @@ -4386,7 +4384,6 @@ "name", "message", "doc", - "plugin_deps", "draft", "retracted", "checksum" @@ -4423,8 +4420,7 @@ "plugin_deps": { "type": "array", "items": { - "type": "string", - "minItems": 1 + "type": "string" }, "description": "list of plugins the addon depends on in the format of team_name/kind/name@version" }, @@ -4433,7 +4429,7 @@ "items": { "type": "string" }, - "description": "list of other addons this addon depends on in the format of team_name/name@version" + "description": "list of other addons this addon depends on in the format of team_name/type/name@version" }, "retracted": { "type": "boolean", @@ -4475,7 +4471,7 @@ "items": { "type": "string" }, - "description": "list of other addons this addon depends on in the format of team_name/name@version" + "description": "list of other addons this addon depends on in the format of team_name/type/name@version" }, "retracted": { "type": "boolean", From 1a971693086e9832ae05c0ba21e0197aea2c9d4f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:50:40 +0200 Subject: [PATCH 054/343] chore(main): Release v1.4.3 (#57) --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31737f2..b9a7b8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [1.4.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.2...v1.4.3) (2023-11-06) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#56](https://github.com/cloudquery/cloudquery-api-go/issues/56)) ([0f10e57](https://github.com/cloudquery/cloudquery-api-go/commit/0f10e57098160bfd63a816813d7795c4f842523d)) +* Generate CloudQuery Go API Client from `spec.json` ([#58](https://github.com/cloudquery/cloudquery-api-go/issues/58)) ([942941d](https://github.com/cloudquery/cloudquery-api-go/commit/942941d67f10a20f188cf4cc014c52fbb4bc2d9f)) +* Generate CloudQuery Go API Client from `spec.json` ([#59](https://github.com/cloudquery/cloudquery-api-go/issues/59)) ([6fd3157](https://github.com/cloudquery/cloudquery-api-go/commit/6fd3157f9c494926b1f3ce91023fdc0f082c4d55)) +* Generate CloudQuery Go API Client from `spec.json` ([#60](https://github.com/cloudquery/cloudquery-api-go/issues/60)) ([d97ae7e](https://github.com/cloudquery/cloudquery-api-go/commit/d97ae7e6165b7eebbd270de1060009dbc70e977c)) + ## [1.4.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.1...v1.4.2) (2023-10-27) From 6b00213353ac8e8e1c9fb994317556610fa3c22b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:21:39 +0200 Subject: [PATCH 055/343] fix: Generate CloudQuery Go API Client from `spec.json` (#61) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 37 ++++++++++++++++++++++++++++++------- models.gen.go | 14 ++++++++++++++ spec.json | 41 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 84 insertions(+), 8 deletions(-) diff --git a/client.gen.go b/client.gen.go index 745ee61..dc0acce 100644 --- a/client.gen.go +++ b/client.gen.go @@ -128,7 +128,7 @@ type ClientInterface interface { CreateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DownloadAddonAsset request - DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UploadAddonAsset request UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -480,8 +480,8 @@ func (c *Client) CreateAddonVersion(ctx context.Context, teamName TeamName, addo return c.Client.Do(req) } -func (c *Client) DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadAddonAssetRequest(c.Server, teamName, addonType, addonName, versionName) +func (c *Client) DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadAddonAssetRequest(c.Server, teamName, addonType, addonName, versionName, params) if err != nil { return nil, err } @@ -1899,7 +1899,7 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo } // NewDownloadAddonAssetRequest generates requests for DownloadAddonAsset -func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { +func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams) (*http.Request, error) { var err error var pathParam0 string @@ -1950,6 +1950,21 @@ func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType Ad return nil, err } + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + return req, nil } @@ -4957,7 +4972,7 @@ type ClientWithResponsesInterface interface { CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) // DownloadAddonAssetWithResponse request - DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) // UploadAddonAssetWithResponse request UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) @@ -5406,6 +5421,7 @@ func (r CreateAddonVersionResponse) StatusCode() int { type DownloadAddonAssetResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *AddonAsset JSON401 *RequiresAuthentication JSON404 *NotFound JSON429 *TooManyRequests @@ -6866,8 +6882,8 @@ func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context } // DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse -func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { - rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) +func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { + rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, params, reqEditors...) if err != nil { return nil, err } @@ -7980,6 +7996,13 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index eaecc0c..67ecdb9 100644 --- a/models.gen.go +++ b/models.gen.go @@ -207,6 +207,15 @@ type Addon struct { Tier AddonTier `json:"tier"` } +// AddonAsset CloudQuery Addon Asset +type AddonAsset struct { + // Checksum The checksum of the addon asset + Checksum string `json:"checksum"` + + // Location The location to download the addon asset from + Location string `json:"location"` +} + // AddonCategory Supported categories for addons type AddonCategory string @@ -1037,6 +1046,11 @@ type CreateAddonVersionJSONBody struct { PluginDeps *[]string `json:"plugin_deps,omitempty"` } +// DownloadAddonAssetParams defines parameters for DownloadAddonAsset. +type DownloadAddonAssetParams struct { + Accept *string `json:"Accept,omitempty"` +} + // ListPluginsParams defines parameters for ListPlugins. type ListPluginsParams struct { // SortBy The field to sort by diff --git a/spec.json b/spec.json index db8db99..a495ff8 100644 --- a/spec.json +++ b/spec.json @@ -1721,9 +1721,17 @@ }, "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}/assets": { "get": { - "description": "Download a asset for a given version", + "description": "Download an asset for a given version", "operationId": "DownloadAddonAsset", "parameters": [ + { + "in": "header", + "name": "Accept", + "required": false, + "schema": { + "type": "string" + } + }, { "$ref": "#/components/parameters/team_name" }, @@ -1738,6 +1746,16 @@ } ], "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonAsset" + } + } + } + }, "302": { "description": "Response", "headers": { @@ -4483,6 +4501,27 @@ } } }, + "AddonAsset": { + "additionalProperties": false, + "description": "CloudQuery Addon Asset", + "required": [ + "checksum", + "location" + ], + "properties": { + "checksum": { + "type": "string", + "description": "The checksum of the addon asset" + }, + "location": { + "type": "string", + "format": "uri", + "description": "The location to download the addon asset from" + } + }, + "title": "CloudQuery Addon Asset", + "type": "object" + }, "Team": { "additionalProperties": false, "description": "CloudQuery Team", From bfe3e8e5d9abea07939299361cb2443677571e79 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:57:48 +0200 Subject: [PATCH 056/343] fix: Generate CloudQuery Go API Client from `spec.json` (#63) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 205 ++++++++++++++++++++++++++++++++++++++++++++++++-- models.gen.go | 14 ++++ spec.json | 95 ++++++++++++++++++++++- 3 files changed, 306 insertions(+), 8 deletions(-) diff --git a/client.gen.go b/client.gen.go index dc0acce..8f184a0 100644 --- a/client.gen.go +++ b/client.gen.go @@ -169,7 +169,7 @@ type ClientInterface interface { CreatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DownloadPluginAsset request - DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) + DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UploadPluginAsset request UploadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -280,6 +280,9 @@ type ClientInterface interface { // ListPluginsByTeam request ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DownloadPluginAssetByTeam request + DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamPluginUsage request ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -660,8 +663,8 @@ func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadPluginAssetRequest(c.Server, teamName, pluginKind, pluginName, versionName, targetName) +func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadPluginAssetRequest(c.Server, teamName, pluginKind, pluginName, versionName, targetName, params) if err != nil { return nil, err } @@ -1152,6 +1155,18 @@ func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, param return c.Client.Do(req) } +func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadPluginAssetByTeamRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) if err != nil { @@ -2611,7 +2626,7 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu } // NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset -func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { +func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams) (*http.Request, error) { var err error var pathParam0 string @@ -2669,6 +2684,21 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind return nil, err } + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + return req, nil } @@ -4420,6 +4450,75 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return req, nil } +// NewDownloadPluginAssetByTeamRequest generates requests for DownloadPluginAssetByTeam +func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam5 string + + pathParam5, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4, pathParam5) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error @@ -5013,7 +5112,7 @@ type ClientWithResponsesInterface interface { CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) // UploadPluginAssetWithResponse request UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) @@ -5124,6 +5223,9 @@ type ClientWithResponsesInterface interface { // ListPluginsByTeamWithResponse request ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + // DownloadPluginAssetByTeamWithResponse request + DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + // ListTeamPluginUsageWithResponse request ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) @@ -5711,6 +5813,7 @@ func (r CreatePluginVersionResponse) StatusCode() int { type DownloadPluginAssetResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *PluginAsset JSON401 *RequiresAuthentication JSON404 *NotFound JSON429 *TooManyRequests @@ -6518,6 +6621,31 @@ func (r ListPluginsByTeamResponse) StatusCode() int { return 0 } +type DownloadPluginAssetByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadPluginAssetByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadPluginAssetByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response @@ -7013,8 +7141,8 @@ func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Contex } // DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse -func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { - rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) +func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { + rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, params, reqEditors...) if err != nil { return nil, err } @@ -7370,6 +7498,15 @@ func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, return ParseListPluginsByTeamResponse(rsp) } +// DownloadPluginAssetByTeamWithResponse request returning *DownloadPluginAssetByTeamResponse +func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) { + rsp, err := c.DownloadPluginAssetByTeam(ctx, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDownloadPluginAssetByTeamResponse(rsp) +} + // ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) @@ -8582,6 +8719,13 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10212,6 +10356,53 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo return response, nil } +// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call +func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DownloadPluginAssetByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamPluginUsageResponse parses an HTTP response from a ListTeamPluginUsageWithResponse call func ParseListTeamPluginUsageResponse(rsp *http.Response) (*ListTeamPluginUsageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 67ecdb9..5b12890 100644 --- a/models.gen.go +++ b/models.gen.go @@ -588,6 +588,15 @@ type Plugin struct { USDPerRow string `json:"usd_per_row"` } +// PluginAsset CloudQuery Plugin Asset +type PluginAsset struct { + // Checksum The checksum of the plugin asset + Checksum string `json:"checksum"` + + // Location The location to download the plugin asset from + Location string `json:"location"` +} + // PluginCategory Supported categories for plugins type PluginCategory string @@ -1107,6 +1116,11 @@ type CreatePluginVersionJSONBody struct { // CreatePluginVersionJSONBodyPackageType defines parameters for CreatePluginVersion. type CreatePluginVersionJSONBodyPackageType string +// DownloadPluginAssetParams defines parameters for DownloadPluginAsset. +type DownloadPluginAssetParams struct { + Accept *string `json:"Accept,omitempty"` +} + // DeletePluginVersionDocsJSONBody defines parameters for DeletePluginVersionDocs. type DeletePluginVersionDocsJSONBody struct { Names []PluginDocsPageName `json:"names"` diff --git a/spec.json b/spec.json index a495ff8..d18d113 100644 --- a/spec.json +++ b/spec.json @@ -1102,6 +1102,14 @@ "description": "Download an asset for a given plugin version and target", "operationId": "DownloadPluginAsset", "parameters": [ + { + "in": "header", + "name": "Accept", + "required": false, + "schema": { + "type": "string" + } + }, { "$ref": "#/components/parameters/team_name" }, @@ -1119,6 +1127,16 @@ } ], "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginAsset" + } + } + } + }, "302": { "description": "Response", "headers": { @@ -1779,7 +1797,6 @@ "$ref": "#/components/responses/InternalError" } }, - "security": [], "tags": [ "addons" ] @@ -2749,6 +2766,61 @@ ] } }, + "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { + "get": { + "description": "Download an asset for a given plugin version as the current team.", + "operationId": "DownloadPluginAssetByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + }, + { + "$ref": "#/components/parameters/version_name" + }, + { + "$ref": "#/components/parameters/target_name" + } + ], + "responses": { + "302": { + "description": "Response", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "usage" + ] + } + }, "/teams/{team_name}/invitations": { "get": { "operationId": "ListTeamInvitations", @@ -4111,6 +4183,27 @@ }, "type": "object" }, + "PluginAsset": { + "additionalProperties": false, + "description": "CloudQuery Plugin Asset", + "required": [ + "checksum", + "location" + ], + "properties": { + "checksum": { + "type": "string", + "description": "The checksum of the plugin asset" + }, + "location": { + "type": "string", + "format": "uri", + "description": "The location to download the plugin asset from" + } + }, + "title": "CloudQuery Plugin Asset", + "type": "object" + }, "ReleaseURL": { "required": [ "url" From 638e32f38e61e17afe3a389a63c1b0a0b9cf0473 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:13:59 +0200 Subject: [PATCH 057/343] chore(main): Release v1.4.4 (#62) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a7b8b..1107b4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.4.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.3...v1.4.4) (2023-11-13) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#61](https://github.com/cloudquery/cloudquery-api-go/issues/61)) ([6b00213](https://github.com/cloudquery/cloudquery-api-go/commit/6b00213353ac8e8e1c9fb994317556610fa3c22b)) +* Generate CloudQuery Go API Client from `spec.json` ([#63](https://github.com/cloudquery/cloudquery-api-go/issues/63)) ([bfe3e8e](https://github.com/cloudquery/cloudquery-api-go/commit/bfe3e8e5d9abea07939299361cb2443677571e79)) + ## [1.4.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.2...v1.4.3) (2023-11-06) From 4b92507c7cb48ffa0bb6bbc587450cea9c7d6c81 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:51:14 +0200 Subject: [PATCH 058/343] fix: Generate CloudQuery Go API Client from `spec.json` (#64) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 37 ++++++++++++++++++++++++++++++------- models.gen.go | 5 +++++ spec.json | 18 ++++++++++++++++++ 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/client.gen.go b/client.gen.go index 8f184a0..e3732ec 100644 --- a/client.gen.go +++ b/client.gen.go @@ -281,7 +281,7 @@ type ClientInterface interface { ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) // DownloadPluginAssetByTeam request - DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) + DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeamPluginUsage request ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1155,8 +1155,8 @@ func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, param return c.Client.Do(req) } -func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadPluginAssetByTeamRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName) +func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadPluginAssetByTeamRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params) if err != nil { return nil, err } @@ -4451,7 +4451,7 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } // NewDownloadPluginAssetByTeamRequest generates requests for DownloadPluginAssetByTeam -func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { +func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -4516,6 +4516,21 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return nil, err } + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + return req, nil } @@ -5224,7 +5239,7 @@ type ClientWithResponsesInterface interface { ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) // DownloadPluginAssetByTeamWithResponse request - DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) // ListTeamPluginUsageWithResponse request ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) @@ -6624,6 +6639,7 @@ func (r ListPluginsByTeamResponse) StatusCode() int { type DownloadPluginAssetByTeamResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *PluginAsset JSON401 *RequiresAuthentication JSON404 *NotFound JSON429 *TooManyRequests @@ -7499,8 +7515,8 @@ func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, } // DownloadPluginAssetByTeamWithResponse request returning *DownloadPluginAssetByTeamResponse -func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) { - rsp, err := c.DownloadPluginAssetByTeam(ctx, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, reqEditors...) +func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) { + rsp, err := c.DownloadPluginAssetByTeam(ctx, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params, reqEditors...) if err != nil { return nil, err } @@ -10370,6 +10386,13 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 5b12890..6abed13 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1265,6 +1265,11 @@ type ListPluginsByTeamParams struct { IncludePrivate *IncludePrivate `form:"include_private,omitempty" json:"include_private,omitempty"` } +// DownloadPluginAssetByTeamParams defines parameters for DownloadPluginAssetByTeam. +type DownloadPluginAssetByTeamParams struct { + Accept *string `json:"Accept,omitempty"` +} + // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. type ListTeamPluginUsageParams struct { // Page Page number of the results to fetch diff --git a/spec.json b/spec.json index d18d113..65f8f05 100644 --- a/spec.json +++ b/spec.json @@ -2771,6 +2771,14 @@ "description": "Download an asset for a given plugin version as the current team.", "operationId": "DownloadPluginAssetByTeam", "parameters": [ + { + "in": "header", + "name": "Accept", + "required": false, + "schema": { + "type": "string" + } + }, { "$ref": "#/components/parameters/team_name" }, @@ -2791,6 +2799,16 @@ } ], "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginAsset" + } + } + } + }, "302": { "description": "Response", "headers": { From 9bd54daa5bffa76f99a5beef810773c71602ba5e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 13 Nov 2023 17:49:51 +0200 Subject: [PATCH 059/343] chore(main): Release v1.4.5 (#65) :robot: I have created a release *beep* *boop* --- ## [1.4.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.4...v1.4.5) (2023-11-13) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#64](https://github.com/cloudquery/cloudquery-api-go/issues/64)) ([4b92507](https://github.com/cloudquery/cloudquery-api-go/commit/4b92507c7cb48ffa0bb6bbc587450cea9c7d6c81)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1107b4f..3a18b82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.4...v1.4.5) (2023-11-13) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#64](https://github.com/cloudquery/cloudquery-api-go/issues/64)) ([4b92507](https://github.com/cloudquery/cloudquery-api-go/commit/4b92507c7cb48ffa0bb6bbc587450cea9c7d6c81)) + ## [1.4.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.3...v1.4.4) (2023-11-13) From 8aa1edcf0ec2075696e5f5610c09bc540365c993 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:00:09 +0200 Subject: [PATCH 060/343] fix: Generate CloudQuery Go API Client from `spec.json` (#67) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 15 +++++++++++++++ spec.json | 14 ++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/models.gen.go b/models.gen.go index 6abed13..ed9766c 100644 --- a/models.gen.go +++ b/models.gen.go @@ -77,6 +77,12 @@ const ( PluginVersionPackageTypeNative PluginVersionPackageType = "native" ) +// Defines values for TeamPlan. +const ( + Free TeamPlan = "free" + Paid TeamPlan = "paid" +) + // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -882,11 +888,17 @@ type Team struct { // Name The unique name for the team. Name TeamName `json:"name"` + + // Plan The plan the team is on + Plan *TeamPlan `json:"plan,omitempty"` } // TeamName The unique name for the team. type TeamName = string +// TeamPlan The plan the team is on +type TeamPlan string + // UsageCurrent The usage of a plugin within the current calendar month. type UsageCurrent struct { // PluginKind The kind of plugin, ie. source or destination. @@ -1175,6 +1187,9 @@ type CreateTeamJSONBody struct { // Name The unique name for the team. Name TeamName `json:"name"` + + // Plan The plan the team is on + Plan *TeamPlan `json:"plan,omitempty"` } // UpdateTeamJSONBody defines parameters for UpdateTeam. diff --git a/spec.json b/spec.json index 65f8f05..7920581 100644 --- a/spec.json +++ b/spec.json @@ -1922,6 +1922,9 @@ "description": "The team's display name", "minLength": 1, "maxLength": 255 + }, + "plan": { + "$ref": "#/components/schemas/TeamPlan" } } } @@ -4633,6 +4636,14 @@ "title": "CloudQuery Addon Asset", "type": "object" }, + "TeamPlan": { + "description": "The plan the team is on", + "type": "string", + "enum": [ + "free", + "paid" + ] + }, "Team": { "additionalProperties": false, "description": "CloudQuery Team", @@ -4645,6 +4656,9 @@ "name": { "$ref": "#/components/schemas/TeamName" }, + "plan": { + "$ref": "#/components/schemas/TeamPlan" + }, "display_name": { "description": "The team's display name", "maxLength": 255, From 0794b2e3257e7354516318d80f4b68174420d23f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:49:52 +0200 Subject: [PATCH 061/343] fix: Generate CloudQuery Go API Client from `spec.json` (#69) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 8 +++ spec.json | 78 +++++++++++++++++++++ 3 files changed, 270 insertions(+) diff --git a/client.gen.go b/client.gen.go index e3732ec..8813281 100644 --- a/client.gen.go +++ b/client.gen.go @@ -225,6 +225,9 @@ type ClientInterface interface { // ListAddonsByTeam request ListAddonsByTeam(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DownloadAddonAssetByTeam request + DownloadAddonAssetByTeam(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamAPIKeys request ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -915,6 +918,18 @@ func (c *Client) ListAddonsByTeam(ctx context.Context, teamName TeamName, params return c.Client.Do(req) } +func (c *Client) DownloadAddonAssetByTeam(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadAddonAssetByTeamRequest(c.Server, teamName, addonTeam, addonType, addonName, versionName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamAPIKeysRequest(c.Server, teamName, params) if err != nil { @@ -3592,6 +3607,83 @@ func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAd return req, nil } +// NewDownloadAddonAssetByTeamRequest generates requests for DownloadAddonAssetByTeam +func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_team", runtime.ParamLocationPath, addonTeam) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + + return req, nil +} + // NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { var err error @@ -5183,6 +5275,9 @@ type ClientWithResponsesInterface interface { // ListAddonsByTeamWithResponse request ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + // DownloadAddonAssetByTeamWithResponse request + DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + // ListTeamAPIKeysWithResponse request ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) @@ -6235,6 +6330,32 @@ func (r ListAddonsByTeamResponse) StatusCode() int { return 0 } +type DownloadAddonAssetByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonAsset + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadAddonAssetByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadAddonAssetByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamAPIKeysResponse struct { Body []byte HTTPResponse *http.Response @@ -7339,6 +7460,15 @@ func (c *ClientWithResponses) ListAddonsByTeamWithResponse(ctx context.Context, return ParseListAddonsByTeamResponse(rsp) } +// DownloadAddonAssetByTeamWithResponse request returning *DownloadAddonAssetByTeamResponse +func (c *ClientWithResponses) DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) { + rsp, err := c.DownloadAddonAssetByTeam(ctx, teamName, addonTeam, addonType, addonName, versionName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDownloadAddonAssetByTeamResponse(rsp) +} + // ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) @@ -9575,6 +9705,60 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons return response, nil } +// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call +func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DownloadAddonAssetByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index ed9766c..bdf53ca 100644 --- a/models.gen.go +++ b/models.gen.go @@ -960,6 +960,9 @@ type VersionName = string // AddonSortBy defines model for addon_sort_by. type AddonSortBy string +// AddonTeam The unique name for the team. +type AddonTeam = TeamName + // APIKeyID ID of the API key type APIKeyID = ID @@ -1210,6 +1213,11 @@ type ListAddonsByTeamParams struct { IncludePrivate *IncludePrivate `form:"include_private,omitempty" json:"include_private,omitempty"` } +// DownloadAddonAssetByTeamParams defines parameters for DownloadAddonAssetByTeam. +type DownloadAddonAssetByTeamParams struct { + Accept *string `json:"Accept,omitempty"` +} + // ListTeamAPIKeysParams defines parameters for ListTeamAPIKeys. type ListTeamAPIKeysParams struct { // PerPage The number of results per page (max 1000). diff --git a/spec.json b/spec.json index 7920581..4387f32 100644 --- a/spec.json +++ b/spec.json @@ -2842,6 +2842,76 @@ ] } }, + "/teams/{team_name}/addons/{addon_team}/{addon_type}/{addon_name}/versions/{version_name}/assets": { + "get": { + "description": "Download an asset for a given addon version as the current team.", + "operationId": "DownloadAddonAssetByTeam", + "parameters": [ + { + "in": "header", + "name": "Accept", + "required": false, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/addon_team" + }, + { + "$ref": "#/components/parameters/addon_type" + }, + { + "$ref": "#/components/parameters/addon_name" + }, + { + "$ref": "#/components/parameters/version_name" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonAsset" + } + } + } + }, + "302": { + "description": "Response", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "addons", + "usage" + ] + } + }, "/teams/{team_name}/invitations": { "get": { "operationId": "ListTeamInvitations", @@ -5286,6 +5356,14 @@ "$ref": "#/components/schemas/TeamName" } }, + "addon_team": { + "in": "path", + "name": "addon_team", + "required": true, + "schema": { + "$ref": "#/components/schemas/TeamName" + } + }, "email": { "in": "path", "name": "email", From 46a8d277cd1fbe3fbfbd6b60d9ff744b576adda4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:50:44 +0200 Subject: [PATCH 062/343] chore(main): Release v1.4.6 (#68) :robot: I have created a release *beep* *boop* --- ## [1.4.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.5...v1.4.6) (2023-11-14) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#67](https://github.com/cloudquery/cloudquery-api-go/issues/67)) ([8aa1edc](https://github.com/cloudquery/cloudquery-api-go/commit/8aa1edcf0ec2075696e5f5610c09bc540365c993)) * Generate CloudQuery Go API Client from `spec.json` ([#69](https://github.com/cloudquery/cloudquery-api-go/issues/69)) ([0794b2e](https://github.com/cloudquery/cloudquery-api-go/commit/0794b2e3257e7354516318d80f4b68174420d23f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a18b82..bf97864 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.4.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.5...v1.4.6) (2023-11-14) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#67](https://github.com/cloudquery/cloudquery-api-go/issues/67)) ([8aa1edc](https://github.com/cloudquery/cloudquery-api-go/commit/8aa1edcf0ec2075696e5f5610c09bc540365c993)) +* Generate CloudQuery Go API Client from `spec.json` ([#69](https://github.com/cloudquery/cloudquery-api-go/issues/69)) ([0794b2e](https://github.com/cloudquery/cloudquery-api-go/commit/0794b2e3257e7354516318d80f4b68174420d23f)) + ## [1.4.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.4...v1.4.5) (2023-11-13) From bf70ed239f33dc280433963e3e6d1c6bf954920a Mon Sep 17 00:00:00 2001 From: Martin Norbury Date: Tue, 14 Nov 2023 14:52:36 +0000 Subject: [PATCH 063/343] feat: Add a `Token` struct to allow the CLI to differentiate between `Bearer` and `APIKey` tokens (#66) This PR adds a `Token` struct to allow the CLI to differentiate between the auth methods. The CLI will have a different download flow depending on if the auth is using a bearer token vs an API key. For the bearer token the `team_name` is configured using the `cloudquery switch` command. For the API key, the key is associated with a team name already. --- auth/token.go | 33 ++++++++++++++++++++++++--------- auth/token_test.go | 10 +++++----- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/auth/token.go b/auth/token.go index 5813743..d1cf72e 100644 --- a/auth/token.go +++ b/auth/token.go @@ -29,6 +29,21 @@ type tokenResponse struct { ProjectID string `json:"project_id"` } +type TokenType int + +const ( + Undefined TokenType = iota + BearerToken + APIKey +) + +var UndefinedToken = Token{Type: Undefined, Value: ""} + +type Token struct { + Type TokenType + Value string +} + type TokenClient struct { url string apiKey string @@ -45,37 +60,37 @@ func NewTokenClient() *TokenClient { // GetToken returns the ID token // If CLOUDQUERY_API_KEY is set, it returns that value, otherwise it returns an ID token generated from the refresh token. -func (tc *TokenClient) GetToken() (string, error) { +func (tc *TokenClient) GetToken() (Token, error) { if token := os.Getenv(EnvVarCloudQueryAPIKey); token != "" { - return token, nil + return Token{Type: APIKey, Value: token}, nil } // If the token is not expired, return it if !tc.expiresAt.IsZero() && tc.expiresAt.Sub(time.Now().UTC()) > ExpiryBuffer { - return tc.idToken, nil + return Token{Type: BearerToken, Value: tc.idToken}, nil } refreshToken, err := ReadRefreshToken() if err != nil { - return "", fmt.Errorf("failed to read refresh token: %w. Hint: You may need to run `cloudquery login` or set %s", err, EnvVarCloudQueryAPIKey) + return UndefinedToken, fmt.Errorf("failed to read refresh token: %w. Hint: You may need to run `cloudquery login` or set %s", err, EnvVarCloudQueryAPIKey) } if refreshToken == "" { - return "", fmt.Errorf("authentication token not found. Hint: You may need to run `cloudquery login` or set %s", EnvVarCloudQueryAPIKey) + return UndefinedToken, fmt.Errorf("authentication token not found. Hint: You may need to run `cloudquery login` or set %s", EnvVarCloudQueryAPIKey) } tokenResponse, err := tc.generateToken(refreshToken) if err != nil { - return "", fmt.Errorf("failed to sign in with custom token: %w", err) + return UndefinedToken, fmt.Errorf("failed to sign in with custom token: %w", err) } if err := SaveRefreshToken(tokenResponse.RefreshToken); err != nil { - return "", fmt.Errorf("failed to save refresh token: %w", err) + return UndefinedToken, fmt.Errorf("failed to save refresh token: %w", err) } if err := tc.updateIDToken(tokenResponse); err != nil { - return "", fmt.Errorf("failed to update ID token: %w", err) + return UndefinedToken, fmt.Errorf("failed to update ID token: %w", err) } - return tc.idToken, nil + return Token{Type: BearerToken, Value: tc.idToken}, nil } func (tc *TokenClient) generateToken(refreshToken string) (*tokenResponse, error) { diff --git a/auth/token_test.go b/auth/token_test.go index bbaffa8..32879e0 100644 --- a/auth/token_test.go +++ b/auth/token_test.go @@ -46,7 +46,7 @@ func TestTokenClient_EnvironmentVariable(t *testing.T) { token, err := NewTokenClient().GetToken() require.NoError(t, err) - require.Equal(t, "my_token", token) + require.Equal(t, Token{Type: APIKey, Value: "my_token"}, token) } func TestTokenClient_GetToken_ShortExpiry(t *testing.T) { @@ -66,13 +66,13 @@ func TestTokenClient_GetToken_ShortExpiry(t *testing.T) { token, err := tc.GetToken() require.NoError(t, err) - require.Equal(t, "my_id_token_0", token, "first token") + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_0"}, token, "first token") tc.expiresAt = t0 token, err = tc.GetToken() require.NoError(t, err) - require.Equal(t, "my_id_token_1", token, "expected to issue new token") + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_1"}, token, "expected to issue new token") } func TestTokenClient_GetToken_LongExpiry(t *testing.T) { @@ -89,11 +89,11 @@ func TestTokenClient_GetToken_LongExpiry(t *testing.T) { token, err := tc.GetToken() require.NoError(t, err) - require.Equal(t, "my_id_token_0", token, "first token") + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_0"}, token, "first token") token, err = tc.GetToken() require.NoError(t, err) - require.Equal(t, "my_id_token_0", token, "expected to reuse token") + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_0"}, token, "expected to reuse token") } func overrideEnvironmentVariable(t *testing.T, key, value string) func() { From e6160a07d694149df342d29bb4852760fe4ddfb0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:26:46 +0200 Subject: [PATCH 064/343] chore(main): Release v1.5.0 (#70) :robot: I have created a release *beep* *boop* --- ## [1.5.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.6...v1.5.0) (2023-11-14) ### Features * Add a `Token` struct to allow the CLI to differentiate between `Bearer` and `APIKey` tokens ([#66](https://github.com/cloudquery/cloudquery-api-go/issues/66)) ([bf70ed2](https://github.com/cloudquery/cloudquery-api-go/commit/bf70ed239f33dc280433963e3e6d1c6bf954920a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf97864..94cd5c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.5.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.6...v1.5.0) (2023-11-14) + + +### Features + +* Add a `Token` struct to allow the CLI to differentiate between `Bearer` and `APIKey` tokens ([#66](https://github.com/cloudquery/cloudquery-api-go/issues/66)) ([bf70ed2](https://github.com/cloudquery/cloudquery-api-go/commit/bf70ed239f33dc280433963e3e6d1c6bf954920a)) + ## [1.4.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.5...v1.4.6) (2023-11-14) From cd50e79c7bbaaac45d63c82b8ef33aab9ce462b1 Mon Sep 17 00:00:00 2001 From: Kemal <223029+disq@users.noreply.github.com> Date: Wed, 15 Nov 2023 01:58:36 -0800 Subject: [PATCH 065/343] fix: Add stringer to Token (#71) --- auth/token.go | 7 ++++++- auth/token_test.go | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/auth/token.go b/auth/token.go index d1cf72e..e0f8b04 100644 --- a/auth/token.go +++ b/auth/token.go @@ -3,12 +3,13 @@ package auth import ( "encoding/json" "fmt" - "github.com/cloudquery/cloudquery-api-go/config" "io" "net/http" "net/url" "os" "time" + + "github.com/cloudquery/cloudquery-api-go/config" ) const ( @@ -44,6 +45,10 @@ type Token struct { Value string } +func (t Token) String() string { + return t.Value +} + type TokenClient struct { url string apiKey string diff --git a/auth/token_test.go b/auth/token_test.go index 32879e0..799683d 100644 --- a/auth/token_test.go +++ b/auth/token_test.go @@ -3,12 +3,13 @@ package auth import ( "encoding/json" "fmt" - "github.com/stretchr/testify/require" "net/http" "net/http/httptest" "os" "testing" "time" + + "github.com/stretchr/testify/require" ) func TestRefreshToken_RoundTrip(t *testing.T) { @@ -39,6 +40,12 @@ func TestRefreshToken_Removal(t *testing.T) { require.Error(t, err) } +func TestToken_Stringer(t *testing.T) { + token := Token{Type: BearerToken, Value: "my_token"} + out := fmt.Sprintf("Bearer %s", token) + require.Equal(t, "Bearer my_token", out) +} + func TestTokenClient_EnvironmentVariable(t *testing.T) { reset := overrideEnvironmentVariable(t, EnvVarCloudQueryAPIKey, "my_token") defer reset() From 69d6afe3deda2f1d202c2bca03e808cfc531945b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 15 Nov 2023 11:59:37 +0200 Subject: [PATCH 066/343] chore(main): Release v1.5.1 (#72) :robot: I have created a release *beep* *boop* --- ## [1.5.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.0...v1.5.1) (2023-11-15) ### Bug Fixes * Add stringer to Token ([#71](https://github.com/cloudquery/cloudquery-api-go/issues/71)) ([cd50e79](https://github.com/cloudquery/cloudquery-api-go/commit/cd50e79c7bbaaac45d63c82b8ef33aab9ce462b1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94cd5c9..dc62eaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.5.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.0...v1.5.1) (2023-11-15) + + +### Bug Fixes + +* Add stringer to Token ([#71](https://github.com/cloudquery/cloudquery-api-go/issues/71)) ([cd50e79](https://github.com/cloudquery/cloudquery-api-go/commit/cd50e79c7bbaaac45d63c82b8ef33aab9ce462b1)) + ## [1.5.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.6...v1.5.0) (2023-11-14) From db26b9c0db72240072ef5f075a098c0c6153b6bc Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:20:02 +0200 Subject: [PATCH 067/343] fix: Generate CloudQuery Go API Client from `spec.json` (#73) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 25 +++++++ spec.json | 90 ++++++++++++++++++++++++ 3 files changed, 300 insertions(+) diff --git a/client.gen.go b/client.gen.go index 8813281..1e63336 100644 --- a/client.gen.go +++ b/client.gen.go @@ -219,6 +219,9 @@ type ClientInterface interface { UpdateTeam(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListAddonOrdersByTeam request + ListAddonOrdersByTeam(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteAddonsByTeam request DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -894,6 +897,18 @@ func (c *Client) UpdateTeam(ctx context.Context, teamName TeamName, body UpdateT return c.Client.Do(req) } +func (c *Client) ListAddonOrdersByTeam(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonOrdersByTeamRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteAddonsByTeamRequest(c.Server, teamName) if err != nil { @@ -3485,6 +3500,78 @@ func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType return req, nil } +// NewListAddonOrdersByTeamRequest generates requests for ListAddonOrdersByTeam +func NewListAddonOrdersByTeamRequest(server string, teamName TeamName, params *ListAddonOrdersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewDeleteAddonsByTeamRequest generates requests for DeleteAddonsByTeam func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error @@ -5269,6 +5356,9 @@ type ClientWithResponsesInterface interface { UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + // ListAddonOrdersByTeamWithResponse request + ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + // DeleteAddonsByTeamWithResponse request DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) @@ -6275,6 +6365,35 @@ func (r UpdateTeamResponse) StatusCode() int { return 0 } +type ListAddonOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []AddonOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteAddonsByTeamResponse struct { Body []byte HTTPResponse *http.Response @@ -7442,6 +7561,15 @@ func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamNa return ParseUpdateTeamResponse(rsp) } +// ListAddonOrdersByTeamWithResponse request returning *ListAddonOrdersByTeamResponse +func (c *ClientWithResponses) ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) { + rsp, err := c.ListAddonOrdersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonOrdersByTeamResponse(rsp) +} + // DeleteAddonsByTeamWithResponse request returning *DeleteAddonsByTeamResponse func (c *ClientWithResponses) DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) { rsp, err := c.DeleteAddonsByTeam(ctx, teamName, reqEditors...) @@ -9594,6 +9722,63 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } +// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call +func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonOrdersByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []AddonOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index bdf53ca..dc7f1ff 100644 --- a/models.gen.go +++ b/models.gen.go @@ -265,6 +265,22 @@ type AddonFormat string // AddonName The unique name for the addon. type AddonName = string +// AddonOrder CloudQuery Addon Order +type AddonOrder struct { + // AddonName The unique name for the addon. + AddonName AddonName `json:"addon_name"` + + // AddonTeam The unique name for the team. + AddonTeam TeamName `json:"addon_team"` + + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` + PurchaseDate time.Time `json:"purchase_date"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` +} + // AddonTier Supported tiers for addons type AddonTier string @@ -1201,6 +1217,15 @@ type UpdateTeamJSONBody struct { DisplayName *string `json:"display_name,omitempty"` } +// ListAddonOrdersByTeamParams defines parameters for ListAddonOrdersByTeam. +type ListAddonOrdersByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + // ListAddonsByTeamParams defines parameters for ListAddonsByTeam. type ListAddonsByTeamParams struct { // Page Page number of the results to fetch diff --git a/spec.json b/spec.json index 4387f32..062ac91 100644 --- a/spec.json +++ b/spec.json @@ -2283,6 +2283,64 @@ ] } }, + "/teams/{team_name}/addon-orders": { + "get": { + "description": "List all addon orders for the team.", + "operationId": "ListAddonOrdersByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/AddonOrder" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "addons" + ] + } + }, "/teams/{team_name}/memberships": { "get": { "description": "Get memberships to the team.", @@ -4743,6 +4801,38 @@ "title": "Team", "type": "object" }, + "AddonOrder": { + "additionalProperties": false, + "description": "CloudQuery Addon Order", + "properties": { + "team_name": { + "$ref": "#/components/schemas/TeamName" + }, + "addon_team": { + "$ref": "#/components/schemas/TeamName" + }, + "addon_type": { + "$ref": "#/components/schemas/AddonType" + }, + "addon_name": { + "$ref": "#/components/schemas/AddonName" + }, + "purchase_date": { + "type": "string", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + } + }, + "required": [ + "team_name", + "addon_team", + "addon_type", + "addon_name", + "purchase_date" + ], + "title": "CloudQuery Addon", + "type": "object" + }, "Email": { "type": "string", "example": "user@cloudquery.io", From e07af9f5d7ff20cee004d497a30a50427ee31790 Mon Sep 17 00:00:00 2001 From: Martin Norbury Date: Thu, 16 Nov 2023 13:26:43 +0000 Subject: [PATCH 068/343] feat: Add method to return token type (#75) Whilst the token itself now contains the token type, it is useful to be able to determine the type of tokens the token client will return without fetching a token first. An example user of this functionality will be the usage client, which needs to determine if an API call is needed to fetch the team name when the authentication is using an API key. Refs: https://github.com/cloudquery/cloudquery-issues/issues/893 --- auth/token.go | 12 ++++++++++-- auth/token_test.go | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/auth/token.go b/auth/token.go index e0f8b04..aadab9a 100644 --- a/auth/token.go +++ b/auth/token.go @@ -66,8 +66,8 @@ func NewTokenClient() *TokenClient { // GetToken returns the ID token // If CLOUDQUERY_API_KEY is set, it returns that value, otherwise it returns an ID token generated from the refresh token. func (tc *TokenClient) GetToken() (Token, error) { - if token := os.Getenv(EnvVarCloudQueryAPIKey); token != "" { - return Token{Type: APIKey, Value: token}, nil + if tc.GetTokenType() == APIKey { + return Token{Type: APIKey, Value: os.Getenv(EnvVarCloudQueryAPIKey)}, nil } // If the token is not expired, return it @@ -98,6 +98,14 @@ func (tc *TokenClient) GetToken() (Token, error) { return Token{Type: BearerToken, Value: tc.idToken}, nil } +// GetTokenType returns the type of token that will be returned by GetToken +func (tc *TokenClient) GetTokenType() TokenType { + if token := os.Getenv(EnvVarCloudQueryAPIKey); token != "" { + return APIKey + } + return BearerToken +} + func (tc *TokenClient) generateToken(refreshToken string) (*tokenResponse, error) { data := url.Values{} data.Set("grant_type", "refresh_token") diff --git a/auth/token_test.go b/auth/token_test.go index 799683d..dbc8e56 100644 --- a/auth/token_test.go +++ b/auth/token_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -103,6 +104,20 @@ func TestTokenClient_GetToken_LongExpiry(t *testing.T) { require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_0"}, token, "expected to reuse token") } +func TestTokenClient_BearerTokenType(t *testing.T) { + tc := NewTokenClient() + + assert.Equal(t, BearerToken, tc.GetTokenType()) +} + +func TestTokenClient_APIKeyTokenType(t *testing.T) { + t.Setenv(EnvVarCloudQueryAPIKey, "my_token") + + tc := NewTokenClient() + + assert.Equal(t, APIKey, tc.GetTokenType()) +} + func overrideEnvironmentVariable(t *testing.T, key, value string) func() { originalValue := os.Getenv(key) resetFn := func() { From 816ca83b907c7a0a31cfc27bb991bc307338eca3 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:52:39 +0200 Subject: [PATCH 069/343] chore(main): Release v1.6.0 (#74) :robot: I have created a release *beep* *boop* --- ## [1.6.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.1...v1.6.0) (2023-11-16) ### Features * Add method to return token type ([#75](https://github.com/cloudquery/cloudquery-api-go/issues/75)) ([e07af9f](https://github.com/cloudquery/cloudquery-api-go/commit/e07af9f5d7ff20cee004d497a30a50427ee31790)) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#73](https://github.com/cloudquery/cloudquery-api-go/issues/73)) ([db26b9c](https://github.com/cloudquery/cloudquery-api-go/commit/db26b9c0db72240072ef5f075a098c0c6153b6bc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc62eaf..4889e39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.6.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.1...v1.6.0) (2023-11-16) + + +### Features + +* Add method to return token type ([#75](https://github.com/cloudquery/cloudquery-api-go/issues/75)) ([e07af9f](https://github.com/cloudquery/cloudquery-api-go/commit/e07af9f5d7ff20cee004d497a30a50427ee31790)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#73](https://github.com/cloudquery/cloudquery-api-go/issues/73)) ([db26b9c](https://github.com/cloudquery/cloudquery-api-go/commit/db26b9c0db72240072ef5f075a098c0c6153b6bc)) + ## [1.5.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.0...v1.5.1) (2023-11-15) From d97a5b7f175719cf4b486b31229e4dfb1e2bb333 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:03:25 +0200 Subject: [PATCH 070/343] fix: Generate CloudQuery Go API Client from `spec.json` (#76) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 21 +++++++ spec.json | 77 ++++++++++++++++++++++++ 3 files changed, 260 insertions(+) diff --git a/client.gen.go b/client.gen.go index 1e63336..145babc 100644 --- a/client.gen.go +++ b/client.gen.go @@ -222,6 +222,11 @@ type ClientInterface interface { // ListAddonOrdersByTeam request ListAddonOrdersByTeam(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateAddonOrderForTeamWithBody request with any body + CreateAddonOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAddonOrderForTeam(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteAddonsByTeam request DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -909,6 +914,30 @@ func (c *Client) ListAddonOrdersByTeam(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } +func (c *Client) CreateAddonOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonOrderForTeamRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateAddonOrderForTeam(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonOrderForTeamRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteAddonsByTeamRequest(c.Server, teamName) if err != nil { @@ -3572,6 +3601,53 @@ func NewListAddonOrdersByTeamRequest(server string, teamName TeamName, params *L return req, nil } +// NewCreateAddonOrderForTeamRequest calls the generic CreateAddonOrderForTeam builder with application/json body +func NewCreateAddonOrderForTeamRequest(server string, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateAddonOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateAddonOrderForTeamRequestWithBody generates requests for CreateAddonOrderForTeam with any type of body +func NewCreateAddonOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewDeleteAddonsByTeamRequest generates requests for DeleteAddonsByTeam func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error @@ -5359,6 +5435,11 @@ type ClientWithResponsesInterface interface { // ListAddonOrdersByTeamWithResponse request ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + // CreateAddonOrderForTeamWithBodyWithResponse request with any body + CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + // DeleteAddonsByTeamWithResponse request DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) @@ -6394,6 +6475,30 @@ func (r ListAddonOrdersByTeamResponse) StatusCode() int { return 0 } +type CreateAddonOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateAddonOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonOrderForTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteAddonsByTeamResponse struct { Body []byte HTTPResponse *http.Response @@ -7570,6 +7675,23 @@ func (c *ClientWithResponses) ListAddonOrdersByTeamWithResponse(ctx context.Cont return ParseListAddonOrdersByTeamResponse(rsp) } +// CreateAddonOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateAddonOrderForTeamResponse +func (c *ClientWithResponses) CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { + rsp, err := c.CreateAddonOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonOrderForTeamResponse(rsp) +} + +func (c *ClientWithResponses) CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { + rsp, err := c.CreateAddonOrderForTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonOrderForTeamResponse(rsp) +} + // DeleteAddonsByTeamWithResponse request returning *DeleteAddonsByTeamResponse func (c *ClientWithResponses) DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) { rsp, err := c.DeleteAddonsByTeam(ctx, teamName, reqEditors...) @@ -9779,6 +9901,46 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT return response, nil } +// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call +func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateAddonOrderForTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index dc7f1ff..bea1732 100644 --- a/models.gen.go +++ b/models.gen.go @@ -281,6 +281,24 @@ type AddonOrder struct { TeamName TeamName `json:"team_name"` } +// AddonOrderCreate Create CloudQuery Addon Order +type AddonOrderCreate struct { + // AddonName The unique name for the addon. + AddonName AddonName `json:"addon_name"` + + // AddonTeam The unique name for the team. + AddonTeam TeamName `json:"addon_team"` + + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` + + // CancelUrl URL to redirect to after order cancellation + CancelUrl string `json:"cancel_url"` + + // RedirectUrl URL to redirect to after order completion + RedirectUrl string `json:"redirect_url"` +} + // AddonTier Supported tiers for addons type AddonTier string @@ -1402,6 +1420,9 @@ type CreateTeamJSONRequestBody CreateTeamJSONBody // UpdateTeamJSONRequestBody defines body for UpdateTeam for application/json ContentType. type UpdateTeamJSONRequestBody UpdateTeamJSONBody +// CreateAddonOrderForTeamJSONRequestBody defines body for CreateAddonOrderForTeam for application/json ContentType. +type CreateAddonOrderForTeamJSONRequestBody = AddonOrderCreate + // CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. type CreateTeamAPIKeyJSONRequestBody CreateTeamAPIKeyJSONBody diff --git a/spec.json b/spec.json index 062ac91..06d7920 100644 --- a/spec.json +++ b/spec.json @@ -2339,6 +2339,49 @@ "tags": [ "addons" ] + }, + "post": { + "description": "Start the checkout process for an addon order.", + "operationId": "CreateAddonOrderForTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonOrderCreate" + } + } + } + }, + "responses": { + "302": { + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "addons" + ] } }, "/teams/{team_name}/memberships": { @@ -4833,6 +4876,40 @@ "title": "CloudQuery Addon", "type": "object" }, + "AddonOrderCreate": { + "additionalProperties": false, + "description": "Create CloudQuery Addon Order", + "properties": { + "addon_team": { + "$ref": "#/components/schemas/TeamName" + }, + "addon_type": { + "$ref": "#/components/schemas/AddonType" + }, + "addon_name": { + "$ref": "#/components/schemas/AddonName" + }, + "redirect_url": { + "type": "string", + "description": "URL to redirect to after order completion", + "example": "https://cloud.cloudquery.io/order-completion" + }, + "cancel_url": { + "type": "string", + "description": "URL to redirect to after order cancellation", + "example": "https://cloud.cloudquery.io/order-cancelled" + } + }, + "required": [ + "addon_team", + "addon_type", + "addon_name", + "redirect_url", + "cancel_url" + ], + "title": "Create CloudQuery Addon Order", + "type": "object" + }, "Email": { "type": "string", "example": "user@cloudquery.io", From 52bbb81b047f27878361eddccf201eda386bed6d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 22 Nov 2023 18:27:39 +0200 Subject: [PATCH 071/343] fix: Generate CloudQuery Go API Client from `spec.json` (#78) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ models.gen.go | 4 ++-- spec.json | 9 ++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/client.gen.go b/client.gen.go index 145babc..09f2250 100644 --- a/client.gen.go +++ b/client.gen.go @@ -6478,6 +6478,7 @@ func (r ListAddonOrdersByTeamResponse) StatusCode() int { type CreateAddonOrderForTeamResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError @@ -9915,6 +9916,13 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index bea1732..4ee7372 100644 --- a/models.gen.go +++ b/models.gen.go @@ -295,8 +295,8 @@ type AddonOrderCreate struct { // CancelUrl URL to redirect to after order cancellation CancelUrl string `json:"cancel_url"` - // RedirectUrl URL to redirect to after order completion - RedirectUrl string `json:"redirect_url"` + // SuccessUrl URL to redirect to after successful order completion + SuccessUrl string `json:"success_url"` } // AddonTier Supported tiers for addons diff --git a/spec.json b/spec.json index 06d7920..79999bf 100644 --- a/spec.json +++ b/spec.json @@ -2369,6 +2369,9 @@ }, "description": "Response" }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -4889,9 +4892,9 @@ "addon_name": { "$ref": "#/components/schemas/AddonName" }, - "redirect_url": { + "success_url": { "type": "string", - "description": "URL to redirect to after order completion", + "description": "URL to redirect to after successful order completion", "example": "https://cloud.cloudquery.io/order-completion" }, "cancel_url": { @@ -4904,7 +4907,7 @@ "addon_team", "addon_type", "addon_name", - "redirect_url", + "success_url", "cancel_url" ], "title": "Create CloudQuery Addon Order", From 0d4f433e7ef47a78d4e8ec5f96e69f61903d51be Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 23 Nov 2023 16:29:42 +0200 Subject: [PATCH 072/343] fix: Generate CloudQuery Go API Client from `spec.json` (#79) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 37 ++++++++--- spec.json | 114 ++++++++++++++++++++++++++++++--- 3 files changed, 305 insertions(+), 18 deletions(-) diff --git a/client.gen.go b/client.gen.go index 09f2250..b733f93 100644 --- a/client.gen.go +++ b/client.gen.go @@ -227,6 +227,9 @@ type ClientInterface interface { CreateAddonOrderForTeam(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetAddonOrderByTeam request + GetAddonOrderByTeam(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteAddonsByTeam request DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -938,6 +941,18 @@ func (c *Client) CreateAddonOrderForTeam(ctx context.Context, teamName TeamName, return c.Client.Do(req) } +func (c *Client) GetAddonOrderByTeam(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonOrderByTeamRequest(c.Server, teamName, addonOrderID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteAddonsByTeamRequest(c.Server, teamName) if err != nil { @@ -3648,6 +3663,47 @@ func NewCreateAddonOrderForTeamRequestWithBody(server string, teamName TeamName, return req, nil } +// NewGetAddonOrderByTeamRequest generates requests for GetAddonOrderByTeam +func NewGetAddonOrderByTeamRequest(server string, teamName TeamName, addonOrderID AddonOrderID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_order_id", runtime.ParamLocationPath, addonOrderID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addon-orders/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewDeleteAddonsByTeamRequest generates requests for DeleteAddonsByTeam func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error @@ -5440,6 +5496,9 @@ type ClientWithResponsesInterface interface { CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + // GetAddonOrderByTeamWithResponse request + GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + // DeleteAddonsByTeamWithResponse request DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) @@ -5806,6 +5865,7 @@ type DownloadAddonAssetResponse struct { HTTPResponse *http.Response JSON200 *AddonAsset JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON429 *TooManyRequests JSON500 *InternalError @@ -6478,6 +6538,7 @@ func (r ListAddonOrdersByTeamResponse) StatusCode() int { type CreateAddonOrderForTeamResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *AddonOrder JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -6500,6 +6561,32 @@ func (r CreateAddonOrderForTeamResponse) StatusCode() int { return 0 } +type GetAddonOrderByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonOrder + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetAddonOrderByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonOrderByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteAddonsByTeamResponse struct { Body []byte HTTPResponse *http.Response @@ -6560,6 +6647,7 @@ type DownloadAddonAssetByTeamResponse struct { HTTPResponse *http.Response JSON200 *AddonAsset JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON429 *TooManyRequests JSON500 *InternalError @@ -7693,6 +7781,15 @@ func (c *ClientWithResponses) CreateAddonOrderForTeamWithResponse(ctx context.Co return ParseCreateAddonOrderForTeamResponse(rsp) } +// GetAddonOrderByTeamWithResponse request returning *GetAddonOrderByTeamResponse +func (c *ClientWithResponses) GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) { + rsp, err := c.GetAddonOrderByTeam(ctx, teamName, addonOrderID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonOrderByTeamResponse(rsp) +} + // DeleteAddonsByTeamWithResponse request returning *DeleteAddonsByTeamResponse func (c *ClientWithResponses) DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) { rsp, err := c.DeleteAddonsByTeam(ctx, teamName, reqEditors...) @@ -8544,6 +8641,13 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9916,6 +10020,13 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9949,6 +10060,60 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder return response, nil } +// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call +func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddonOrderByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -10088,6 +10253,13 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 4ee7372..29a33bb 100644 --- a/models.gen.go +++ b/models.gen.go @@ -32,6 +32,13 @@ const ( Zip AddonFormat = "zip" ) +// Defines values for AddonOrderStatus. +const ( + Cancelled AddonOrderStatus = "cancelled" + Completed AddonOrderStatus = "completed" + Pending AddonOrderStatus = "pending" +) + // Defines values for AddonTier. const ( AddonTierFree AddonTier = "free" @@ -154,7 +161,7 @@ type APIKey struct { ExpiresAt time.Time `json:"expires_at"` // Id ID of the API key - ID ID `json:"id"` + APIKeyID APIKeyID `json:"id"` // Key API key. Will be shown only in the response when creating the key. Key *string `json:"key,omitempty"` @@ -166,8 +173,8 @@ type APIKey struct { Scope APIKeyScope `json:"scope"` } -// ID ID of the API key -type ID = openapi_types.UUID +// APIKeyID ID of the API key +type APIKeyID = openapi_types.UUID // APIKeyName Name of the API key type APIKeyName = string @@ -274,11 +281,20 @@ type AddonOrder struct { AddonTeam TeamName `json:"addon_team"` // AddonType Supported types for addons - AddonType AddonType `json:"addon_type"` - PurchaseDate time.Time `json:"purchase_date"` + AddonType AddonType `json:"addon_type"` + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CompletionUrl Stripe URL for completing purchase. Only shown in response to POST request. + CompletionURL *string `json:"completion_url,omitempty"` + CreatedAt time.Time `json:"created_at"` + + // Id ID of the addon order + AddonOrderID AddonOrderID `json:"id"` + Status AddonOrderStatus `json:"status"` // TeamName The unique name for the team. - TeamName TeamName `json:"team_name"` + TeamName TeamName `json:"team_name"` + UpdatedAt time.Time `json:"updated_at"` } // AddonOrderCreate Create CloudQuery Addon Order @@ -299,6 +315,12 @@ type AddonOrderCreate struct { SuccessUrl string `json:"success_url"` } +// AddonOrderID ID of the addon order +type AddonOrderID = openapi_types.UUID + +// AddonOrderStatus defines model for AddonOrderStatus. +type AddonOrderStatus string + // AddonTier Supported tiers for addons type AddonTier string @@ -997,9 +1019,6 @@ type AddonSortBy string // AddonTeam The unique name for the team. type AddonTeam = TeamName -// APIKeyID ID of the API key -type APIKeyID = ID - // IncludeDrafts defines model for include_drafts. type IncludeDrafts = bool diff --git a/spec.json b/spec.json index 79999bf..69cb963 100644 --- a/spec.json +++ b/spec.json @@ -1787,6 +1787,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -2359,15 +2362,15 @@ } }, "responses": { - "302": { - "headers": { - "Location": { + "201": { + "description": "Response", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/AddonOrder" } } - }, - "description": "Response" + } }, "400": { "$ref": "#/components/responses/BadRequest" @@ -2387,6 +2390,47 @@ ] } }, + "/teams/{team_name}/addon-orders/{addon_order_id}": { + "get": { + "description": "Get an addon order for the team.", + "operationId": "GetAddonOrderByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/addon_order_id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonOrder" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "addons" + ] + } + }, "/teams/{team_name}/memberships": { "get": { "description": "Get memberships to the team.", @@ -2999,6 +3043,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "404": { "$ref": "#/components/responses/NotFound" }, @@ -4847,10 +4894,28 @@ "title": "Team", "type": "object" }, + "AddonOrderID": { + "description": "ID of the addon order", + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "x-go-name": "AddonOrderID" + }, + "AddonOrderStatus": { + "type": "string", + "enum": [ + "pending", + "completed", + "cancelled" + ] + }, "AddonOrder": { "additionalProperties": false, "description": "CloudQuery Addon Order", "properties": { + "id": { + "$ref": "#/components/schemas/AddonOrderID" + }, "team_name": { "$ref": "#/components/schemas/TeamName" }, @@ -4863,18 +4928,40 @@ "addon_name": { "$ref": "#/components/schemas/AddonName" }, - "purchase_date": { + "status": { + "$ref": "#/components/schemas/AddonOrderStatus" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + }, + "updated_at": { "type": "string", "format": "date-time", "example": "2017-07-14T16:53:42Z" + }, + "completed_at": { + "type": "string", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + }, + "completion_url": { + "type": "string", + "format": "uri", + "description": "Stripe URL for completing purchase. Only shown in response to POST request.", + "x-go-name": "CompletionURL" } }, "required": [ + "id", "team_name", "addon_team", "addon_type", "addon_name", - "purchase_date" + "status", + "created_at", + "updated_at" ], "title": "CloudQuery Addon", "type": "object" @@ -5227,7 +5314,7 @@ "type": "string", "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "ID" + "x-go-name": "APIKeyID" }, "APIKeyScope": { "description": "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", @@ -5518,6 +5605,15 @@ "type": "boolean" } }, + "addon_order_id": { + "name": "addon_order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/AddonOrderID" + }, + "x-go-name": "AddonOrderID" + }, "plugin_team": { "in": "path", "name": "plugin_team", From fbffe9b7d9b5a20a717eaec3943db87f637b063f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:35:53 +0200 Subject: [PATCH 073/343] fix: Generate CloudQuery Go API Client from `spec.json` (#80) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 527 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 68 ++++++- spec.json | 253 +++++++++++++++++++++++- 3 files changed, 842 insertions(+), 6 deletions(-) diff --git a/client.gen.go b/client.gen.go index b733f93..fda3f69 100644 --- a/client.gen.go +++ b/client.gen.go @@ -297,6 +297,17 @@ type ClientInterface interface { // DownloadPluginAssetByTeam request DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSubscriptionOrdersByTeam request + ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSubscriptionOrderForTeamWithBody request with any body + CreateSubscriptionOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSubscriptionOrderForTeam(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSubscriptionOrderByTeam request + GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamPluginUsage request ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1241,6 +1252,54 @@ func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamNam return c.Client.Do(req) } +func (c *Client) ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSubscriptionOrdersByTeamRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSubscriptionOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSubscriptionOrderForTeamRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSubscriptionOrderForTeam(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSubscriptionOrderForTeamRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSubscriptionOrderByTeamRequest(c.Server, teamName, teamSubscriptionOrderID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) if err != nil { @@ -4845,6 +4904,166 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return req, nil } +// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam +func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body +func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body +func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam +func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error @@ -5566,6 +5785,17 @@ type ClientWithResponsesInterface interface { // DownloadPluginAssetByTeamWithResponse request DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + // ListSubscriptionOrdersByTeamWithResponse request + ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) + + // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body + CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + // GetSubscriptionOrderByTeamWithResponse request + GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + // ListTeamPluginUsageWithResponse request ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) @@ -7096,6 +7326,89 @@ func (r DownloadPluginAssetByTeamResponse) StatusCode() int { return 0 } +type ListSubscriptionOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []TeamSubscriptionOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSubscriptionOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSubscriptionOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSubscriptionOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *TeamSubscriptionOrder + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSubscriptionOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSubscriptionOrderForTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSubscriptionOrderByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TeamSubscriptionOrder + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSubscriptionOrderByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response @@ -8001,6 +8314,41 @@ func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context. return ParseDownloadPluginAssetByTeamResponse(rsp) } +// ListSubscriptionOrdersByTeamWithResponse request returning *ListSubscriptionOrdersByTeamResponse +func (c *ClientWithResponses) ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) { + rsp, err := c.ListSubscriptionOrdersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSubscriptionOrdersByTeamResponse(rsp) +} + +// CreateSubscriptionOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateSubscriptionOrderForTeamResponse +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSubscriptionOrderForTeamResponse(rsp) +} + +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSubscriptionOrderForTeamResponse(rsp) +} + +// GetSubscriptionOrderByTeamWithResponse request returning *GetSubscriptionOrderByTeamResponse +func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) { + rsp, err := c.GetSubscriptionOrderByTeam(ctx, teamName, teamSubscriptionOrderID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSubscriptionOrderByTeamResponse(rsp) +} + // ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) @@ -11137,6 +11485,185 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } +// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call +func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListSubscriptionOrdersByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []TeamSubscriptionOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call +func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSubscriptionOrderForTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest TeamSubscriptionOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call +func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSubscriptionOrderByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TeamSubscriptionOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamPluginUsageResponse parses an HTTP response from a ListTeamPluginUsageWithResponse call func ParseListTeamPluginUsageResponse(rsp *http.Response) (*ListTeamPluginUsageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 29a33bb..6356e2c 100644 --- a/models.gen.go +++ b/models.gen.go @@ -34,9 +34,9 @@ const ( // Defines values for AddonOrderStatus. const ( - Cancelled AddonOrderStatus = "cancelled" - Completed AddonOrderStatus = "completed" - Pending AddonOrderStatus = "pending" + AddonOrderStatusCancelled AddonOrderStatus = "cancelled" + AddonOrderStatusCompleted AddonOrderStatus = "completed" + AddonOrderStatusPending AddonOrderStatus = "pending" ) // Defines values for AddonTier. @@ -74,8 +74,9 @@ const ( // Defines values for PluginTier. const ( - PluginTierFree PluginTier = "free" - PluginTierPaid PluginTier = "paid" + PluginTierFree PluginTier = "free" + PluginTierOpenCore PluginTier = "open-core" + PluginTierPaid PluginTier = "paid" ) // Defines values for PluginVersionPackageType. @@ -90,6 +91,13 @@ const ( Paid TeamPlan = "paid" ) +// Defines values for TeamSubscriptionOrderStatus. +const ( + TeamSubscriptionOrderStatusCancelled TeamSubscriptionOrderStatus = "cancelled" + TeamSubscriptionOrderStatusCompleted TeamSubscriptionOrderStatus = "completed" + TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" +) + // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -955,6 +963,44 @@ type TeamName = string // TeamPlan The plan the team is on type TeamPlan string +// TeamSubscriptionOrder Team subscription order +type TeamSubscriptionOrder struct { + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CompletionUrl Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected. + CompletionURL *string `json:"completion_url,omitempty"` + CreatedAt time.Time `json:"created_at"` + + // Id ID of the team subscription order + TeamSubscriptionOrderID TeamSubscriptionOrderID `json:"id"` + + // Plan The plan the team is on + Plan TeamPlan `json:"plan"` + Status TeamSubscriptionOrderStatus `json:"status"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + UpdatedAt time.Time `json:"updated_at"` +} + +// TeamSubscriptionOrderCreate Create team subscription order +type TeamSubscriptionOrderCreate struct { + // CancelUrl URL to redirect to after order cancellation + CancelUrl string `json:"cancel_url"` + + // Plan The plan the team is on + Plan TeamPlan `json:"plan"` + + // SuccessUrl URL to redirect to after successful order completion + SuccessUrl string `json:"success_url"` +} + +// TeamSubscriptionOrderID ID of the team subscription order +type TeamSubscriptionOrderID = openapi_types.UUID + +// TeamSubscriptionOrderStatus defines model for TeamSubscriptionOrderStatus. +type TeamSubscriptionOrderStatus string + // UsageCurrent The usage of a plugin within the current calendar month. type UsageCurrent struct { // PluginKind The kind of plugin, ie. source or destination. @@ -1355,6 +1401,15 @@ type DownloadPluginAssetByTeamParams struct { Accept *string `json:"Accept,omitempty"` } +// ListSubscriptionOrdersByTeamParams defines parameters for ListSubscriptionOrdersByTeam. +type ListSubscriptionOrdersByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. type ListTeamPluginUsageParams struct { // Page Page number of the results to fetch @@ -1457,6 +1512,9 @@ type CreateMonthlyLimitJSONRequestBody = MonthlyLimitCreate // UpdateMonthlyLimitJSONRequestBody defines body for UpdateMonthlyLimit for application/json ContentType. type UpdateMonthlyLimitJSONRequestBody = MonthlyLimitUpdate +// CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. +type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate + // IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease diff --git a/spec.json b/spec.json index 69cb963..4b92f42 100644 --- a/spec.json +++ b/spec.json @@ -3276,6 +3276,157 @@ } } }, + "/teams/{team_name}/subscription-orders": { + "get": { + "description": "List all subscription orders for the team.", + "operationId": "ListSubscriptionOrdersByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/TeamSubscriptionOrder" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + }, + "post": { + "description": "Start the checkout process for a subscription order.", + "operationId": "CreateSubscriptionOrderForTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamSubscriptionOrderCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamSubscriptionOrder" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + } + }, + "/teams/{team_name}/subscription-orders/{subscription_order_id}": { + "get": { + "description": "Get a subscription order for the team.", + "operationId": "GetSubscriptionOrderByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/team_subscription_order_id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamSubscriptionOrder" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + } + }, "/teams/{team_name}/users": { "get": { "description": "List all users in the current team.", @@ -3770,7 +3921,8 @@ "type": "string", "enum": [ "free", - "paid" + "paid", + "open-core" ] }, "Plugin": { @@ -5280,6 +5432,96 @@ "title": "CloudQuery Team Membership", "type": "object" }, + "TeamSubscriptionOrderID": { + "description": "ID of the team subscription order", + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "x-go-name": "TeamSubscriptionOrderID" + }, + "TeamSubscriptionOrderStatus": { + "type": "string", + "enum": [ + "pending", + "completed", + "cancelled" + ] + }, + "TeamSubscriptionOrder": { + "additionalProperties": false, + "title": "Team subscription order", + "description": "Team subscription order", + "properties": { + "id": { + "$ref": "#/components/schemas/TeamSubscriptionOrderID" + }, + "team_name": { + "$ref": "#/components/schemas/TeamName" + }, + "plan": { + "$ref": "#/components/schemas/TeamPlan" + }, + "status": { + "$ref": "#/components/schemas/TeamSubscriptionOrderStatus" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + }, + "completed_at": { + "type": "string", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + }, + "completion_url": { + "type": "string", + "format": "uri", + "description": "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", + "x-go-name": "CompletionURL" + } + }, + "required": [ + "id", + "team_name", + "plan", + "status", + "created_at", + "updated_at" + ], + "type": "object" + }, + "TeamSubscriptionOrderCreate": { + "additionalProperties": false, + "description": "Create team subscription order", + "properties": { + "plan": { + "$ref": "#/components/schemas/TeamPlan" + }, + "success_url": { + "type": "string", + "description": "URL to redirect to after successful order completion", + "example": "https://cloud.cloudquery.io/order-completion" + }, + "cancel_url": { + "type": "string", + "description": "URL to redirect to after order cancellation", + "example": "https://cloud.cloudquery.io/order-cancelled" + } + }, + "required": [ + "plan", + "success_url", + "cancel_url" + ], + "title": "Create team subscription order", + "type": "object" + }, "InvitationWithToken": { "additionalProperties": false, "allOf": [ @@ -5638,6 +5880,15 @@ "$ref": "#/components/schemas/Email" } }, + "team_subscription_order_id": { + "name": "subscription_order_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/TeamSubscriptionOrderID" + }, + "x-go-name": "TeamSubscriptionOrderID" + }, "apikey_id": { "name": "apikey_id", "in": "path", From 81d3ca00b0e326ea6539a7981b8eed85db7ed2cf Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 6 Dec 2023 14:22:26 +0200 Subject: [PATCH 074/343] fix: Generate CloudQuery Go API Client from `spec.json` (#81) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ++++-- spec.json | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index 6356e2c..42f9c07 100644 --- a/models.gen.go +++ b/models.gen.go @@ -551,7 +551,8 @@ type ListPlugin struct { TeamName TeamName `json:"team_name"` // Tier Supported tiers for plugins - Tier PluginTier `json:"tier"` + Tier PluginTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. USDPerRow string `json:"usd_per_row"` @@ -652,7 +653,8 @@ type Plugin struct { TeamName TeamName `json:"team_name"` // Tier Supported tiers for plugins - Tier PluginTier `json:"tier"` + Tier PluginTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. USDPerRow string `json:"usd_per_row"` diff --git a/spec.json b/spec.json index 4b92f42..1f66de6 100644 --- a/spec.json +++ b/spec.json @@ -134,6 +134,7 @@ "display_name": "AWS Source Plugin", "category": "cloud-infrastructure", "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-07-14T16:53:42Z", "homepage": "https://cloudquery.io", "logo": "https://images.cloudquery.io/logos/aws.png", "official": true, @@ -2101,6 +2102,7 @@ "display_name": "AWS Source Plugin", "category": "cloud-infrastructure", "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-07-14T16:53:42Z", "homepage": "https://cloudquery.io", "logo": "https://images.cloudquery.io/logos/aws.png", "official": true, @@ -3946,6 +3948,11 @@ "format": "date-time", "type": "string" }, + "updated_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + }, "homepage": { "type": "string", "example": "https://cloudquery.io" @@ -4006,6 +4013,7 @@ "category", "release_stage", "created_at", + "updated_at", "logo", "display_name", "official", From 5484cb230d5705166e1c09887ff757721deb65ec Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:38:41 +0200 Subject: [PATCH 075/343] fix: Generate CloudQuery Go API Client from `spec.json` (#82) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ++++-- spec.json | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/models.gen.go b/models.gen.go index 42f9c07..3fbc458 100644 --- a/models.gen.go +++ b/models.gen.go @@ -225,7 +225,8 @@ type Addon struct { TeamName TeamName `json:"team_name"` // Tier Supported tiers for addons - Tier AddonTier `json:"tier"` + Tier AddonTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` } // AddonAsset CloudQuery Addon Asset @@ -502,7 +503,8 @@ type ListAddon struct { TeamName TeamName `json:"team_name"` // Tier Supported tiers for addons - Tier AddonTier `json:"tier"` + Tier AddonTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` } // ListMetadata defines model for ListMetadata. diff --git a/spec.json b/spec.json index 1f66de6..0c99d62 100644 --- a/spec.json +++ b/spec.json @@ -1249,6 +1249,7 @@ "display_name": "AWS Policies", "category": "cloud-infrastructure", "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-07-14T16:53:42Z", "homepage": "https://cloudquery.io", "logo": "https://images.cloudquery.io/logos/aws.png", "official": true, @@ -2216,6 +2217,7 @@ "display_name": "AWS Policies", "category": "cloud-infrastructure", "created_at": "2017-07-14T16:53:42Z", + "updated_at": "2017-07-14T16:53:42Z", "homepage": "https://cloudquery.io", "logo": "https://images.cloudquery.io/logos/aws.png", "official": true, @@ -4723,6 +4725,11 @@ "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string" + }, + "updated_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" } }, "required": [ @@ -4737,7 +4744,8 @@ "price_usd", "short_description", "logo", - "created_at" + "created_at", + "updated_at" ], "title": "CloudQuery Addon", "type": "object" From 57c9a3e6dd6a8c4c596a92c7324e162f9f0be383 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:22:20 +0200 Subject: [PATCH 076/343] fix: Generate CloudQuery Go API Client from `spec.json` (#83) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 9 +++++++++ spec.json | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/models.gen.go b/models.gen.go index 3fbc458..58fd7db 100644 --- a/models.gen.go +++ b/models.gen.go @@ -760,6 +760,9 @@ type PluginTable struct { // IsIncremental Whether the table is incremental IsIncremental bool `json:"is_incremental"` + // IsPaid Whether the table is paid + IsPaid *bool `json:"is_paid,omitempty"` + // Name Name of the table Name PluginTableName `json:"name"` @@ -807,6 +810,9 @@ type PluginTableCreate struct { // IsIncremental Whether the table is incremental IsIncremental *bool `json:"is_incremental,omitempty"` + // IsPaid Whether the table is paid + IsPaid *bool `json:"is_paid,omitempty"` + // Name Name of the table Name PluginTableName `json:"name"` @@ -831,6 +837,9 @@ type PluginTableDetails struct { // IsIncremental Whether the table is incremental IsIncremental bool `json:"is_incremental"` + // IsPaid Whether the table is paid + IsPaid *bool `json:"is_paid,omitempty"` + // Name Name of the table Name string `json:"name"` diff --git a/spec.json b/spec.json index 0c99d62..9cffe7a 100644 --- a/spec.json +++ b/spec.json @@ -4440,6 +4440,10 @@ "description": "Title of the table", "type": "string", "example": "AWS S3 Buckets" + }, + "is_paid": { + "description": "Whether the table is paid", + "type": "boolean" } }, "title": "CloudQuery Plugin Table", @@ -4529,6 +4533,10 @@ "type": "string", "example": "AWS S3 Buckets" }, + "is_paid": { + "description": "Whether the table is paid", + "type": "boolean" + }, "columns": { "type": "array", "items": { @@ -4583,6 +4591,10 @@ "title": { "description": "Title of the table", "type": "string" + }, + "is_paid": { + "description": "Whether the table is paid", + "type": "boolean" } }, "type": "object" From ab7e9578101e3bdc2ecdeab55ea6f271c323d357 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:23:42 +0200 Subject: [PATCH 077/343] chore(main): Release v1.6.1 (#77) :robot: I have created a release *beep* *boop* --- ## [1.6.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.0...v1.6.1) (2023-12-07) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#76](https://github.com/cloudquery/cloudquery-api-go/issues/76)) ([d97a5b7](https://github.com/cloudquery/cloudquery-api-go/commit/d97a5b7f175719cf4b486b31229e4dfb1e2bb333)) * Generate CloudQuery Go API Client from `spec.json` ([#78](https://github.com/cloudquery/cloudquery-api-go/issues/78)) ([52bbb81](https://github.com/cloudquery/cloudquery-api-go/commit/52bbb81b047f27878361eddccf201eda386bed6d)) * Generate CloudQuery Go API Client from `spec.json` ([#79](https://github.com/cloudquery/cloudquery-api-go/issues/79)) ([0d4f433](https://github.com/cloudquery/cloudquery-api-go/commit/0d4f433e7ef47a78d4e8ec5f96e69f61903d51be)) * Generate CloudQuery Go API Client from `spec.json` ([#80](https://github.com/cloudquery/cloudquery-api-go/issues/80)) ([fbffe9b](https://github.com/cloudquery/cloudquery-api-go/commit/fbffe9b7d9b5a20a717eaec3943db87f637b063f)) * Generate CloudQuery Go API Client from `spec.json` ([#81](https://github.com/cloudquery/cloudquery-api-go/issues/81)) ([81d3ca0](https://github.com/cloudquery/cloudquery-api-go/commit/81d3ca00b0e326ea6539a7981b8eed85db7ed2cf)) * Generate CloudQuery Go API Client from `spec.json` ([#82](https://github.com/cloudquery/cloudquery-api-go/issues/82)) ([5484cb2](https://github.com/cloudquery/cloudquery-api-go/commit/5484cb230d5705166e1c09887ff757721deb65ec)) * Generate CloudQuery Go API Client from `spec.json` ([#83](https://github.com/cloudquery/cloudquery-api-go/issues/83)) ([57c9a3e](https://github.com/cloudquery/cloudquery-api-go/commit/57c9a3e6dd6a8c4c596a92c7324e162f9f0be383)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4889e39..70b0403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.6.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.0...v1.6.1) (2023-12-07) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#76](https://github.com/cloudquery/cloudquery-api-go/issues/76)) ([d97a5b7](https://github.com/cloudquery/cloudquery-api-go/commit/d97a5b7f175719cf4b486b31229e4dfb1e2bb333)) +* Generate CloudQuery Go API Client from `spec.json` ([#78](https://github.com/cloudquery/cloudquery-api-go/issues/78)) ([52bbb81](https://github.com/cloudquery/cloudquery-api-go/commit/52bbb81b047f27878361eddccf201eda386bed6d)) +* Generate CloudQuery Go API Client from `spec.json` ([#79](https://github.com/cloudquery/cloudquery-api-go/issues/79)) ([0d4f433](https://github.com/cloudquery/cloudquery-api-go/commit/0d4f433e7ef47a78d4e8ec5f96e69f61903d51be)) +* Generate CloudQuery Go API Client from `spec.json` ([#80](https://github.com/cloudquery/cloudquery-api-go/issues/80)) ([fbffe9b](https://github.com/cloudquery/cloudquery-api-go/commit/fbffe9b7d9b5a20a717eaec3943db87f637b063f)) +* Generate CloudQuery Go API Client from `spec.json` ([#81](https://github.com/cloudquery/cloudquery-api-go/issues/81)) ([81d3ca0](https://github.com/cloudquery/cloudquery-api-go/commit/81d3ca00b0e326ea6539a7981b8eed85db7ed2cf)) +* Generate CloudQuery Go API Client from `spec.json` ([#82](https://github.com/cloudquery/cloudquery-api-go/issues/82)) ([5484cb2](https://github.com/cloudquery/cloudquery-api-go/commit/5484cb230d5705166e1c09887ff757721deb65ec)) +* Generate CloudQuery Go API Client from `spec.json` ([#83](https://github.com/cloudquery/cloudquery-api-go/issues/83)) ([57c9a3e](https://github.com/cloudquery/cloudquery-api-go/commit/57c9a3e6dd6a8c4c596a92c7324e162f9f0be383)) + ## [1.6.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.1...v1.6.0) (2023-11-16) From d60e62730c2e86e5b82da7c0f283b5a6ed0d97aa Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 11 Dec 2023 19:08:33 +0200 Subject: [PATCH 078/343] fix: Generate CloudQuery Go API Client from `spec.json` (#84) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 20 +++++++++++++------- spec.json | 5 +++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/models.gen.go b/models.gen.go index 58fd7db..ffa6d78 100644 --- a/models.gen.go +++ b/models.gen.go @@ -68,8 +68,9 @@ const ( // Defines values for PluginReleaseStage. const ( - Ga PluginReleaseStage = "ga" - Preview PluginReleaseStage = "preview" + ComingSoon PluginReleaseStage = "coming-soon" + Ga PluginReleaseStage = "ga" + Preview PluginReleaseStage = "preview" ) // Defines values for PluginTier. @@ -542,7 +543,8 @@ type ListPlugin struct { // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. Public *bool `json:"public,omitempty"` - // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. ReleaseStage PluginReleaseStage `json:"release_stage"` @@ -644,7 +646,8 @@ type Plugin struct { // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. Public *bool `json:"public,omitempty"` - // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. ReleaseStage PluginReleaseStage `json:"release_stage"` @@ -698,7 +701,8 @@ type PluginCreate struct { // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team. Public bool `json:"public"` - // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` @@ -747,7 +751,8 @@ type PluginName = string // PluginProtocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). type PluginProtocols = []int -// PluginReleaseStage Official plugins go through two release stages: Preview, and GA. +// PluginReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. +// The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. type PluginReleaseStage string @@ -877,7 +882,8 @@ type PluginUpdate struct { // Public If plugin is not public, it won't be visible to other teams in the CloudQuery Hub. Public *bool `json:"public,omitempty"` - // ReleaseStage Official plugins go through two release stages: Preview, and GA. + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` diff --git a/spec.json b/spec.json index 9cffe7a..00c370d 100644 --- a/spec.json +++ b/spec.json @@ -3912,13 +3912,14 @@ ] }, "PluginReleaseStage": { - "description": "Official plugins go through two release stages: Preview, and GA.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", "type": "string", "enum": [ + "coming-soon", "preview", "ga" ], - "default": "preview" + "default": "coming-soon" }, "PluginTier": { "description": "Supported tiers for plugins", From a859c21302e8a982cd38796544a838c39f3e8681 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:46:06 +0200 Subject: [PATCH 079/343] fix: Generate CloudQuery Go API Client from `spec.json` (#86) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ models.gen.go | 10 ++++++++-- spec.json | 14 +++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/client.gen.go b/client.gen.go index fda3f69..c7837c1 100644 --- a/client.gen.go +++ b/client.gen.go @@ -2556,6 +2556,22 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P } + if params.IncludePrereleases != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_prereleases", runtime.ParamLocationQuery, *params.IncludePrereleases); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } diff --git a/models.gen.go b/models.gen.go index ffa6d78..9989f7c 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1087,6 +1087,9 @@ type AddonTeam = TeamName // IncludeDrafts defines model for include_drafts. type IncludeDrafts = bool +// IncludePrereleases defines model for include_prereleases. +type IncludePrereleases = bool + // IncludePrivate defines model for include_private. type IncludePrivate = bool @@ -1161,7 +1164,7 @@ type ListAddonVersionsParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - // IncludeDrafts Whether to include draft plugins + // IncludeDrafts Whether to include draft versions IncludeDrafts *IncludeDrafts `form:"include_drafts,omitempty" json:"include_drafts,omitempty"` } @@ -1219,8 +1222,11 @@ type ListPluginVersionsParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - // IncludeDrafts Whether to include draft plugins + // IncludeDrafts Whether to include draft versions IncludeDrafts *IncludeDrafts `form:"include_drafts,omitempty" json:"include_drafts,omitempty"` + + // IncludePrereleases Whether to include prerelease versions + IncludePrereleases *IncludePrereleases `form:"include_prereleases,omitempty" json:"include_prereleases,omitempty"` } // ListPluginVersionsParamsSortBy defines parameters for ListPluginVersions. diff --git a/spec.json b/spec.json index 00c370d..df30a08 100644 --- a/spec.json +++ b/spec.json @@ -372,6 +372,9 @@ }, { "$ref": "#/components/parameters/include_drafts" + }, + { + "$ref": "#/components/parameters/include_prereleases" } ], "responses": { @@ -5812,7 +5815,7 @@ } }, "include_drafts": { - "description": "Whether to include draft plugins", + "description": "Whether to include draft versions", "in": "query", "name": "include_drafts", "required": false, @@ -5820,6 +5823,15 @@ "type": "boolean" } }, + "include_prereleases": { + "description": "Whether to include prerelease versions", + "in": "query", + "name": "include_prereleases", + "required": false, + "schema": { + "type": "boolean" + } + }, "version_name": { "in": "path", "name": "version_name", From 854b0dfa1011b27b257027573a5131122c8ff16f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:05:05 +0200 Subject: [PATCH 080/343] fix: Generate CloudQuery Go API Client from `spec.json` (#87) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 219 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 8 ++ spec.json | 83 ++++++++++++++++++- 3 files changed, 308 insertions(+), 2 deletions(-) diff --git a/client.gen.go b/client.gen.go index c7837c1..6c1f6be 100644 --- a/client.gen.go +++ b/client.gen.go @@ -182,6 +182,11 @@ type ClientInterface interface { // ListPluginVersionDocs request ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ReplacePluginVersionDocsWithBody request with any body + ReplacePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ReplacePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePluginVersionDocsWithBody request with any body CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -748,6 +753,30 @@ func (c *Client) ListPluginVersionDocs(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } +func (c *Client) ReplacePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReplacePluginVersionDocsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ReplacePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReplacePluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreatePluginVersionDocsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { @@ -3074,6 +3103,74 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKin return req, nil } +// NewReplacePluginVersionDocsRequest calls the generic ReplacePluginVersionDocs builder with application/json body +func NewReplacePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewReplacePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewReplacePluginVersionDocsRequestWithBody generates requests for ReplacePluginVersionDocs with any type of body +func NewReplacePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -5686,6 +5783,11 @@ type ClientWithResponsesInterface interface { // ListPluginVersionDocsWithResponse request ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + // ReplacePluginVersionDocsWithBodyWithResponse request with any body + ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + + ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + // CreatePluginVersionDocsWithBodyWithResponse request with any body CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) @@ -6503,6 +6605,36 @@ func (r ListPluginVersionDocsResponse) StatusCode() int { return 0 } +type ReplacePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` + } + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ReplacePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReplacePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CreatePluginVersionDocsResponse struct { Body []byte HTTPResponse *http.Response @@ -7963,6 +8095,23 @@ func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Cont return ParseListPluginVersionDocsResponse(rsp) } +// ReplacePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *ReplacePluginVersionDocsResponse +func (c *ClientWithResponses) ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { + rsp, err := c.ReplacePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReplacePluginVersionDocsResponse(rsp) +} + +func (c *ClientWithResponses) ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { + rsp, err := c.ReplacePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReplacePluginVersionDocsResponse(rsp) +} + // CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) @@ -9782,6 +9931,76 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD return response, nil } +// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call +func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReplacePluginVersionDocsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 9989f7c..260078e 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1274,6 +1274,11 @@ type ListPluginVersionDocsParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } +// ReplacePluginVersionDocsJSONBody defines parameters for ReplacePluginVersionDocs. +type ReplacePluginVersionDocsJSONBody struct { + Pages []PluginDocsPageCreate `json:"pages"` +} + // CreatePluginVersionDocsJSONBody defines parameters for CreatePluginVersionDocs. type CreatePluginVersionDocsJSONBody struct { Pages []PluginDocsPageCreate `json:"pages"` @@ -1504,6 +1509,9 @@ type CreatePluginVersionJSONRequestBody CreatePluginVersionJSONBody // DeletePluginVersionDocsJSONRequestBody defines body for DeletePluginVersionDocs for application/json ContentType. type DeletePluginVersionDocsJSONRequestBody DeletePluginVersionDocsJSONBody +// ReplacePluginVersionDocsJSONRequestBody defines body for ReplacePluginVersionDocs for application/json ContentType. +type ReplacePluginVersionDocsJSONRequestBody ReplacePluginVersionDocsJSONBody + // CreatePluginVersionDocsJSONRequestBody defines body for CreatePluginVersionDocs for application/json ContentType. type CreatePluginVersionDocsJSONRequestBody CreatePluginVersionDocsJSONBody diff --git a/spec.json b/spec.json index df30a08..1a571bb 100644 --- a/spec.json +++ b/spec.json @@ -634,7 +634,7 @@ }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/docs": { "get": { - "description": "List all documentation pages for a given plugin version.", + "description": "List all documentation pages for a given plugin version", "operationId": "ListPluginVersionDocs", "parameters": [ { @@ -697,7 +697,7 @@ ] }, "put": { - "description": "Create or update one or more plugin version docs pages.", + "description": "Create or update one or more plugin version docs pages", "operationId": "CreatePluginVersionDocs", "parameters": [ { @@ -775,6 +775,85 @@ "plugins" ] }, + "post": { + "description": "Replace (override) multiple plugin version docs pages", + "operationId": "ReplacePluginVersionDocs", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + }, + { + "$ref": "#/components/parameters/version_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "pages" + ], + "properties": { + "pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginDocsPageCreate" + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Successfully created or updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginDocsPageName" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "plugins" + ] + }, "delete": { "description": "Delete one or more plugin version docs pages.", "operationId": "DeletePluginVersionDocs", From 322022b2248674845fd99e3ea5f44977e54b0e19 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:05:38 +0200 Subject: [PATCH 081/343] chore(main): Release v1.6.2 (#85) :robot: I have created a release *beep* *boop* --- ## [1.6.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.1...v1.6.2) (2023-12-12) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#84](https://github.com/cloudquery/cloudquery-api-go/issues/84)) ([d60e627](https://github.com/cloudquery/cloudquery-api-go/commit/d60e62730c2e86e5b82da7c0f283b5a6ed0d97aa)) * Generate CloudQuery Go API Client from `spec.json` ([#86](https://github.com/cloudquery/cloudquery-api-go/issues/86)) ([a859c21](https://github.com/cloudquery/cloudquery-api-go/commit/a859c21302e8a982cd38796544a838c39f3e8681)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b0403..3bc356b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.6.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.1...v1.6.2) (2023-12-12) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#84](https://github.com/cloudquery/cloudquery-api-go/issues/84)) ([d60e627](https://github.com/cloudquery/cloudquery-api-go/commit/d60e62730c2e86e5b82da7c0f283b5a6ed0d97aa)) +* Generate CloudQuery Go API Client from `spec.json` ([#86](https://github.com/cloudquery/cloudquery-api-go/issues/86)) ([a859c21](https://github.com/cloudquery/cloudquery-api-go/commit/a859c21302e8a982cd38796544a838c39f3e8681)) +* Generate CloudQuery Go API Client from `spec.json` ([#87](https://github.com/cloudquery/cloudquery-api-go/issues/87)) ([854b0df](https://github.com/cloudquery/cloudquery-api-go/commit/854b0dfa1011b27b257027573a5131122c8ff16f)) + ## [1.6.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.0...v1.6.1) (2023-12-07) From cc496c51789398000e33a07507eb6a5926b4ba0b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:39:24 +0200 Subject: [PATCH 082/343] fix: Generate CloudQuery Go API Client from `spec.json` (#88) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 23 +++++++ spec.json | 99 +++++++++++++++++++++++++++ 3 files changed, 307 insertions(+) diff --git a/client.gen.go b/client.gen.go index 6c1f6be..bd58277 100644 --- a/client.gen.go +++ b/client.gen.go @@ -271,6 +271,9 @@ type ClientInterface interface { // CancelTeamInvitation request CancelTeamInvitation(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListInvoicesByTeam request + ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamMemberships request GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1149,6 +1152,18 @@ func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, em return c.Client.Do(req) } +func (c *Client) ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListInvoicesByTeamRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) if err != nil { @@ -4442,6 +4457,78 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai return req, nil } +// NewListInvoicesByTeamRequest generates requests for ListInvoicesByTeam +func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *ListInvoicesByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invoices", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetTeamMembershipsRequest generates requests for GetTeamMemberships func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { var err error @@ -5872,6 +5959,9 @@ type ClientWithResponsesInterface interface { // CancelTeamInvitationWithResponse request CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + // ListInvoicesByTeamWithResponse request + ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + // GetTeamMembershipsWithResponse request GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) @@ -7229,6 +7319,35 @@ func (r CancelTeamInvitationResponse) StatusCode() int { return 0 } +type ListInvoicesByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []Invoice `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListInvoicesByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListInvoicesByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetTeamMembershipsResponse struct { Body []byte HTTPResponse *http.Response @@ -8382,6 +8501,15 @@ func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Conte return ParseCancelTeamInvitationResponse(rsp) } +// ListInvoicesByTeamWithResponse request returning *ListInvoicesByTeamResponse +func (c *ClientWithResponses) ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) { + rsp, err := c.ListInvoicesByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListInvoicesByTeamResponse(rsp) +} + // GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) @@ -11211,6 +11339,63 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio return response, nil } +// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call +func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListInvoicesByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []Invoice `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 260078e..c117718 100644 --- a/models.gen.go +++ b/models.gen.go @@ -466,6 +466,20 @@ type InvitationWithToken struct { Token openapi_types.UUID `json:"token"` } +// Invoice Invoice details +type Invoice struct { + // AmountDue Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due. + AmountDue int64 `json:"amount_due"` + CreatedAt time.Time `json:"created_at"` + Currency string `json:"currency"` + + // InvoicePdf The link to download the PDF for the invoice. + InvoicePDF string `json:"invoice_pdf"` + + // Paid Whether or not payment was successfully collected for this invoice. + Paid bool `json:"paid"` +} + // ListAddon defines model for ListAddon. type ListAddon struct { // AddonFormat Supported formats for addons @@ -1396,6 +1410,15 @@ type AcceptTeamInvitationJSONBody struct { Token openapi_types.UUID `json:"token"` } +// ListInvoicesByTeamParams defines parameters for ListInvoicesByTeam. +type ListInvoicesByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + // GetTeamMembershipsParams defines parameters for GetTeamMemberships. type GetTeamMembershipsParams struct { // Page Page number of the results to fetch diff --git a/spec.json b/spec.json index 1a571bb..19f9398 100644 --- a/spec.json +++ b/spec.json @@ -2848,6 +2848,64 @@ ] } }, + "/teams/{team_name}/invoices": { + "get": { + "description": "List all past invoices for the team.", + "operationId": "ListInvoicesByTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Invoice" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + } + }, "/teams/{team_name}/usage": { "get": { "description": "List plugin usage for the current calendar month.", @@ -5414,6 +5472,47 @@ } } }, + "Invoice": { + "additionalProperties": false, + "title": "Invoice", + "description": "Invoice details", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "example": "2017-07-14T16:53:42Z" + }, + "amount_due": { + "type": "integer", + "format": "int64", + "example": 1000, + "description": "Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due." + }, + "currency": { + "type": "string", + "example": "usd" + }, + "invoice_pdf": { + "type": "string", + "format": "uri", + "description": "The link to download the PDF for the invoice.", + "x-go-name": "InvoicePDF" + }, + "paid": { + "type": "boolean", + "example": true, + "description": "Whether or not payment was successfully collected for this invoice." + } + }, + "required": [ + "created_at", + "amount_due", + "currency", + "invoice_pdf", + "paid" + ], + "type": "object" + }, "UsageCurrent": { "title": "CloudQuery Plugin Usage", "description": "The usage of a plugin within the current calendar month.", From 5d40225648e94e8baeafec64bc88c55fb0e093a3 Mon Sep 17 00:00:00 2001 From: Kemal <223029+disq@users.noreply.github.com> Date: Mon, 18 Dec 2023 17:01:09 +0000 Subject: [PATCH 083/343] fix: Better error on expired token (#90) Co-authored-by: Kemal Hadimli --- auth/token.go | 20 ++++++++++---------- auth/token_error.go | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 auth/token_error.go diff --git a/auth/token.go b/auth/token.go index aadab9a..4966427 100644 --- a/auth/token.go +++ b/auth/token.go @@ -84,7 +84,10 @@ func (tc *TokenClient) GetToken() (Token, error) { } tokenResponse, err := tc.generateToken(refreshToken) if err != nil { - return UndefinedToken, fmt.Errorf("failed to sign in with custom token: %w", err) + if IsTokenExpiredError(err) { + return UndefinedToken, fmt.Errorf("authentication token expired: %w. Hint: You may need to run `cloudquery login` or set %s", err, EnvVarCloudQueryAPIKey) + } + return UndefinedToken, fmt.Errorf("failed to sign in with token: %w", err) } if err := SaveRefreshToken(tokenResponse.RefreshToken); err != nil { @@ -116,19 +119,16 @@ func (tc *TokenClient) generateToken(refreshToken string) (*tokenResponse, error return nil, err } defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - body, readErr := io.ReadAll(resp.Body) - if readErr != nil { - return nil, fmt.Errorf("failed to read response body: %w", readErr) - } - return nil, fmt.Errorf("failed to refresh token: %s: %s", resp.Status, body) - } - - var tr tokenResponse body, err := io.ReadAll(resp.Body) if err != nil { return nil, err } + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("failed to refresh token: %s: %w", resp.Status, TokenErrorFromBody(body)) + } + + var tr tokenResponse if err := parseToken(body, &tr); err != nil { return nil, err } diff --git a/auth/token_error.go b/auth/token_error.go new file mode 100644 index 0000000..465ea6c --- /dev/null +++ b/auth/token_error.go @@ -0,0 +1,39 @@ +package auth + +import ( + "encoding/json" + "errors" +) + +type TokenError struct { + Body []byte `json:"-"` + ErrorDetails struct { + Code int `json:"code"` + Message string `json:"message"` + Status string `json:"status"` + } `json:"error"` +} + +func (t TokenError) Error() string { + return string(t.Body) +} + +func TokenErrorFromBody(body []byte) *TokenError { + t := &TokenError{} + _ = json.Unmarshal(body, t) + t.Body = body + return t +} + +func IsTokenExpiredError(err error) bool { + if err == nil { + return false + } + + var te *TokenError + if errors.As(err, &te) { + return te.ErrorDetails.Code == 400 && te.ErrorDetails.Message == "TOKEN_EXPIRED" + } + + return false +} From 2703775cc553d6e97d3dca1a2cbb8aa2ac20483b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 19 Dec 2023 12:09:47 +0200 Subject: [PATCH 084/343] chore(main): Release v1.6.3 (#89) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bc356b..558050e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.6.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.2...v1.6.3) (2023-12-18) + + +### Bug Fixes + +* Better error on expired token ([#90](https://github.com/cloudquery/cloudquery-api-go/issues/90)) ([5d40225](https://github.com/cloudquery/cloudquery-api-go/commit/5d40225648e94e8baeafec64bc88c55fb0e093a3)) +* Generate CloudQuery Go API Client from `spec.json` ([#88](https://github.com/cloudquery/cloudquery-api-go/issues/88)) ([cc496c5](https://github.com/cloudquery/cloudquery-api-go/commit/cc496c51789398000e33a07507eb6a5926b4ba0b)) + ## [1.6.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.1...v1.6.2) (2023-12-12) From 7de06f2038c275960ad102d00cbf360947c96297 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 26 Dec 2023 13:09:01 +0200 Subject: [PATCH 085/343] fix: Generate CloudQuery Go API Client from `spec.json` (#91) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 465 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 48 +++++- spec.json | 313 ++++++++++++++++++++++++++------- 3 files changed, 760 insertions(+), 66 deletions(-) diff --git a/client.gen.go b/client.gen.go index bd58277..1ae90dd 100644 --- a/client.gen.go +++ b/client.gen.go @@ -133,6 +133,17 @@ type ClientInterface interface { // UploadAddonAsset request UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePluginNotificationRequestWithBody request with any body + CreatePluginNotificationRequestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePluginNotificationRequest(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePluginNotificationRequest request + DeletePluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPluginNotificationRequest request + GetPluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPlugins request ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -540,6 +551,54 @@ func (c *Client) UploadAddonAsset(ctx context.Context, teamName TeamName, addonT return c.Client.Do(req) } +func (c *Client) CreatePluginNotificationRequestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginNotificationRequestRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePluginNotificationRequest(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginNotificationRequestRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletePluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginNotificationRequestRequest(c.Server, pluginTeam, pluginKind, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginNotificationRequestRequest(c.Server, pluginTeam, pluginKind, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginsRequest(c.Server, params) if err != nil { @@ -2215,6 +2274,142 @@ func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType Addo return req, nil } +// NewCreatePluginNotificationRequestRequest calls the generic CreatePluginNotificationRequest builder with application/json body +func NewCreatePluginNotificationRequestRequest(server string, body CreatePluginNotificationRequestJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginNotificationRequestRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreatePluginNotificationRequestRequestWithBody generates requests for CreatePluginNotificationRequest with any type of body +func NewCreatePluginNotificationRequestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugin-notification-requests") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeletePluginNotificationRequestRequest generates requests for DeletePluginNotificationRequest +func NewDeletePluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetPluginNotificationRequestRequest generates requests for GetPluginNotificationRequest +func NewGetPluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListPluginsRequest generates requests for ListPlugins func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Request, error) { var err error @@ -5821,6 +6016,17 @@ type ClientWithResponsesInterface interface { // UploadAddonAssetWithResponse request UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + // CreatePluginNotificationRequestWithBodyWithResponse request with any body + CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + + CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + + // DeletePluginNotificationRequestWithResponse request + DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) + + // GetPluginNotificationRequestWithResponse request + GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) + // ListPluginsWithResponse request ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) @@ -6350,6 +6556,82 @@ func (r UploadAddonAssetResponse) StatusCode() int { return 0 } +type CreatePluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *PluginNotificationRequest + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginNotificationRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginsResponse struct { Body []byte HTTPResponse *http.Response @@ -8057,6 +8339,41 @@ func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, return ParseUploadAddonAssetResponse(rsp) } +// CreatePluginNotificationRequestWithBodyWithResponse request with arbitrary body returning *CreatePluginNotificationRequestResponse +func (c *ClientWithResponses) CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequestWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginNotificationRequestResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequest(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginNotificationRequestResponse(rsp) +} + +// DeletePluginNotificationRequestWithResponse request returning *DeletePluginNotificationRequestResponse +func (c *ClientWithResponses) DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) { + rsp, err := c.DeletePluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginNotificationRequestResponse(rsp) +} + +// GetPluginNotificationRequestWithResponse request returning *GetPluginNotificationRequestResponse +func (c *ClientWithResponses) GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) { + rsp, err := c.GetPluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPluginNotificationRequestResponse(rsp) +} + // ListPluginsWithResponse request returning *ListPluginsResponse func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { rsp, err := c.ListPlugins(ctx, params, reqEditors...) @@ -9362,6 +9679,154 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons return response, nil } +// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call +func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginNotificationRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call +func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call +func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginNotificationRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index c117718..dca01a8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -66,6 +66,12 @@ const ( Source PluginKind = "source" ) +// Defines values for PluginNotificationRequestStatus. +const ( + PluginNotificationRequestStatusPending PluginNotificationRequestStatus = "pending" + PluginNotificationRequestStatusSent PluginNotificationRequestStatus = "sent" +) + // Defines values for PluginReleaseStage. const ( ComingSoon PluginReleaseStage = "coming-soon" @@ -94,9 +100,9 @@ const ( // Defines values for TeamSubscriptionOrderStatus. const ( - TeamSubscriptionOrderStatusCancelled TeamSubscriptionOrderStatus = "cancelled" - TeamSubscriptionOrderStatusCompleted TeamSubscriptionOrderStatus = "completed" - TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" + Cancelled TeamSubscriptionOrderStatus = "cancelled" + Completed TeamSubscriptionOrderStatus = "completed" + Pending TeamSubscriptionOrderStatus = "pending" ) // Defines values for AddonSortBy. @@ -762,6 +768,39 @@ type PluginKind string // PluginName The unique name for the plugin. type PluginName = string +// PluginNotificationRequest Plugin Notification Request +type PluginNotificationRequest struct { + CreatedAt time.Time `json:"created_at"` + + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + SentAt *time.Time `json:"sent_at,omitempty"` + + // Status Status of a plugin notification request + Status *PluginNotificationRequestStatus `json:"status,omitempty"` +} + +// PluginNotificationRequestCreate Create a Plugin Notification Request +type PluginNotificationRequestCreate struct { + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` +} + +// PluginNotificationRequestStatus Status of a plugin notification request +type PluginNotificationRequestStatus string + // PluginProtocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). type PluginProtocols = []int @@ -1517,6 +1556,9 @@ type UpdateAddonVersionJSONRequestBody = AddonVersionUpdate // CreateAddonVersionJSONRequestBody defines body for CreateAddonVersion for application/json ContentType. type CreateAddonVersionJSONRequestBody CreateAddonVersionJSONBody +// CreatePluginNotificationRequestJSONRequestBody defines body for CreatePluginNotificationRequest for application/json ContentType. +type CreatePluginNotificationRequestJSONRequestBody = PluginNotificationRequestCreate + // CreatePluginJSONRequestBody defines body for CreatePlugin for application/json ContentType. type CreatePluginJSONRequestBody = PluginCreate diff --git a/spec.json b/spec.json index 19f9398..6c02d3e 100644 --- a/spec.json +++ b/spec.json @@ -96,6 +96,128 @@ } } }, + "/plugin-notification-requests": { + "post": { + "description": "Create a new plugin notification request.", + "operationId": "CreatePluginNotificationRequest", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginNotificationRequestCreate" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginNotificationRequest" + } + } + }, + "description": "Created" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "plugins" + ] + } + }, + "/plugin-notification-requests/{plugin_team}/{plugin_kind}/{plugin_name}": { + "get": { + "description": "Query plugin notification request for a given plugin.", + "operationId": "GetPluginNotificationRequest", + "parameters": [ + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginNotificationRequest" + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "security": [], + "tags": [ + "plugins" + ] + }, + "delete": { + "description": "Remove plugin notification request for a given plugin.", + "operationId": "DeletePluginNotificationRequest", + "parameters": [ + { + "$ref": "#/components/parameters/plugin_team" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "security": [], + "tags": [ + "plugins" + ] + } + }, "/plugins": { "get": { "description": "List all plugins", @@ -4024,6 +4146,15 @@ "type": "string", "example": "cloudquery" }, + "PluginKind": { + "description": "The kind of plugin, ie. source or destination.", + "type": "string", + "example": "source", + "enum": [ + "source", + "destination" + ] + }, "PluginName": { "description": "The unique name for the plugin.", "maxLength": 255, @@ -4031,13 +4162,93 @@ "type": "string", "example": "aws-source" }, - "PluginKind": { - "description": "The kind of plugin, ie. source or destination.", + "PluginNotificationRequestCreate": { + "type": "object", + "additionalProperties": false, + "description": "Create a Plugin Notification Request", + "required": [ + "plugin_team", + "plugin_kind", + "plugin_name" + ], + "properties": { + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + } + } + }, + "PluginNotificationRequestStatus": { + "description": "Status of a plugin notification request", "type": "string", - "example": "source", "enum": [ - "source", - "destination" + "pending", + "sent" + ], + "default": "pending" + }, + "PluginNotificationRequest": { + "type": "object", + "additionalProperties": false, + "description": "Plugin Notification Request", + "required": [ + "plugin_team", + "plugin_kind", + "plugin_name", + "created_at" + ], + "properties": { + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + }, + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + }, + "sent_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/PluginNotificationRequestStatus" + } + } + }, + "FieldError": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicError" + }, + { + "properties": { + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "field_errors": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + } ] }, "PluginCategory": { @@ -4277,30 +4488,6 @@ } } }, - "FieldError": { - "allOf": [ - { - "$ref": "#/components/schemas/BasicError" - }, - { - "properties": { - "errors": { - "items": { - "type": "string" - }, - "type": "array" - }, - "field_errors": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - } - ] - }, "PluginUpdate": { "type": "object", "properties": { @@ -5834,17 +6021,17 @@ }, "description": "Internal Error" }, - "RequiresAuthentication": { + "BadRequest": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BasicError" + "$ref": "#/components/schemas/FieldError" } } }, - "description": "Requires authentication" + "description": "Bad request" }, - "BadRequest": { + "Forbidden": { "content": { "application/json": { "schema": { @@ -5852,17 +6039,17 @@ } } }, - "description": "Bad request" + "description": "Forbidden" }, - "Forbidden": { + "NotFound": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FieldError" + "$ref": "#/components/schemas/BasicError" } } }, - "description": "Forbidden" + "description": "Resource not found" }, "UnprocessableEntity": { "content": { @@ -5874,7 +6061,7 @@ }, "description": "UnprocessableEntity" }, - "NotFound": { + "RequiresAuthentication": { "content": { "application/json": { "schema": { @@ -5882,7 +6069,7 @@ } } }, - "description": "Resource not found" + "description": "Requires authentication" }, "TooManyRequests": { "content": { @@ -5916,6 +6103,30 @@ } }, "parameters": { + "plugin_team": { + "in": "path", + "name": "plugin_team", + "required": true, + "schema": { + "$ref": "#/components/schemas/TeamName" + } + }, + "plugin_kind": { + "in": "path", + "name": "plugin_kind", + "required": true, + "schema": { + "$ref": "#/components/schemas/PluginKind" + } + }, + "plugin_name": { + "in": "path", + "name": "plugin_name", + "required": true, + "schema": { + "$ref": "#/components/schemas/PluginName" + } + }, "plugin_sort_by": { "description": "The field to sort by", "in": "query", @@ -5964,22 +6175,6 @@ "$ref": "#/components/schemas/TeamName" } }, - "plugin_kind": { - "in": "path", - "name": "plugin_kind", - "required": true, - "schema": { - "$ref": "#/components/schemas/PluginKind" - } - }, - "plugin_name": { - "in": "path", - "name": "plugin_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/PluginName" - } - }, "version_sort_by": { "description": "The field to sort by", "in": "query", @@ -6075,14 +6270,6 @@ }, "x-go-name": "AddonOrderID" }, - "plugin_team": { - "in": "path", - "name": "plugin_team", - "required": true, - "schema": { - "$ref": "#/components/schemas/TeamName" - } - }, "addon_team": { "in": "path", "name": "addon_team", From 0d3dea833f7be08cfa3ca973e829b1e650cddf2b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 27 Dec 2023 17:16:07 +0200 Subject: [PATCH 086/343] fix: Generate CloudQuery Go API Client from `spec.json` (#93) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 19 +++++ spec.json | 92 ++++++++++++++++++++++++ 3 files changed, 306 insertions(+) diff --git a/client.gen.go b/client.gen.go index 1ae90dd..b809063 100644 --- a/client.gen.go +++ b/client.gen.go @@ -219,6 +219,9 @@ type ClientInterface interface { // GetPluginVersionTable request GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthRegistryRequest request + AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeams request ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -935,6 +938,18 @@ func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } +func (c *Client) AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthRegistryRequestRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamsRequest(c.Server, params) if err != nil { @@ -3740,6 +3755,86 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return req, nil } +// NewAuthRegistryRequestRequest generates requests for AuthRegistryRequest +func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/registry/auth") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Account != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "account", runtime.ParamLocationQuery, *params.Account); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Scope != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.XPluginVersion != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Plugin-Version", runtime.ParamLocationHeader, *params.XPluginVersion) + if err != nil { + return nil, err + } + + req.Header.Set("X-Plugin-Version", headerParam0) + } + + } + + return req, nil +} + // NewListTeamsRequest generates requests for ListTeams func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { var err error @@ -6102,6 +6197,9 @@ type ClientWithResponsesInterface interface { // GetPluginVersionTableWithResponse request GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + // AuthRegistryRequestWithResponse request + AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + // ListTeamsWithResponse request ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) @@ -7147,6 +7245,32 @@ func (r GetPluginVersionTableResponse) StatusCode() int { return 0 } +type AuthRegistryRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RegistryAuthToken + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AuthRegistryRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthRegistryRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamsResponse struct { Body []byte HTTPResponse *http.Response @@ -7531,6 +7655,7 @@ type EmailTeamInvitationResponse struct { JSON200 *Invitation JSON400 *BadRequest JSON403 *Forbidden + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -8617,6 +8742,15 @@ func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Cont return ParseGetPluginVersionTableResponse(rsp) } +// AuthRegistryRequestWithResponse request returning *AuthRegistryRequestResponse +func (c *ClientWithResponses) AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) { + rsp, err := c.AuthRegistryRequest(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthRegistryRequestResponse(rsp) +} + // ListTeamsWithResponse request returning *ListTeamsResponse func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { rsp, err := c.ListTeams(ctx, params, reqEditors...) @@ -10892,6 +11026,60 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthRegistryRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RegistryAuthToken + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -11691,6 +11879,13 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index dca01a8..90d7af4 100644 --- a/models.gen.go +++ b/models.gen.go @@ -10,6 +10,7 @@ import ( ) const ( + BasicAuthScopes = "basicAuth.Scopes" BearerAuthScopes = "bearerAuth.Scopes" ) @@ -1010,6 +1011,12 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } +// RegistryAuthToken JWT token for the image registry +type RegistryAuthToken struct { + AccessToken string `json:"access_token"` + Token string `json:"token"` +} + // ReleaseURL defines model for ReleaseURL. type ReleaseURL struct { Url string `json:"url"` @@ -1356,6 +1363,18 @@ type CreatePluginVersionTablesJSONBody struct { Tables []PluginTableCreate `json:"tables"` } +// AuthRegistryRequestParams defines parameters for AuthRegistryRequest. +type AuthRegistryRequestParams struct { + // Account Username used for `docker login` + Account *string `form:"account,omitempty" json:"account,omitempty"` + + // Scope Multi-value string containing the repository being access and the operation type (push/pull) + Scope *string `form:"scope,omitempty" json:"scope,omitempty"` + + // XPluginVersion Plugin version name + XPluginVersion *string `json:"X-Plugin-Version,omitempty"` +} + // ListTeamsParams defines parameters for ListTeams. type ListTeamsParams struct { // PerPage The number of results per page (max 1000). diff --git a/spec.json b/spec.json index 6c02d3e..e7bac33 100644 --- a/spec.json +++ b/spec.json @@ -52,6 +52,9 @@ }, { "name": "addons" + }, + { + "name": "registry" } ], "paths": { @@ -3436,6 +3439,9 @@ "403": { "$ref": "#/components/responses/Forbidden" }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, "500": { "$ref": "#/components/responses/InternalError" } @@ -4095,6 +4101,71 @@ } } } + }, + "/registry/auth": { + "get": { + "description": "Performs authentication and authorization for our image registry.", + "operationId": "AuthRegistryRequest", + "parameters": [ + { + "in": "header", + "name": "X-Plugin-Version", + "schema": { + "type": "string" + }, + "description": "Plugin version name", + "example": "v1.0.0" + }, + { + "in": "query", + "name": "account", + "schema": { + "type": "string" + }, + "description": "Username used for `docker login`" + }, + { + "in": "query", + "name": "scope", + "schema": { + "type": "string" + }, + "description": "Multi-value string containing the repository being access and the operation type (push/pull)" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistryAuthToken" + } + } + }, + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "registry" + ], + "security": [ + { + "basicAuth": [] + } + ] + } } }, "components": { @@ -4102,6 +4173,10 @@ "bearerAuth": { "scheme": "bearer", "type": "http" + }, + "basicAuth": { + "scheme": "basic", + "type": "http" } }, "schemas": { @@ -6008,6 +6083,23 @@ "$ref": "#/components/schemas/APIKeyScope" } } + }, + "RegistryAuthToken": { + "type": "object", + "description": "JWT token for the image registry", + "additionalProperties": false, + "properties": { + "access_token": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "required": [ + "access_token", + "token" + ] } }, "responses": { From e2388ba3f2bf07a96f5a7f4add475365caf2d18c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 28 Dec 2023 12:24:34 +0200 Subject: [PATCH 087/343] fix: Generate CloudQuery Go API Client from `spec.json` (#94) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 187 -------------------------------------------------- models.gen.go | 19 ----- spec.json | 89 ------------------------ 3 files changed, 295 deletions(-) diff --git a/client.gen.go b/client.gen.go index b809063..bf2df16 100644 --- a/client.gen.go +++ b/client.gen.go @@ -219,9 +219,6 @@ type ClientInterface interface { // GetPluginVersionTable request GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) - // AuthRegistryRequest request - AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListTeams request ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -938,18 +935,6 @@ func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } -func (c *Client) AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthRegistryRequestRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamsRequest(c.Server, params) if err != nil { @@ -3755,86 +3740,6 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return req, nil } -// NewAuthRegistryRequestRequest generates requests for AuthRegistryRequest -func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/registry/auth") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Account != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "account", runtime.ParamLocationQuery, *params.Account); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Scope != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.XPluginVersion != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Plugin-Version", runtime.ParamLocationHeader, *params.XPluginVersion) - if err != nil { - return nil, err - } - - req.Header.Set("X-Plugin-Version", headerParam0) - } - - } - - return req, nil -} - // NewListTeamsRequest generates requests for ListTeams func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { var err error @@ -6197,9 +6102,6 @@ type ClientWithResponsesInterface interface { // GetPluginVersionTableWithResponse request GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) - // AuthRegistryRequestWithResponse request - AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) - // ListTeamsWithResponse request ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) @@ -7245,32 +7147,6 @@ func (r GetPluginVersionTableResponse) StatusCode() int { return 0 } -type AuthRegistryRequestResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *RegistryAuthToken - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AuthRegistryRequestResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthRegistryRequestResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type ListTeamsResponse struct { Body []byte HTTPResponse *http.Response @@ -8742,15 +8618,6 @@ func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Cont return ParseGetPluginVersionTableResponse(rsp) } -// AuthRegistryRequestWithResponse request returning *AuthRegistryRequestResponse -func (c *ClientWithResponses) AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) { - rsp, err := c.AuthRegistryRequest(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthRegistryRequestResponse(rsp) -} - // ListTeamsWithResponse request returning *ListTeamsResponse func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { rsp, err := c.ListTeams(ctx, params, reqEditors...) @@ -11026,60 +10893,6 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } -// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call -func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AuthRegistryRequestResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RegistryAuthToken - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 90d7af4..dca01a8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -10,7 +10,6 @@ import ( ) const ( - BasicAuthScopes = "basicAuth.Scopes" BearerAuthScopes = "bearerAuth.Scopes" ) @@ -1011,12 +1010,6 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } -// RegistryAuthToken JWT token for the image registry -type RegistryAuthToken struct { - AccessToken string `json:"access_token"` - Token string `json:"token"` -} - // ReleaseURL defines model for ReleaseURL. type ReleaseURL struct { Url string `json:"url"` @@ -1363,18 +1356,6 @@ type CreatePluginVersionTablesJSONBody struct { Tables []PluginTableCreate `json:"tables"` } -// AuthRegistryRequestParams defines parameters for AuthRegistryRequest. -type AuthRegistryRequestParams struct { - // Account Username used for `docker login` - Account *string `form:"account,omitempty" json:"account,omitempty"` - - // Scope Multi-value string containing the repository being access and the operation type (push/pull) - Scope *string `form:"scope,omitempty" json:"scope,omitempty"` - - // XPluginVersion Plugin version name - XPluginVersion *string `json:"X-Plugin-Version,omitempty"` -} - // ListTeamsParams defines parameters for ListTeams. type ListTeamsParams struct { // PerPage The number of results per page (max 1000). diff --git a/spec.json b/spec.json index e7bac33..dc32aee 100644 --- a/spec.json +++ b/spec.json @@ -52,9 +52,6 @@ }, { "name": "addons" - }, - { - "name": "registry" } ], "paths": { @@ -4101,71 +4098,6 @@ } } } - }, - "/registry/auth": { - "get": { - "description": "Performs authentication and authorization for our image registry.", - "operationId": "AuthRegistryRequest", - "parameters": [ - { - "in": "header", - "name": "X-Plugin-Version", - "schema": { - "type": "string" - }, - "description": "Plugin version name", - "example": "v1.0.0" - }, - { - "in": "query", - "name": "account", - "schema": { - "type": "string" - }, - "description": "Username used for `docker login`" - }, - { - "in": "query", - "name": "scope", - "schema": { - "type": "string" - }, - "description": "Multi-value string containing the repository being access and the operation type (push/pull)" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistryAuthToken" - } - } - }, - "description": "Response" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "registry" - ], - "security": [ - { - "basicAuth": [] - } - ] - } } }, "components": { @@ -4173,10 +4105,6 @@ "bearerAuth": { "scheme": "bearer", "type": "http" - }, - "basicAuth": { - "scheme": "basic", - "type": "http" } }, "schemas": { @@ -6083,23 +6011,6 @@ "$ref": "#/components/schemas/APIKeyScope" } } - }, - "RegistryAuthToken": { - "type": "object", - "description": "JWT token for the image registry", - "additionalProperties": false, - "properties": { - "access_token": { - "type": "string" - }, - "token": { - "type": "string" - } - }, - "required": [ - "access_token", - "token" - ] } }, "responses": { From 0f4d8b5a8dccf977a179eaf9168a2d90fbaed4bb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 29 Dec 2023 13:35:19 +0200 Subject: [PATCH 088/343] fix: Generate CloudQuery Go API Client from `spec.json` (#95) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 1071 +++++++++++++++++++++++++++++++++++++++++++++++-- models.gen.go | 52 +++ spec.json | 464 +++++++++++++++++++-- 3 files changed, 1530 insertions(+), 57 deletions(-) diff --git a/client.gen.go b/client.gen.go index bf2df16..ca3c92b 100644 --- a/client.gen.go +++ b/client.gen.go @@ -163,6 +163,17 @@ type ClientInterface interface { UpdatePlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePluginUpcomingPriceChanges request + DeletePluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListPluginUpcomingPriceChanges request + ListPluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreatePluginUpcomingPriceChangeWithBody request with any body + CreatePluginUpcomingPriceChangeWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePluginUpcomingPriceChange(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginVersions request ListPluginVersions(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -219,6 +230,9 @@ type ClientInterface interface { // GetPluginVersionTable request GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthRegistryRequest request + AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeams request ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -227,6 +241,9 @@ type ClientInterface interface { CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeam request + DeleteTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamByName request GetTeamByName(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -357,6 +374,9 @@ type ClientInterface interface { // GetCurrentUserMemberships request GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteUser request + DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -683,6 +703,54 @@ func (c *Client) UpdatePlugin(ctx context.Context, teamName TeamName, pluginKind return c.Client.Do(req) } +func (c *Client) DeletePluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginUpcomingPriceChangesRequest(c.Server, teamName, pluginKind, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListPluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginUpcomingPriceChangesRequest(c.Server, teamName, pluginKind, pluginName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePluginUpcomingPriceChangeWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginUpcomingPriceChangeRequestWithBody(c.Server, teamName, pluginKind, pluginName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePluginUpcomingPriceChange(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginUpcomingPriceChangeRequest(c.Server, teamName, pluginKind, pluginName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginVersionsRequest(c.Server, teamName, pluginKind, pluginName, params) if err != nil { @@ -935,6 +1003,18 @@ func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } +func (c *Client) AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthRegistryRequestRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamsRequest(c.Server, params) if err != nil { @@ -971,6 +1051,18 @@ func (c *Client) CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, return c.Client.Do(req) } +func (c *Client) DeleteTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetTeamByName(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTeamByNameRequest(c.Server, teamName) if err != nil { @@ -1535,6 +1627,18 @@ func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurre return c.Client.Do(req) } +func (c *Client) DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteUserRequest(c.Server, userID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // NewHealthCheckRequest generates requests for HealthCheck func NewHealthCheckRequest(server string) (*http.Request, error) { var err error @@ -2688,6 +2792,163 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind return req, nil } +// NewDeletePluginUpcomingPriceChangesRequest generates requests for DeletePluginUpcomingPriceChanges +func NewDeletePluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListPluginUpcomingPriceChangesRequest generates requests for ListPluginUpcomingPriceChanges +func NewListPluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreatePluginUpcomingPriceChangeRequest calls the generic CreatePluginUpcomingPriceChange builder with application/json body +func NewCreatePluginUpcomingPriceChangeRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginUpcomingPriceChangeRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) +} + +// NewCreatePluginUpcomingPriceChangeRequestWithBody generates requests for CreatePluginUpcomingPriceChange with any type of body +func NewCreatePluginUpcomingPriceChangeRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListPluginVersionsRequest generates requests for ListPluginVersions func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { var err error @@ -3740,8 +4001,8 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return req, nil } -// NewListTeamsRequest generates requests for ListTeams -func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { +// NewAuthRegistryRequestRequest generates requests for AuthRegistryRequest +func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3749,7 +4010,7 @@ func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, return nil, err } - operationPath := fmt.Sprintf("/teams") + operationPath := fmt.Sprintf("/registry/auth") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3762,9 +4023,9 @@ func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, if params != nil { queryValues := queryURL.Query() - if params.PerPage != nil { + if params.Account != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "account", runtime.ParamLocationQuery, *params.Account); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3778,9 +4039,9 @@ func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, } - if params.Page != nil { + if params.Scope != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3802,22 +4063,26 @@ func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, return nil, err } - return req, nil -} + if params != nil { + + if params.XMetaPluginVersion != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-Plugin-Version", runtime.ParamLocationHeader, *params.XMetaPluginVersion) + if err != nil { + return nil, err + } + + req.Header.Set("X-Meta-Plugin-Version", headerParam0) + } -// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body -func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) + + return req, nil } -// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body -func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewListTeamsRequest generates requests for ListTeams +func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3835,8 +4100,84 @@ func NewCreateTeamRequestWithBody(server string, contentType string, body io.Rea return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body +func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body +func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { return nil, err } @@ -3845,6 +4186,40 @@ func NewCreateTeamRequestWithBody(server string, contentType string, body io.Rea return req, nil } +// NewDeleteTeamRequest generates requests for DeleteTeam +func NewDeleteTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetTeamByNameRequest generates requests for GetTeamByName func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, error) { var err error @@ -5929,6 +6304,40 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return req, nil } +// NewDeleteUserRequest generates requests for DeleteUser +func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { for _, r := range c.RequestEditors { if err := r(ctx, req); err != nil { @@ -6046,6 +6455,17 @@ type ClientWithResponsesInterface interface { UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + // DeletePluginUpcomingPriceChangesWithResponse request + DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) + + // ListPluginUpcomingPriceChangesWithResponse request + ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) + + // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body + CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + + CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + // ListPluginVersionsWithResponse request ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) @@ -6102,6 +6522,9 @@ type ClientWithResponsesInterface interface { // GetPluginVersionTableWithResponse request GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + // AuthRegistryRequestWithResponse request + AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + // ListTeamsWithResponse request ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) @@ -6110,6 +6533,9 @@ type ClientWithResponsesInterface interface { CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + // DeleteTeamWithResponse request + DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) + // GetTeamByNameWithResponse request GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) @@ -6240,6 +6666,9 @@ type ClientWithResponsesInterface interface { // GetCurrentUserMembershipsWithResponse request GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) + + // DeleteUserWithResponse request + DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) } type HealthCheckResponse struct { @@ -6561,6 +6990,7 @@ type CreatePluginNotificationRequestResponse struct { HTTPResponse *http.Response JSON201 *PluginNotificationRequest JSON400 *BadRequest + JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound JSON422 *UnprocessableEntity @@ -6610,10 +7040,13 @@ func (r DeletePluginNotificationRequestResponse) StatusCode() int { type GetPluginNotificationRequestResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PluginNotificationRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -6763,6 +7196,87 @@ func (r UpdatePluginResponse) StatusCode() int { return 0 } +type DeletePluginUpcomingPriceChangesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginUpcomingPriceChangesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginUpcomingPriceChangesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginUpcomingPriceChangesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []PluginPrice `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginUpcomingPriceChangesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginUpcomingPriceChangesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginUpcomingPriceChangeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *PluginPrice + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginUpcomingPriceChangeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginUpcomingPriceChangeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginVersionsResponse struct { Body []byte HTTPResponse *http.Response @@ -7147,6 +7661,32 @@ func (r GetPluginVersionTableResponse) StatusCode() int { return 0 } +type AuthRegistryRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RegistryAuthToken + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AuthRegistryRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthRegistryRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamsResponse struct { Body []byte HTTPResponse *http.Response @@ -7202,19 +7742,19 @@ func (r CreateTeamResponse) StatusCode() int { return 0 } -type GetTeamByNameResponse struct { +type DeleteTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Team JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetTeamByNameResponse) Status() string { +func (r DeleteTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7222,14 +7762,14 @@ func (r GetTeamByNameResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTeamByNameResponse) StatusCode() int { +func (r DeleteTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateTeamResponse struct { +type GetTeamByNameResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Team @@ -7241,7 +7781,34 @@ type UpdateTeamResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateTeamResponse) Status() string { +func (r GetTeamByNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamByNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8200,6 +8767,33 @@ func (r GetCurrentUserMembershipsResponse) StatusCode() int { return 0 } +type DeleteUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + // HealthCheckWithResponse request returning *HealthCheckResponse func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { rsp, err := c.HealthCheck(ctx, reqEditors...) @@ -8436,6 +9030,41 @@ func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, team return ParseUpdatePluginResponse(rsp) } +// DeletePluginUpcomingPriceChangesWithResponse request returning *DeletePluginUpcomingPriceChangesResponse +func (c *ClientWithResponses) DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) { + rsp, err := c.DeletePluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginUpcomingPriceChangesResponse(rsp) +} + +// ListPluginUpcomingPriceChangesWithResponse request returning *ListPluginUpcomingPriceChangesResponse +func (c *ClientWithResponses) ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) { + rsp, err := c.ListPluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginUpcomingPriceChangesResponse(rsp) +} + +// CreatePluginUpcomingPriceChangeWithBodyWithResponse request with arbitrary body returning *CreatePluginUpcomingPriceChangeResponse +func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { + rsp, err := c.CreatePluginUpcomingPriceChangeWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginUpcomingPriceChangeResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { + rsp, err := c.CreatePluginUpcomingPriceChange(ctx, teamName, pluginKind, pluginName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginUpcomingPriceChangeResponse(rsp) +} + // ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { rsp, err := c.ListPluginVersions(ctx, teamName, pluginKind, pluginName, params, reqEditors...) @@ -8618,6 +9247,15 @@ func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Cont return ParseGetPluginVersionTableResponse(rsp) } +// AuthRegistryRequestWithResponse request returning *AuthRegistryRequestResponse +func (c *ClientWithResponses) AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) { + rsp, err := c.AuthRegistryRequest(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthRegistryRequestResponse(rsp) +} + // ListTeamsWithResponse request returning *ListTeamsResponse func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { rsp, err := c.ListTeams(ctx, params, reqEditors...) @@ -8644,6 +9282,15 @@ func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body C return ParseCreateTeamResponse(rsp) } +// DeleteTeamWithResponse request returning *DeleteTeamResponse +func (c *ClientWithResponses) DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) { + rsp, err := c.DeleteTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamResponse(rsp) +} + // GetTeamByNameWithResponse request returning *GetTeamByNameResponse func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) { rsp, err := c.GetTeamByName(ctx, teamName, reqEditors...) @@ -9057,6 +9704,15 @@ func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context. return ParseGetCurrentUserMembershipsResponse(rsp) } +// DeleteUserWithResponse request returning *DeleteUserResponse +func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { + rsp, err := c.DeleteUser(ctx, userID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteUserResponse(rsp) +} + // ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -9708,6 +10364,13 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9796,7 +10459,10 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginNotificationRequest + var dest struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10087,6 +10753,171 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error return response, nil } +// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call +func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginUpcomingPriceChangesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call +func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginUpcomingPriceChangesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []PluginPrice `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call +func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginUpcomingPriceChangeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginPrice + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -10893,6 +11724,60 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthRegistryRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RegistryAuthToken + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -11004,6 +11889,67 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { return response, nil } +// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call +func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -13019,3 +13965,64 @@ func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUser return response, nil } + +// ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call +func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} diff --git a/models.gen.go b/models.gen.go index dca01a8..ebda774 100644 --- a/models.gen.go +++ b/models.gen.go @@ -10,6 +10,7 @@ import ( ) const ( + BasicAuthScopes = "basicAuth.Scopes" BearerAuthScopes = "bearerAuth.Scopes" ) @@ -801,6 +802,33 @@ type PluginNotificationRequestCreate struct { // PluginNotificationRequestStatus Status of a plugin notification request type PluginNotificationRequestStatus string +// PluginPrice CloudQuery Plugin Price +type PluginPrice struct { + // EffectiveFrom The date and time the price came (or will come) into effect. + EffectiveFrom time.Time `json:"effective_from"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + + // Id ID of the price change + ID openapi_types.UUID `json:"id"` + + // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow string `json:"usd_per_row"` +} + +// PluginPriceCreate CloudQuery Plugin Price Create +type PluginPriceCreate struct { + // EffectiveFrom The date and time the price came (or will come) into effect. + EffectiveFrom time.Time `json:"effective_from"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + + // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow string `json:"usd_per_row"` +} + // PluginProtocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). type PluginProtocols = []int @@ -1010,6 +1038,12 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } +// RegistryAuthToken JWT token for the image registry +type RegistryAuthToken struct { + AccessToken string `json:"access_token"` + Token string `json:"token"` +} + // ReleaseURL defines model for ReleaseURL. type ReleaseURL struct { Url string `json:"url"` @@ -1125,6 +1159,9 @@ type User struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +// UserID ID of the User +type UserID = openapi_types.UUID + // UserName The unique name for the user. type UserName = string @@ -1356,6 +1393,18 @@ type CreatePluginVersionTablesJSONBody struct { Tables []PluginTableCreate `json:"tables"` } +// AuthRegistryRequestParams defines parameters for AuthRegistryRequest. +type AuthRegistryRequestParams struct { + // Account Username used for `docker login` + Account *string `form:"account,omitempty" json:"account,omitempty"` + + // Scope Multi-value string containing the repository being access and the operation type (push/pull) + Scope *string `form:"scope,omitempty" json:"scope,omitempty"` + + // XMetaPluginVersion Plugin version name + XMetaPluginVersion *string `json:"X-Meta-Plugin-Version,omitempty"` +} + // ListTeamsParams defines parameters for ListTeams. type ListTeamsParams struct { // PerPage The number of results per page (max 1000). @@ -1565,6 +1614,9 @@ type CreatePluginJSONRequestBody = PluginCreate // UpdatePluginJSONRequestBody defines body for UpdatePlugin for application/json ContentType. type UpdatePluginJSONRequestBody = PluginUpdate +// CreatePluginUpcomingPriceChangeJSONRequestBody defines body for CreatePluginUpcomingPriceChange for application/json ContentType. +type CreatePluginUpcomingPriceChangeJSONRequestBody = PluginPriceCreate + // UpdatePluginVersionJSONRequestBody defines body for UpdatePluginVersion for application/json ContentType. type UpdatePluginVersionJSONRequestBody = PluginVersionUpdate diff --git a/spec.json b/spec.json index dc32aee..ea14045 100644 --- a/spec.json +++ b/spec.json @@ -52,6 +52,9 @@ }, { "name": "addons" + }, + { + "name": "registry" } ], "paths": { @@ -125,6 +128,9 @@ "400": { "$ref": "#/components/responses/BadRequest" }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, "403": { "$ref": "#/components/responses/Forbidden" }, @@ -160,14 +166,28 @@ ], "responses": { "200": { + "description": "Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PluginNotificationRequest" + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginNotificationRequest" + } + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } } } - }, - "description": "Response" + } }, "401": { "$ref": "#/components/responses/RequiresAuthentication" @@ -179,7 +199,6 @@ "$ref": "#/components/responses/InternalError" } }, - "security": [], "tags": [ "plugins" ] @@ -212,7 +231,6 @@ "$ref": "#/components/responses/InternalError" } }, - "security": [], "tags": [ "plugins" ] @@ -469,6 +487,154 @@ ] } }, + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/upcoming-price-changes": { + "get": { + "description": "List upcoming price changes for a given plugin. If the plugin has no upcoming price changes, an empty list is returned. At most one upcoming price change is returned.", + "operationId": "ListPluginUpcomingPriceChanges", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/PluginPrice" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "security": [], + "tags": [ + "plugins" + ] + }, + "post": { + "description": "Create an upcoming plugin price change. If the plugin has no upcoming price change, a new one is created. If the plugin already has an upcoming price change, this call will fail. (Delete pending price changes with the appropriate delete call.) The effective date of the price change must be at least 8 days in the future.", + "operationId": "CreatePluginUpcomingPriceChange", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginPriceCreate" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginPrice" + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "plugins" + ] + }, + "delete": { + "description": "Delete all pending plugin price changes.", + "operationId": "DeletePluginUpcomingPriceChanges", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/plugin_kind" + }, + { + "$ref": "#/components/parameters/plugin_name" + } + ], + "responses": { + "204": { + "description": "Deleted" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "plugins" + ] + } + }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions": { "get": { "description": "List all versions for a given plugin", @@ -2263,6 +2429,42 @@ "tags": [ "teams" ] + }, + "delete": { + "description": "Delete team", + "operationId": "DeleteTeam", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "x-internal": true, + "responses": { + "204": { + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] } }, "/teams/{team_name}/plugins": { @@ -3952,6 +4154,44 @@ ] } }, + "/users/{user_id}": { + "delete": { + "description": "Delete user", + "operationId": "DeleteUser", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "x-internal": true, + "responses": { + "204": { + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "users" + ] + } + }, "/teams/{team_name}/apikeys": { "get": { "description": "List all team API Keys", @@ -4098,6 +4338,71 @@ } } } + }, + "/registry/auth": { + "get": { + "description": "Performs authentication and authorization for our image registry.", + "operationId": "AuthRegistryRequest", + "parameters": [ + { + "in": "header", + "name": "X-Meta-Plugin-Version", + "schema": { + "type": "string" + }, + "description": "Plugin version name", + "example": "v1.0.0" + }, + { + "in": "query", + "name": "account", + "schema": { + "type": "string" + }, + "description": "Username used for `docker login`" + }, + { + "in": "query", + "name": "scope", + "schema": { + "type": "string" + }, + "description": "Multi-value string containing the repository being access and the operation type (push/pull)" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistryAuthToken" + } + } + }, + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "registry" + ], + "security": [ + { + "basicAuth": [] + } + ] + } } }, "components": { @@ -4105,6 +4410,10 @@ "bearerAuth": { "scheme": "bearer", "type": "http" + }, + "basicAuth": { + "scheme": "basic", + "type": "http" } }, "schemas": { @@ -4254,6 +4563,16 @@ } ] }, + "ListMetadata": { + "properties": { + "total_count": { + "type": "integer" + }, + "last_page": { + "type": "integer" + } + } + }, "PluginCategory": { "description": "Supported categories for plugins", "type": "string", @@ -4402,16 +4721,6 @@ } ] }, - "ListMetadata": { - "properties": { - "total_count": { - "type": "integer" - }, - "last_page": { - "type": "integer" - } - } - }, "PluginCreate": { "type": "object", "required": [ @@ -4549,6 +4858,78 @@ } } }, + "PluginPrice": { + "additionalProperties": false, + "description": "CloudQuery Plugin Price", + "properties": { + "id": { + "description": "ID of the price change", + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "x-go-name": "ID" + }, + "usd_per_row": { + "type": "string", + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price per row in USD. This is used to calculate the price of a sync.", + "example": "0.0001", + "x-go-name": "USDPerRow" + }, + "free_rows_per_month": { + "type": "integer", + "format": "int64", + "description": "The number of rows that can be synced for free each month.", + "example": 1000 + }, + "effective_from": { + "type": "string", + "format": "date-time", + "description": "The date and time the price came (or will come) into effect.", + "example": "2024-01-02T00:00:00Z" + } + }, + "required": [ + "id", + "usd_per_row", + "free_rows_per_month", + "effective_from" + ], + "title": "CloudQuery Plugin Price", + "type": "object" + }, + "PluginPriceCreate": { + "additionalProperties": false, + "description": "CloudQuery Plugin Price Create", + "properties": { + "usd_per_row": { + "type": "string", + "pattern": "^\\d+(?:\\.\\d{1,10})?$", + "description": "The price per row in USD. This is used to calculate the price of a sync.", + "example": "0.0001", + "x-go-name": "USDPerRow" + }, + "free_rows_per_month": { + "type": "integer", + "format": "int64", + "description": "The number of rows that can be synced for free each month.", + "example": 1000 + }, + "effective_from": { + "type": "string", + "format": "date-time", + "description": "The date and time the price came (or will come) into effect.", + "example": "2024-01-02T00:00:00Z" + } + }, + "required": [ + "usd_per_row", + "free_rows_per_month", + "effective_from" + ], + "title": "CloudQuery Plugin Price Create", + "type": "object" + }, "PluginProtocols": { "description": "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", "type": "array", @@ -5943,6 +6324,13 @@ } ] }, + "UserID": { + "description": "ID of the User", + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "x-go-name": "UserID" + }, "APIKeyName": { "description": "Name of the API key", "type": "string", @@ -6011,6 +6399,23 @@ "$ref": "#/components/schemas/APIKeyScope" } } + }, + "RegistryAuthToken": { + "type": "object", + "description": "JWT token for the image registry", + "additionalProperties": false, + "properties": { + "access_token": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "required": [ + "access_token", + "token" + ] } }, "responses": { @@ -6034,6 +6439,16 @@ }, "description": "Bad request" }, + "RequiresAuthentication": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicError" + } + } + }, + "description": "Requires authentication" + }, "Forbidden": { "content": { "application/json": { @@ -6064,16 +6479,6 @@ }, "description": "UnprocessableEntity" }, - "RequiresAuthentication": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } - } - }, - "description": "Requires authentication" - }, "TooManyRequests": { "content": { "application/json": { @@ -6298,6 +6703,15 @@ }, "x-go-name": "TeamSubscriptionOrderID" }, + "user_id": { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/UserID" + }, + "x-go-name": "UserID" + }, "apikey_id": { "name": "apikey_id", "in": "path", From 9a1990ca787a1cbeac65676967dd746352640be3 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Jan 2024 13:40:08 +0200 Subject: [PATCH 089/343] fix: Generate CloudQuery Go API Client from `spec.json` (#96) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 3851 +++++++++++++++++++++++++++++++++++-------------- models.gen.go | 130 +- spec.json | 955 +++++++++--- 3 files changed, 3682 insertions(+), 1254 deletions(-) diff --git a/client.gen.go b/client.gen.go index ca3c92b..d3f44d7 100644 --- a/client.gen.go +++ b/client.gen.go @@ -133,6 +133,9 @@ type ClientInterface interface { // UploadAddonAsset request UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginNotificationRequests request + ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreatePluginNotificationRequestWithBody request with any body CreatePluginNotificationRequestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -344,6 +347,39 @@ type ClientInterface interface { // GetSubscriptionOrderByTeam request GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncs request + ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSyncWithBody request with any body + CreateSyncWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSync request + DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSync request + GetSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSyncWithBody request with any body + UpdateSyncWithBody(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSync(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListSyncRuns request + ListSyncRuns(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSyncRun request + CreateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSyncRun request + GetSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSyncRunWithBody request with any body + UpdateSyncRunWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamPluginUsage request ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -571,6 +607,18 @@ func (c *Client) UploadAddonAsset(ctx context.Context, teamName TeamName, addonT return c.Client.Do(req) } +func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginNotificationRequestsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreatePluginNotificationRequestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreatePluginNotificationRequestRequestWithBody(c.Server, contentType, body) if err != nil { @@ -1495,6 +1543,150 @@ func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamNa return c.Client.Do(req) } +func (c *Client) ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSyncsRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSyncRequest(c.Server, teamName, syncName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncRequest(c.Server, teamName, syncName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncWithBody(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncRequestWithBody(c.Server, teamName, syncName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSync(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncRequest(c.Server, teamName, syncName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListSyncRuns(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSyncRunsRequest(c.Server, teamName, syncName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncRunRequest(c.Server, teamName, syncName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncRunRequest(c.Server, teamName, syncName, syncRunId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncRunWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncRunRequestWithBody(c.Server, teamName, syncName, syncRunId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncRunRequest(c.Server, teamName, syncName, syncRunId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) if err != nil { @@ -2378,6 +2570,71 @@ func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType Addo return req, nil } +// NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests +func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugin-notification-requests") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewCreatePluginNotificationRequestRequest calls the generic CreatePluginNotificationRequest builder with application/json body func NewCreatePluginNotificationRequestRequest(server string, body CreatePluginNotificationRequestJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -5834,8 +6091,8 @@ func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, team return req, nil } -// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage -func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { +// NewListSyncsRequest generates requests for ListSyncs +func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { var err error var pathParam0 string @@ -5850,7 +6107,7 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5863,9 +6120,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5879,9 +6136,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis } - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5906,19 +6163,19 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body -func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { +// NewCreateSyncRequest calls the generic CreateSync builder with application/json body +func NewCreateSyncRequest(server string, teamName TeamName, body CreateSyncJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateSyncRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body -func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSyncRequestWithBody generates requests for CreateSync with any type of body +func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5933,7 +6190,7 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5953,8 +6210,8 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return req, nil } -// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage -func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewDeleteSyncRequest generates requests for DeleteSync +func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -5966,21 +6223,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } @@ -5990,7 +6233,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6000,7 +6243,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -6008,8 +6251,8 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return req, nil } -// NewListUsersByTeamRequest generates requests for ListUsersByTeam -func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { +// NewGetSyncRequest generates requests for GetSync +func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -6019,12 +6262,19 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6034,10 +6284,105 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body +func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) +} + +// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body +func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListSyncRunsRequest generates requests for ListSyncRuns +func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err @@ -6080,16 +6425,30 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return req, nil } -// NewUploadImageRequest generates requests for UploadImage -func NewUploadImageRequest(server string) (*http.Request, error) { +// NewCreateSyncRunRequest generates requests for CreateSyncRun +func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/upload/image") + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6107,16 +6466,37 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return req, nil } -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { +// NewGetSyncRunRequest generates requests for GetSyncRun +func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6134,27 +6514,48 @@ func NewGetCurrentUserRequest(server string) (*http.Request, error) { return req, nil } -// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body -func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body +func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) + return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) } -// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body -func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body +func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6174,16 +6575,23 @@ func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body return req, nil } -// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations -func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/invitations") + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6239,16 +6647,34 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser return req, nil } -// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships -func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/memberships") + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6258,59 +6684,44 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - if params.PerPage != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage +func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error - } + var pathParam0 string - queryURL.RawQuery = queryValues.Encode() + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } - return req, nil -} + var pathParam2 string -// NewDeleteUserRequest generates requests for DeleteUser -func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { - var err error + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } - var pathParam0 string + var pathParam3 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -6320,7 +6731,7 @@ func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/users/%s", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6330,7 +6741,7 @@ func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -6338,295 +6749,628 @@ func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} +// NewListUsersByTeamRequest generates requests for ListUsersByTeam +func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { + var err error -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} + var pathParam0 string -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // HealthCheckWithResponse request - HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - - // ListAddonsWithResponse request - ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) - // CreateAddonWithBodyWithResponse request with any body - CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - - CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - - // DeleteAddonByTeamAndNameWithResponse request - DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) + operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // GetAddonWithResponse request - GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // UpdateAddonWithBodyWithResponse request with any body - UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + if params != nil { + queryValues := queryURL.Query() - UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + if params.PerPage != nil { - // ListAddonVersionsWithResponse request - ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // GetAddonVersionWithResponse request - GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) + } - // UpdateAddonVersionWithBodyWithResponse request with any body - UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + if params.Page != nil { - UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // CreateAddonVersionWithBodyWithResponse request with any body - CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + } - CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // DownloadAddonAssetWithResponse request - DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // UploadAddonAssetWithResponse request - UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + return req, nil +} - // CreatePluginNotificationRequestWithBodyWithResponse request with any body - CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) +// NewUploadImageRequest generates requests for UploadImage +func NewUploadImageRequest(server string) (*http.Request, error) { + var err error - CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // DeletePluginNotificationRequestWithResponse request - DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) + operationPath := fmt.Sprintf("/upload/image") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // GetPluginNotificationRequestWithResponse request - GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ListPluginsWithResponse request - ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CreatePluginWithBodyWithResponse request with any body - CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + return req, nil +} - CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error - // DeletePluginByTeamAndPluginNameWithResponse request - DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // GetPluginWithResponse request - GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // UpdatePluginWithBodyWithResponse request with any body - UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // DeletePluginUpcomingPriceChangesWithResponse request - DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) + return req, nil +} - // ListPluginUpcomingPriceChangesWithResponse request - ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) +} - // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body - CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ListPluginVersionsWithResponse request - ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // GetPluginVersionWithResponse request - GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // UpdatePluginVersionWithBodyWithResponse request with any body - UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + req.Header.Add("Content-Type", contentType) - // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + return req, nil +} - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) +// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations +func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { + var err error - // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // UploadPluginAssetWithResponse request - UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + operationPath := fmt.Sprintf("/user/invitations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // DeletePluginVersionDocsWithBodyWithResponse request with any body - DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + if params != nil { + queryValues := queryURL.Query() - // ListPluginVersionDocsWithResponse request - ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + if params.Page != nil { - // ReplacePluginVersionDocsWithBodyWithResponse request with any body - ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + } - // CreatePluginVersionDocsWithBodyWithResponse request with any body - CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + if params.PerPage != nil { - CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // DeletePluginVersionTablesWithBodyWithResponse request with any body - DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + } - DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // ListPluginVersionTablesWithResponse request - ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CreatePluginVersionTablesWithBodyWithResponse request with any body - CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + return req, nil +} - CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) +// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships +func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { + var err error - // GetPluginVersionTableWithResponse request - GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // AuthRegistryRequestWithResponse request - AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + operationPath := fmt.Sprintf("/user/memberships") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListTeamsWithResponse request - ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreateTeamWithBodyWithResponse request with any body - CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + if params != nil { + queryValues := queryURL.Query() - CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + if params.Page != nil { - // DeleteTeamWithResponse request - DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // GetTeamByNameWithResponse request - GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + } - // UpdateTeamWithBodyWithResponse request with any body - UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + if params.PerPage != nil { - UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ListAddonOrdersByTeamWithResponse request - ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + } - // CreateAddonOrderForTeamWithBodyWithResponse request with any body - CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // GetAddonOrderByTeamWithResponse request - GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + return req, nil +} - // DeleteAddonsByTeamWithResponse request - DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) +// NewDeleteUserRequest generates requests for DeleteUser +func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { + var err error - // ListAddonsByTeamWithResponse request - ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + var pathParam0 string - // DownloadAddonAssetByTeamWithResponse request - DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } - // ListTeamAPIKeysWithResponse request - ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CreateTeamAPIKeyWithBodyWithResponse request with any body - CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + operationPath := fmt.Sprintf("/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - // ListTeamInvitationsWithResponse request - ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + return req, nil +} - // EmailTeamInvitationWithBodyWithResponse request with any body - EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} - EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} - // AcceptTeamInvitationWithBodyWithResponse request with any body - AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} - AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} - // CancelTeamInvitationWithResponse request - CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // HealthCheckWithResponse request + HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - // ListInvoicesByTeamWithResponse request - ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + // ListAddonsWithResponse request + ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) - // GetTeamMembershipsWithResponse request - GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + // CreateAddonWithBodyWithResponse request with any body + CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - // ListMonthlyLimitsByTeamWithResponse request - ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) + CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - // CreateMonthlyLimitWithBodyWithResponse request with any body - CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + // DeleteAddonByTeamAndNameWithResponse request + DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) - CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + // GetAddonWithResponse request + GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) - // DeleteMonthlyLimitWithResponse request - DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) + // UpdateAddonWithBodyWithResponse request with any body + UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - // GetMonthlyLimitWithResponse request - GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) + UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - // UpdateMonthlyLimitWithBodyWithResponse request with any body - UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + // ListAddonVersionsWithResponse request + ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) - UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + // GetAddonVersionWithResponse request + GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) - // DeletePluginsByTeamWithResponse request - DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + // UpdateAddonVersionWithBodyWithResponse request with any body + UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - // ListPluginsByTeamWithResponse request - ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - // DownloadPluginAssetByTeamWithResponse request - DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + // CreateAddonVersionWithBodyWithResponse request with any body + CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - // ListSubscriptionOrdersByTeamWithResponse request - ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) + CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + + // DownloadAddonAssetWithResponse request + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + + // UploadAddonAssetWithResponse request + UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + + // ListPluginNotificationRequestsWithResponse request + ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) + + // CreatePluginNotificationRequestWithBodyWithResponse request with any body + CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + + CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + + // DeletePluginNotificationRequestWithResponse request + DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) + + // GetPluginNotificationRequestWithResponse request + GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) + + // ListPluginsWithResponse request + ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + + // CreatePluginWithBodyWithResponse request with any body + CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + // DeletePluginByTeamAndPluginNameWithResponse request + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + + // GetPluginWithResponse request + GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + + // UpdatePluginWithBodyWithResponse request with any body + UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + // DeletePluginUpcomingPriceChangesWithResponse request + DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) + + // ListPluginUpcomingPriceChangesWithResponse request + ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) + + // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body + CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + + CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + + // ListPluginVersionsWithResponse request + ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + + // GetPluginVersionWithResponse request + GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + + // UpdatePluginVersionWithBodyWithResponse request with any body + UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + // CreatePluginVersionWithBodyWithResponse request with any body + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + // DownloadPluginAssetWithResponse request + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + + // UploadPluginAssetWithResponse request + UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + + // DeletePluginVersionDocsWithBodyWithResponse request with any body + DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + // ListPluginVersionDocsWithResponse request + ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + + // ReplacePluginVersionDocsWithBodyWithResponse request with any body + ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + + ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + + // CreatePluginVersionDocsWithBodyWithResponse request with any body + CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + // DeletePluginVersionTablesWithBodyWithResponse request with any body + DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + // ListPluginVersionTablesWithResponse request + ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + + // CreatePluginVersionTablesWithBodyWithResponse request with any body + CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + // GetPluginVersionTableWithResponse request + GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + + // AuthRegistryRequestWithResponse request + AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + + // ListTeamsWithResponse request + ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + + // CreateTeamWithBodyWithResponse request with any body + CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + // DeleteTeamWithResponse request + DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) + + // GetTeamByNameWithResponse request + GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + + // UpdateTeamWithBodyWithResponse request with any body + UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + // ListAddonOrdersByTeamWithResponse request + ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + + // CreateAddonOrderForTeamWithBodyWithResponse request with any body + CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + // GetAddonOrderByTeamWithResponse request + GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + + // DeleteAddonsByTeamWithResponse request + DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) + + // ListAddonsByTeamWithResponse request + ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + + // DownloadAddonAssetByTeamWithResponse request + DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + + // ListTeamAPIKeysWithResponse request + ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + + // CreateTeamAPIKeyWithBodyWithResponse request with any body + CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + // DeleteTeamAPIKeyWithResponse request + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + + // ListTeamInvitationsWithResponse request + ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + + // EmailTeamInvitationWithBodyWithResponse request with any body + EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + // AcceptTeamInvitationWithBodyWithResponse request with any body + AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + // CancelTeamInvitationWithResponse request + CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + + // ListInvoicesByTeamWithResponse request + ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + + // GetTeamMembershipsWithResponse request + GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + + // ListMonthlyLimitsByTeamWithResponse request + ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) + + // CreateMonthlyLimitWithBodyWithResponse request with any body + CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + // DeleteMonthlyLimitWithResponse request + DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) + + // GetMonthlyLimitWithResponse request + GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) + + // UpdateMonthlyLimitWithBodyWithResponse request with any body + UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + + UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + + // ListPluginsByTeamWithResponse request + ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + + // DownloadPluginAssetByTeamWithResponse request + DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + + // ListSubscriptionOrdersByTeamWithResponse request + ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) @@ -6636,6 +7380,39 @@ type ClientWithResponsesInterface interface { // GetSubscriptionOrderByTeamWithResponse request GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + // ListSyncsWithResponse request + ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) + + // CreateSyncWithBodyWithResponse request with any body + CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + + CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + + // DeleteSyncWithResponse request + DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) + + // GetSyncWithResponse request + GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) + + // UpdateSyncWithBodyWithResponse request with any body + UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + + UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + + // ListSyncRunsWithResponse request + ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) + + // CreateSyncRunWithResponse request + CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) + + // GetSyncRunWithResponse request + GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) + + // UpdateSyncRunWithBodyWithResponse request with any body + UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + + UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + // ListTeamPluginUsageWithResponse request ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) @@ -6985,6 +7762,33 @@ func (r UploadAddonAssetResponse) StatusCode() int { return 0 } +type ListPluginNotificationRequestsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginNotificationRequestsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginNotificationRequestsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CreatePluginNotificationRequestResponse struct { Body []byte HTTPResponse *http.Response @@ -8526,21 +9330,20 @@ func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { return 0 } -type ListTeamPluginUsageResponse struct { +type ListSyncsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []UsageCurrent `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []Sync `json:"items"` + Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListTeamPluginUsageResponse) Status() string { +func (r ListSyncsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8548,18 +9351,257 @@ func (r ListTeamPluginUsageResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTeamPluginUsageResponse) StatusCode() int { +func (r ListSyncsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type IncreaseTeamPluginUsageResponse struct { +type CreateSyncResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *Sync + JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteSyncResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteSyncResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSyncResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Sync + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Sync + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSyncRunsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []SyncRun `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSyncRunsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSyncRunsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSyncRunResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncRun + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncRunResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncRunResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncRunResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncRun + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncRunResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncRunResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncRunResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncRun + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncRunResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncRunResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []UsageCurrent `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncreaseTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError @@ -8934,6 +9976,15 @@ func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, return ParseUploadAddonAssetResponse(rsp) } +// ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse +func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { + rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginNotificationRequestsResponse(rsp) +} + // CreatePluginNotificationRequestWithBodyWithResponse request with arbitrary body returning *CreatePluginNotificationRequestResponse func (c *ClientWithResponses) CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { rsp, err := c.CreatePluginNotificationRequestWithBody(ctx, contentType, body, reqEditors...) @@ -9607,101 +10658,206 @@ func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context return ParseGetSubscriptionOrderByTeamResponse(rsp) } -// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse -func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { - rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) +// ListSyncsWithResponse request returning *ListSyncsResponse +func (c *ClientWithResponses) ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) { + rsp, err := c.ListSyncs(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseListTeamPluginUsageResponse(rsp) + return ParseListSyncsResponse(rsp) } -// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) +// CreateSyncWithBodyWithResponse request with arbitrary body returning *CreateSyncResponse +func (c *ClientWithResponses) CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { + rsp, err := c.CreateSyncWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseIncreaseTeamPluginUsageResponse(rsp) + return ParseCreateSyncResponse(rsp) } -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) +func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { + rsp, err := c.CreateSync(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseIncreaseTeamPluginUsageResponse(rsp) + return ParseCreateSyncResponse(rsp) } -// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse -func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { - rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) +// DeleteSyncWithResponse request returning *DeleteSyncResponse +func (c *ClientWithResponses) DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) { + rsp, err := c.DeleteSync(ctx, teamName, syncName, reqEditors...) if err != nil { return nil, err } - return ParseGetTeamPluginUsageResponse(rsp) + return ParseDeleteSyncResponse(rsp) } -// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse -func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { - rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) +// GetSyncWithResponse request returning *GetSyncResponse +func (c *ClientWithResponses) GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) { + rsp, err := c.GetSync(ctx, teamName, syncName, reqEditors...) if err != nil { return nil, err } - return ParseListUsersByTeamResponse(rsp) + return ParseGetSyncResponse(rsp) } -// UploadImageWithResponse request returning *UploadImageResponse -func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { - rsp, err := c.UploadImage(ctx, reqEditors...) +// UpdateSyncWithBodyWithResponse request with arbitrary body returning *UpdateSyncResponse +func (c *ClientWithResponses) UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { + rsp, err := c.UpdateSyncWithBody(ctx, teamName, syncName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUploadImageResponse(rsp) + return ParseUpdateSyncResponse(rsp) } -// GetCurrentUserWithResponse request returning *GetCurrentUserResponse -func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { - rsp, err := c.GetCurrentUser(ctx, reqEditors...) +func (c *ClientWithResponses) UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { + rsp, err := c.UpdateSync(ctx, teamName, syncName, body, reqEditors...) if err != nil { return nil, err } - return ParseGetCurrentUserResponse(rsp) + return ParseUpdateSyncResponse(rsp) } -// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse -func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) +// ListSyncRunsWithResponse request returning *ListSyncRunsResponse +func (c *ClientWithResponses) ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) { + rsp, err := c.ListSyncRuns(ctx, teamName, syncName, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdateCurrentUserResponse(rsp) + return ParseListSyncRunsResponse(rsp) } -func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) +// CreateSyncRunWithResponse request returning *CreateSyncRunResponse +func (c *ClientWithResponses) CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) { + rsp, err := c.CreateSyncRun(ctx, teamName, syncName, reqEditors...) if err != nil { return nil, err } - return ParseUpdateCurrentUserResponse(rsp) + return ParseCreateSyncRunResponse(rsp) } -// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse -func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { - rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) +// GetSyncRunWithResponse request returning *GetSyncRunResponse +func (c *ClientWithResponses) GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) { + rsp, err := c.GetSyncRun(ctx, teamName, syncName, syncRunId, reqEditors...) if err != nil { return nil, err } - return ParseListCurrentUserInvitationsResponse(rsp) + return ParseGetSyncRunResponse(rsp) } -// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse -func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { - rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) +// UpdateSyncRunWithBodyWithResponse request with arbitrary body returning *UpdateSyncRunResponse +func (c *ClientWithResponses) UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) { + rsp, err := c.UpdateSyncRunWithBody(ctx, teamName, syncName, syncRunId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetCurrentUserMembershipsResponse(rsp) + return ParseUpdateSyncRunResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) { + rsp, err := c.UpdateSyncRun(ctx, teamName, syncName, syncRunId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncRunResponse(rsp) +} + +// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse +func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { + rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamPluginUsageResponse(rsp) +} + +// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse +func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { + rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamPluginUsageResponse(rsp) +} + +// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse +func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { + rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListUsersByTeamResponse(rsp) +} + +// UploadImageWithResponse request returning *UploadImageResponse +func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImage(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadImageResponse(rsp) +} + +// GetCurrentUserWithResponse request returning *GetCurrentUserResponse +func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { + rsp, err := c.GetCurrentUser(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserResponse(rsp) +} + +// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse +func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + +// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse +func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { + rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCurrentUserInvitationsResponse(rsp) +} + +// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse +func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { + rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserMembershipsResponse(rsp) } // DeleteUserWithResponse request returning *DeleteUserResponse @@ -9721,38 +10877,480 @@ func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) return nil, err } - response := &HealthCheckResponse{ - Body: bodyBytes, - HTTPResponse: rsp, + response := &HealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call +func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []ListAddon `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call +func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call +func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAddonByTeamAndNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call +func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call +func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call +func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []AddonVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call +func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call +func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } return response, nil } -// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call -func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { +// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call +func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsResponse{ + response := &CreateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []ListAddon `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9760,6 +11358,20 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9772,33 +11384,33 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { return response, nil } -// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call -func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { +// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call +func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonResponse{ + response := &DownloadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Addon + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -9807,12 +11419,19 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -9826,26 +11445,26 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) return response, nil } -// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call -func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { +// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call +func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonByTeamAndNameResponse{ + response := &UploadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -9861,13 +11480,6 @@ func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTe } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9880,22 +11492,25 @@ func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTe return response, nil } -// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call -func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { +// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call +func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonResponse{ + response := &ListPluginNotificationRequestsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon + var dest struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -9908,13 +11523,6 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9927,26 +11535,26 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { return response, nil } -// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call -func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { +// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call +func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAddonResponse{ + response := &CreatePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginNotificationRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -9955,6 +11563,13 @@ func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9988,15 +11603,55 @@ func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) return response, nil } -// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call -func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { +// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call +func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonVersionsResponse{ + response := &DeletePluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call +func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10004,8 +11659,8 @@ func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsRespo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []AddonVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10019,13 +11674,6 @@ func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsRespo } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10045,22 +11693,25 @@ func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsRespo return response, nil } -// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call -func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { +// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call +func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonVersionResponse{ + response := &ListPluginsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion + var dest struct { + Items []ListPlugin `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10073,6 +11724,46 @@ func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call +func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Plugin + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10080,12 +11771,12 @@ func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -10099,27 +11790,20 @@ func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, return response, nil } -// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call -func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { +// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call +func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAddonVersionResponse{ + response := &DeletePluginByTeamAndPluginNameResponse{ Body: bodyBytes, HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + } + switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10160,41 +11844,27 @@ func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionRes return response, nil } -// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call -func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { +// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call +func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonVersionResponse{ + response := &GetPluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10202,13 +11872,6 @@ func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10228,33 +11891,33 @@ func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionRes return response, nil } -// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call -func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { +// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call +func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetResponse{ + response := &UpdatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -10270,12 +11933,12 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -10289,27 +11952,20 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes return response, nil } -// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call -func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { +// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call +func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadAddonAssetResponse{ + response := &DeletePluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10324,6 +11980,13 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10336,33 +11999,29 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons return response, nil } -// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call -func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { +// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call +func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginNotificationRequestResponse{ + response := &ListPluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginNotificationRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []PluginPrice `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -10385,13 +12044,6 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10404,20 +12056,27 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call -func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { +// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call +func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginNotificationRequestResponse{ + response := &CreatePluginUpcomingPriceChangeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginPrice + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10425,6 +12084,13 @@ func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePl } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10432,6 +12098,13 @@ func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePl } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10444,15 +12117,15 @@ func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePl return response, nil } -// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call -func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { +// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call +func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginNotificationRequestResponse{ + response := &ListPluginVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10460,8 +12133,8 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []PluginNotificationRequest `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []PluginVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10475,6 +12148,13 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10494,25 +12174,22 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo return response, nil } -// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call -func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { +// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call +func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsResponse{ + response := &GetPluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []ListPlugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10525,6 +12202,20 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10537,26 +12228,26 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) return response, nil } -// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call -func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { +// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call +func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginResponse{ + response := &UpdatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Plugin + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -10565,19 +12256,19 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -10591,20 +12282,34 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error return response, nil } -// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call -func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { +// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call +func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginByTeamAndPluginNameResponse{ + response := &CreatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10626,13 +12331,6 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10645,22 +12343,22 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl return response, nil } -// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call -func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { +// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call +func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginResponse{ + response := &DownloadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10680,6 +12378,13 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10692,54 +12397,40 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { return response, nil } -// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call -func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { +// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call +func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginResponse{ + response := &UploadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -10753,20 +12444,27 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error return response, nil } -// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call -func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { +// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call +func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginUpcomingPriceChangesResponse{ + response := &DeletePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10788,6 +12486,13 @@ func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeleteP } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10800,15 +12505,15 @@ func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeleteP return response, nil } -// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call -func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { +// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call +func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginUpcomingPriceChangesResponse{ + response := &ListPluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10816,8 +12521,8 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []PluginPrice `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []PluginDocsPage `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -10831,13 +12536,6 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10857,27 +12555,36 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi return response, nil } -// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call -func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { +// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call +func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginUpcomingPriceChangeResponse{ + response := &ReplacePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginPrice + var dest struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10918,29 +12625,35 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call -func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { +// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call +func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionsResponse{ + response := &CreatePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: var dest struct { - Items []PluginVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` + Names *[]PluginDocsPageName `json:"names,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -10963,6 +12676,13 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10975,26 +12695,26 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes return response, nil } -// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call -func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { +// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call +func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionResponse{ + response := &DeletePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11017,6 +12737,13 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11029,33 +12756,29 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons return response, nil } -// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call -func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { +// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call +func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginVersionResponse{ + response := &ListPluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + var dest struct { + Items []PluginTable `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11083,29 +12806,24 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR return response, nil } -// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call -func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { +// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call +func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionResponse{ + response := &CreatePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginVersion + var dest struct { + Names *[]PluginTableName `json:"names,omitempty"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11132,6 +12850,20 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11144,22 +12876,22 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR return response, nil } -// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call -func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { +// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call +func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetResponse{ + response := &GetPluginVersionTableResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + var dest PluginTableDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11179,13 +12911,6 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11198,26 +12923,33 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR return response, nil } -// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call -func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadPluginAssetResponse{ + response := &AuthRegistryRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RegistryAuthToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11226,12 +12958,12 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11245,26 +12977,29 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo return response, nil } -// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call -func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { +// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call +func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionDocsResponse{ + response := &ListTeamsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []Team `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11287,13 +13022,6 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11306,29 +13034,33 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers return response, nil } -// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call -func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { +// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call +func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionDocsResponse{ + response := &CreateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginDocsPage `json:"items"` - Metadata ListMetadata `json:"metadata"` + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11337,12 +13069,12 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11356,29 +13088,20 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD return response, nil } -// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call -func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { +// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call +func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ReplacePluginVersionDocsResponse{ + response := &DeleteTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11426,28 +13149,26 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe return response, nil } -// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call -func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { +// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call +func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionDocsResponse{ + response := &GetTeamByNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -11477,13 +13198,6 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11496,20 +13210,27 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers return response, nil } -// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call -func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionTablesResponse{ + response := &UpdateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11538,13 +13259,6 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11557,15 +13271,15 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe return response, nil } -// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call -func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { +// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call +func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionTablesResponse{ + response := &ListAddonOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11573,8 +13287,8 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []PluginTable `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []AddonOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -11588,6 +13302,13 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11607,24 +13328,22 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio return response, nil } -// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call -func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { +// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call +func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionTablesResponse{ + response := &CreateAddonOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginTableName `json:"names,omitempty"` - } + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11644,13 +13363,6 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11658,13 +13370,6 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11677,22 +13382,22 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe return response, nil } -// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call -func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { +// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call +func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionTableResponse{ + response := &GetAddonOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginTableDetails + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11705,6 +13410,13 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11724,27 +13436,20 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } -// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call -func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { +// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call +func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthRegistryRequestResponse{ + response := &DeleteAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RegistryAuthToken - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11759,12 +13464,19 @@ func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11778,15 +13490,15 @@ func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestR return response, nil } -// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call -func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { +// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call +func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamsResponse{ + response := &ListAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11794,7 +13506,7 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Team `json:"items"` + Items []Addon `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11835,47 +13547,54 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { return response, nil } -// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call -func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { +// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call +func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamResponse{ + response := &DownloadAddonAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Team + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11889,26 +13608,29 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { return response, nil } -// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call -func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamResponse{ + response := &ListTeamAPIKeysResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []APIKey `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11917,13 +13639,6 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11931,13 +13646,6 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11950,26 +13658,26 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { return response, nil } -// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call -func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamByNameResponse{ + response := &CreateTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest APIKey if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -11985,19 +13693,12 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12011,27 +13712,20 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } -// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call -func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateTeamResponse{ + response := &DeleteTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12046,13 +13740,6 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12071,16 +13758,16 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } - -// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call -func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { + +// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call +func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonOrdersByTeamResponse{ + response := &ListTeamInvitationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12088,7 +13775,7 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []AddonOrder `json:"items"` + Items []Invitation `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12096,13 +13783,6 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12110,13 +13790,6 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12129,26 +13802,26 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT return response, nil } -// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call -func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { +// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call +func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonOrderForTeamResponse{ + response := &EmailTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonOrder + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -12157,19 +13830,19 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12183,33 +13856,33 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder return response, nil } -// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call -func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { +// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call +func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonOrderByTeamResponse{ + response := &AcceptTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonOrder + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON303 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -12218,13 +13891,6 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12237,15 +13903,15 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR return response, nil } -// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call -func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { +// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call +func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonsByTeamResponse{ + response := &CancelTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12291,15 +13957,15 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes return response, nil } -// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call -func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { +// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call +func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsByTeamResponse{ + response := &ListInvoicesByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12307,7 +13973,7 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Addon `json:"items"` + Items []Invoice `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12348,27 +14014,37 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons return response, nil } -// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call -func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { +// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call +func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetByTeamResponse{ + response := &GetTeamMembershipsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + var dest struct { + Items []MembershipWithUser `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12390,13 +14066,6 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12409,15 +14078,15 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs return response, nil } -// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call -func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { +// ParseListMonthlyLimitsByTeamResponse parses an HTTP response from a ListMonthlyLimitsByTeamWithResponse call +func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimitsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamAPIKeysResponse{ + response := &ListMonthlyLimitsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12425,8 +14094,8 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []APIKey `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []MonthlyLimit `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -12440,6 +14109,13 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12459,40 +14135,47 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, return response, nil } -// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call -func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { +// ParseCreateMonthlyLimitResponse parses an HTTP response from a CreateMonthlyLimitWithResponse call +func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamAPIKeyResponse{ + response := &CreateMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest APIKey + var dest MonthlyLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -12513,33 +14196,33 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons return response, nil } -// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call -func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { +// ParseDeleteMonthlyLimitResponse parses an HTTP response from a DeleteMonthlyLimitWithResponse call +func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamAPIKeyResponse{ + response := &DeleteMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -12560,30 +14243,34 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons return response, nil } -// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call -func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { +// ParseGetMonthlyLimitResponse parses an HTTP response from a GetMonthlyLimitWithResponse call +func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamInvitationsResponse{ + response := &GetMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest MonthlyLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12591,6 +14278,13 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12603,22 +14297,22 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR return response, nil } -// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call -func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { +// ParseUpdateMonthlyLimitResponse parses an HTTP response from a UpdateMonthlyLimitWithResponse call +func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &EmailTeamInvitationResponse{ + response := &UpdateMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invitation + var dest MonthlyLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12631,66 +14325,26 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call -func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AcceptTeamInvitationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest MembershipWithTeam + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: - var dest MembershipWithTeam + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON303 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12704,15 +14358,15 @@ func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitatio return response, nil } -// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call -func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { +// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call +func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CancelTeamInvitationResponse{ + response := &DeletePluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12758,15 +14412,15 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio return response, nil } -// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call -func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { +// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call +func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListInvoicesByTeamResponse{ + response := &ListPluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12774,7 +14428,7 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []Invoice `json:"items"` + Items []Plugin `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12815,37 +14469,27 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes return response, nil } -// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call -func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { +// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call +func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamMembershipsResponse{ + response := &DownloadPluginAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []MembershipWithUser `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12853,19 +14497,19 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12879,15 +14523,15 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } -// ParseListMonthlyLimitsByTeamResponse parses an HTTP response from a ListMonthlyLimitsByTeamWithResponse call -func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimitsByTeamResponse, error) { +// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call +func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListMonthlyLimitsByTeamResponse{ + response := &ListSubscriptionOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12895,8 +14539,8 @@ func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimit switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []MonthlyLimit `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []TeamSubscriptionOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -12936,27 +14580,34 @@ func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimit return response, nil } -// ParseCreateMonthlyLimitResponse parses an HTTP response from a CreateMonthlyLimitWithResponse call -func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitResponse, error) { +// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call +func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateMonthlyLimitResponse{ + response := &CreateSubscriptionOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest MonthlyLimit + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12997,20 +14648,27 @@ func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitRes return response, nil } -// ParseDeleteMonthlyLimitResponse parses an HTTP response from a DeleteMonthlyLimitWithResponse call -func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitResponse, error) { +// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call +func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteMonthlyLimitResponse{ + response := &GetSubscriptionOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TeamSubscriptionOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13044,22 +14702,25 @@ func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitRes return response, nil } -// ParseGetMonthlyLimitResponse parses an HTTP response from a GetMonthlyLimitWithResponse call -func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, error) { +// ParseListSyncsResponse parses an HTTP response from a ListSyncsWithResponse call +func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonthlyLimitResponse{ + response := &ListSyncsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonthlyLimit + var dest struct { + Items []Sync `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13072,13 +14733,6 @@ func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13098,26 +14752,26 @@ func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, return response, nil } -// ParseUpdateMonthlyLimitResponse parses an HTTP response from a UpdateMonthlyLimitWithResponse call -func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitResponse, error) { +// ParseCreateSyncResponse parses an HTTP response from a CreateSyncWithResponse call +func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateMonthlyLimitResponse{ + response := &CreateSyncResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonthlyLimit + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Sync if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -13133,19 +14787,12 @@ func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13159,15 +14806,15 @@ func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitRes return response, nil } -// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call -func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { +// ParseDeleteSyncResponse parses an HTTP response from a DeleteSyncWithResponse call +func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginsByTeamResponse{ + response := &DeleteSyncResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -13187,13 +14834,6 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13213,43 +14853,40 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR return response, nil } -// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call -func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { +// ParseGetSyncResponse parses an HTTP response from a GetSyncWithResponse call +func ParseGetSyncResponse(rsp *http.Response) (*GetSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsByTeamResponse{ + response := &GetSyncResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest Sync if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -13270,33 +14907,40 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo return response, nil } -// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call -func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { +// ParseUpdateSyncResponse parses an HTTP response from a UpdateSyncWithResponse call +func ParseUpdateSyncResponse(rsp *http.Response) (*UpdateSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetByTeamResponse{ + response := &UpdateSyncResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + var dest Sync if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -13305,12 +14949,12 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13324,15 +14968,15 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } -// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call -func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { +// ParseListSyncRunsResponse parses an HTTP response from a ListSyncRunsWithResponse call +func ParseListSyncRunsResponse(rsp *http.Response) (*ListSyncRunsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSubscriptionOrdersByTeamResponse{ + response := &ListSyncRunsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -13340,8 +14984,8 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []TeamSubscriptionOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []SyncRun `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -13355,13 +14999,6 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13381,22 +15018,22 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri return response, nil } -// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call -func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { +// ParseCreateSyncRunResponse parses an HTTP response from a CreateSyncRunWithResponse call +func ParseCreateSyncRunResponse(rsp *http.Response) (*CreateSyncRunResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSubscriptionOrderForTeamResponse{ + response := &CreateSyncRunResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest TeamSubscriptionOrder + var dest SyncRun if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13416,26 +15053,59 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON500 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + } + + return response, nil +} + +// ParseGetSyncRunResponse parses an HTTP response from a GetSyncRunWithResponse call +func ParseGetSyncRunResponse(rsp *http.Response) (*GetSyncRunResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncRunResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncRun if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13449,33 +15119,33 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub return response, nil } -// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call -func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { +// ParseUpdateSyncRunResponse parses an HTTP response from a UpdateSyncRunWithResponse call +func ParseUpdateSyncRunResponse(rsp *http.Response) (*UpdateSyncRunResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSubscriptionOrderByTeamResponse{ + response := &UpdateSyncRunResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest TeamSubscriptionOrder + var dest SyncRun if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -13491,6 +15161,13 @@ func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscripti } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index ebda774..831bc07 100644 --- a/models.gen.go +++ b/models.gen.go @@ -93,6 +93,14 @@ const ( PluginVersionPackageTypeNative PluginVersionPackageType = "native" ) +// Defines values for SyncRunStatus. +const ( + SyncRunStatusCancelled SyncRunStatus = "cancelled" + SyncRunStatusCompleted SyncRunStatus = "completed" + SyncRunStatusFailed SyncRunStatus = "failed" + SyncRunStatusStarted SyncRunStatus = "started" +) + // Defines values for TeamPlan. const ( Free TeamPlan = "free" @@ -101,9 +109,9 @@ const ( // Defines values for TeamSubscriptionOrderStatus. const ( - Cancelled TeamSubscriptionOrderStatus = "cancelled" - Completed TeamSubscriptionOrderStatus = "completed" - Pending TeamSubscriptionOrderStatus = "pending" + TeamSubscriptionOrderStatusCancelled TeamSubscriptionOrderStatus = "cancelled" + TeamSubscriptionOrderStatusCompleted TeamSubscriptionOrderStatus = "completed" + TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" ) // Defines values for AddonSortBy. @@ -1049,6 +1057,54 @@ type ReleaseURL struct { Url string `json:"url"` } +// Sync Managed Sync definition +type Sync struct { + // CreatedAt Time when the sync was created + CreatedAt time.Time `json:"created_at"` + + // Disabled Whether the sync is disabled + Disabled bool `json:"disabled"` + + // Name Unique name for the sync + Name string `json:"name"` + + // Schedule Cron schedule for the sync + Schedule string `json:"schedule"` + + // Spec YAML specification to run the sync + Spec string `json:"spec"` + + // UpdatedAt Time when the sync was updated + UpdatedAt time.Time `json:"updated_at"` +} + +// SyncName Unique name of the sync +type SyncName = string + +// SyncRun Managed Sync Run definition +type SyncRun struct { + // CompletedAt Cron schedule for the sync + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CreatedAt Whether the sync is disabled + CreatedAt *time.Time `json:"created_at,omitempty"` + + // Id unique ID of the run + ID openapi_types.UUID `json:"id"` + + // Status The status of the sync run + Status SyncRunStatus `json:"status"` + + // SyncName Name of the sync + SyncName string `json:"sync_name"` +} + +// SyncRunID ID of the SyncRun +type SyncRunID = openapi_types.UUID + +// SyncRunStatus The status of the sync run +type SyncRunStatus string + // Team CloudQuery Team type Team struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -1195,6 +1251,9 @@ type PluginSortBy string // PluginTeam The unique name for the team. type PluginTeam = TeamName +// SyncRunId ID of the SyncRun +type SyncRunId = SyncRunID + // TargetName defines model for target_name. type TargetName = string @@ -1286,6 +1345,15 @@ type DownloadAddonAssetParams struct { Accept *string `json:"Accept,omitempty"` } +// ListPluginNotificationRequestsParams defines parameters for ListPluginNotificationRequests. +type ListPluginNotificationRequestsParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + // ListPluginsParams defines parameters for ListPlugins. type ListPluginsParams struct { // SortBy The field to sort by @@ -1551,6 +1619,53 @@ type ListSubscriptionOrdersByTeamParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } +// ListSyncsParams defines parameters for ListSyncs. +type ListSyncsParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` +} + +// CreateSyncJSONBody defines parameters for CreateSync. +type CreateSyncJSONBody struct { + // Disabled Whether the sync is disabled + Disabled bool `json:"disabled"` + + // Name Unique name for the sync + Name string `json:"name"` + + // Schedule Cron schedule for the sync + Schedule string `json:"schedule"` + Spec string `json:"spec"` +} + +// UpdateSyncJSONBody defines parameters for UpdateSync. +type UpdateSyncJSONBody struct { + // Disabled Whether the sync is disabled + Disabled *bool `json:"disabled,omitempty"` + + // Schedule Cron schedule for the sync + Schedule *string `json:"schedule,omitempty"` + Spec *string `json:"spec,omitempty"` +} + +// ListSyncRunsParams defines parameters for ListSyncRuns. +type ListSyncRunsParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` +} + +// UpdateSyncRunJSONBody defines parameters for UpdateSyncRun. +type UpdateSyncRunJSONBody struct { + // Status The status of the sync run + Status *SyncRunStatus `json:"status,omitempty"` +} + // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. type ListTeamPluginUsageParams struct { // Page Page number of the results to fetch @@ -1665,6 +1780,15 @@ type UpdateMonthlyLimitJSONRequestBody = MonthlyLimitUpdate // CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate +// CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. +type CreateSyncJSONRequestBody CreateSyncJSONBody + +// UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. +type UpdateSyncJSONRequestBody UpdateSyncJSONBody + +// UpdateSyncRunJSONRequestBody defines body for UpdateSyncRun for application/json ContentType. +type UpdateSyncRunJSONRequestBody UpdateSyncRunJSONBody + // IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease diff --git a/spec.json b/spec.json index ea14045..2843e7b 100644 --- a/spec.json +++ b/spec.json @@ -55,6 +55,9 @@ }, { "name": "registry" + }, + { + "name": "syncs" } ], "paths": { @@ -100,6 +103,53 @@ } }, "/plugin-notification-requests": { + "get": { + "description": "List all plugin notification requests", + "operationId": "ListPluginNotificationRequests", + "parameters": [ + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/per_page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginNotificationRequest" + } + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "plugins" + ] + }, "post": { "description": "Create a new plugin notification request.", "operationId": "CreatePluginNotificationRequest", @@ -4403,147 +4453,617 @@ } ] } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "scheme": "bearer", - "type": "http" - }, - "basicAuth": { - "scheme": "basic", - "type": "http" - } }, - "schemas": { - "ImageURL": { - "properties": { - "upload_url": { - "type": "string", - "example": "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef" - }, - "download_url": { - "type": "string", - "example": "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef" - } - }, - "required": [ - "upload_url", - "download_url" - ] - }, - "BasicError": { - "additionalProperties": false, - "description": "Basic Error", - "required": [ - "message", - "status" + "/teams/{team_name}/syncs": { + "get": { + "description": "List all Syncs.", + "operationId": "ListSyncs", + "tags": [ + "syncs" ], - "properties": { - "message": { - "type": "string" + "parameters": [ + { + "$ref": "#/components/parameters/team_name" }, - "status": { - "type": "integer" + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/page" } - }, - "title": "Basic Error", - "type": "object" - }, - "TeamName": { - "description": "The unique name for the team.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "cloudquery" - }, - "PluginKind": { - "description": "The kind of plugin, ie. source or destination.", - "type": "string", - "example": "source", - "enum": [ - "source", - "destination" - ] - }, - "PluginName": { - "description": "The unique name for the plugin.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "aws-source" - }, - "PluginNotificationRequestCreate": { - "type": "object", - "additionalProperties": false, - "description": "Create a Plugin Notification Request", - "required": [ - "plugin_team", - "plugin_kind", - "plugin_name" ], - "properties": { - "plugin_team": { - "$ref": "#/components/schemas/TeamName" + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Sync" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" + "401": { + "$ref": "#/components/responses/RequiresAuthentication" }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" } } }, - "PluginNotificationRequestStatus": { - "description": "Status of a plugin notification request", - "type": "string", - "enum": [ - "pending", - "sent" + "post": { + "description": "Create new Sync definition. Sync runs can be scheduled automatically and manually after sync is created.", + "operationId": "CreateSync", + "tags": [ + "syncs" ], - "default": "pending" - }, - "PluginNotificationRequest": { - "type": "object", - "additionalProperties": false, - "description": "Plugin Notification Request", - "required": [ - "plugin_team", - "plugin_kind", - "plugin_name", - "created_at" + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } ], - "properties": { - "plugin_team": { - "$ref": "#/components/schemas/TeamName" - }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "spec", + "schedule", + "disabled" + ], + "properties": { + "name": { + "type": "string", + "description": "Unique name for the sync" + }, + "spec": { + "type": "string", + "format": "YAML specification to run the sync" + }, + "schedule": { + "type": "string", + "description": "Cron schedule for the sync" + }, + "disabled": { + "type": "boolean", + "description": "Whether the sync is disabled" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Sync" + } + } + } }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" + "400": { + "$ref": "#/components/responses/BadRequest" }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" + "401": { + "$ref": "#/components/responses/RequiresAuthentication" }, - "sent_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" + "422": { + "$ref": "#/components/responses/UnprocessableEntity" }, - "status": { - "$ref": "#/components/schemas/PluginNotificationRequestStatus" + "500": { + "$ref": "#/components/responses/InternalError" } } - }, - "FieldError": { - "allOf": [ - { - "$ref": "#/components/schemas/BasicError" - }, + } + }, + "/teams/{team_name}/syncs/{sync_name}": { + "get": { + "description": "Get a Sync", + "operationId": "GetSync", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Sync" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "patch": { + "description": "Update a Sync", + "operationId": "UpdateSync", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "spec": { + "type": "string", + "format": "YAML specification to run the sync" + }, + "schedule": { + "type": "string", + "description": "Cron schedule for the sync" + }, + "disabled": { + "type": "boolean", + "description": "Whether the sync is disabled" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Sync" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "delete": { + "description": "Delete Sync. This will delete Sync configuration and all associated sync runs", + "operationId": "DeleteSync", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + } + ], + "responses": { + "204": { + "description": "Deleted" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/syncs/{sync_name}/runs": { + "get": { + "description": "List all Sync Runs.", + "operationId": "ListSyncRuns", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/SyncRun" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "post": { + "description": "Create new SyncRun. This will trigger a manual job run.", + "operationId": "CreateSyncRun", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + } + ], + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncRun" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}": { + "get": { + "description": "Get a Sync Run.", + "operationId": "GetSyncRun", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + }, + { + "$ref": "#/components/parameters/sync_run_id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncRun" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "patch": { + "description": "Update a SyncRun", + "operationId": "UpdateSyncRun", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + }, + { + "$ref": "#/components/parameters/sync_run_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/SyncRunStatus" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncRun" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "scheme": "bearer", + "type": "http" + }, + "basicAuth": { + "scheme": "basic", + "type": "http" + } + }, + "schemas": { + "ImageURL": { + "properties": { + "upload_url": { + "type": "string", + "example": "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef" + }, + "download_url": { + "type": "string", + "example": "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef" + } + }, + "required": [ + "upload_url", + "download_url" + ] + }, + "BasicError": { + "additionalProperties": false, + "description": "Basic Error", + "required": [ + "message", + "status" + ], + "properties": { + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "title": "Basic Error", + "type": "object" + }, + "TeamName": { + "description": "The unique name for the team.", + "maxLength": 255, + "pattern": "^[a-z](-?[a-z0-9]+)+$", + "type": "string", + "example": "cloudquery" + }, + "PluginKind": { + "description": "The kind of plugin, ie. source or destination.", + "type": "string", + "example": "source", + "enum": [ + "source", + "destination" + ] + }, + "PluginName": { + "description": "The unique name for the plugin.", + "maxLength": 255, + "pattern": "^[a-z](-?[a-z0-9]+)+$", + "type": "string", + "example": "aws-source" + }, + "PluginNotificationRequestStatus": { + "description": "Status of a plugin notification request", + "type": "string", + "enum": [ + "pending", + "sent" + ], + "default": "pending" + }, + "PluginNotificationRequest": { + "type": "object", + "additionalProperties": false, + "description": "Plugin Notification Request", + "required": [ + "plugin_team", + "plugin_kind", + "plugin_name", + "created_at" + ], + "properties": { + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + }, + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + }, + "sent_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/PluginNotificationRequestStatus" + } + } + }, + "ListMetadata": { + "properties": { + "total_count": { + "type": "integer" + }, + "last_page": { + "type": "integer" + } + } + }, + "PluginNotificationRequestCreate": { + "type": "object", + "additionalProperties": false, + "description": "Create a Plugin Notification Request", + "required": [ + "plugin_team", + "plugin_kind", + "plugin_name" + ], + "properties": { + "plugin_team": { + "$ref": "#/components/schemas/TeamName" + }, + "plugin_kind": { + "$ref": "#/components/schemas/PluginKind" + }, + "plugin_name": { + "$ref": "#/components/schemas/PluginName" + } + } + }, + "FieldError": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicError" + }, { "properties": { "errors": { @@ -4563,16 +5083,6 @@ } ] }, - "ListMetadata": { - "properties": { - "total_count": { - "type": "integer" - }, - "last_page": { - "type": "integer" - } - } - }, "PluginCategory": { "description": "Supported categories for plugins", "type": "string", @@ -6416,6 +6926,107 @@ "access_token", "token" ] + }, + "Sync": { + "description": "Managed Sync definition", + "type": "object", + "required": [ + "name", + "spec", + "disabled", + "schedule", + "created_at", + "updated_at" + ], + "properties": { + "name": { + "type": "string", + "description": "Unique name for the sync" + }, + "spec": { + "type": "string", + "description": "YAML specification to run the sync" + }, + "disabled": { + "type": "boolean", + "description": "Whether the sync is disabled" + }, + "schedule": { + "type": "string", + "description": "Cron schedule for the sync" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Time when the sync was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Time when the sync was updated" + } + } + }, + "SyncName": { + "description": "Unique name of the sync", + "type": "string", + "x-go-name": "SyncName" + }, + "SyncRunStatus": { + "description": "The status of the sync run", + "type": "string", + "enum": [ + "completed", + "failed", + "started", + "cancelled" + ] + }, + "SyncRun": { + "description": "Managed Sync Run definition", + "type": "object", + "required": [ + "sync_name", + "id", + "status", + "started_at" + ], + "properties": { + "sync_name": { + "type": "string", + "description": "Name of the sync" + }, + "id": { + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "description": "unique ID of the run", + "x-go-name": "ID" + }, + "status": { + "$ref": "#/components/schemas/SyncRunStatus", + "description": "Status of the sync run" + }, + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "Whether the sync is disabled" + }, + "completed_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "Cron schedule for the sync" + } + } + }, + "SyncRunID": { + "description": "ID of the SyncRun", + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "x-go-name": "SyncRunID" } }, "responses": { @@ -6429,25 +7040,25 @@ }, "description": "Internal Error" }, - "BadRequest": { + "RequiresAuthentication": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FieldError" + "$ref": "#/components/schemas/BasicError" } } }, - "description": "Bad request" + "description": "Requires authentication" }, - "RequiresAuthentication": { + "BadRequest": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BasicError" + "$ref": "#/components/schemas/FieldError" } } }, - "description": "Requires authentication" + "description": "Bad request" }, "Forbidden": { "content": { @@ -6511,6 +7122,31 @@ } }, "parameters": { + "page": { + "description": "Page number of the results to fetch", + "in": "query", + "name": "page", + "required": false, + "schema": { + "default": 1, + "minimum": 1, + "type": "integer", + "format": "int64" + } + }, + "per_page": { + "description": "The number of results per page (max 1000).", + "in": "query", + "name": "per_page", + "required": false, + "schema": { + "default": 100, + "maximum": 1000, + "minimum": 1, + "type": "integer", + "format": "int64" + } + }, "plugin_team": { "in": "path", "name": "plugin_team", @@ -6550,31 +7186,6 @@ "type": "string" } }, - "page": { - "description": "Page number of the results to fetch", - "in": "query", - "name": "page", - "required": false, - "schema": { - "default": 1, - "minimum": 1, - "type": "integer", - "format": "int64" - } - }, - "per_page": { - "description": "The number of results per page (max 1000).", - "in": "query", - "name": "per_page", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "type": "integer", - "format": "int64" - } - }, "team_name": { "in": "path", "name": "team_name", @@ -6720,6 +7331,22 @@ "$ref": "#/components/schemas/APIKeyID" }, "x-go-name": "APIKeyID" + }, + "sync_name": { + "name": "sync_name", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SyncName" + } + }, + "sync_run_id": { + "name": "sync_run_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SyncRunID" + } } } } From 46da0853b105b14c2b084d5a579fbbdea6255aac Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:54:40 +0200 Subject: [PATCH 090/343] fix: Generate CloudQuery Go API Client from `spec.json` (#97) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 39 +++++++++++++ spec.json | 138 ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 329 insertions(+), 7 deletions(-) diff --git a/client.gen.go b/client.gen.go index d3f44d7..facc146 100644 --- a/client.gen.go +++ b/client.gen.go @@ -308,6 +308,9 @@ type ClientInterface interface { // GetTeamMemberships request GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeamMembership request + DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListMonthlyLimitsByTeam request ListMonthlyLimitsByTeam(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1375,6 +1378,18 @@ func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } +func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamMembershipRequest(c.Server, teamName, email) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListMonthlyLimitsByTeam(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListMonthlyLimitsByTeamRequest(c.Server, teamName, params) if err != nil { @@ -4333,6 +4348,17 @@ func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestPar req.Header.Set("X-Meta-Plugin-Version", headerParam0) } + if params.XMetaUserTeamName != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-User-Team-Name", runtime.ParamLocationHeader, *params.XMetaUserTeamName) + if err != nil { + return nil, err + } + + req.Header.Set("X-Meta-User-Team-Name", headerParam1) + } + } return req, nil @@ -5428,6 +5454,47 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return req, nil } +// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership +func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Email) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListMonthlyLimitsByTeamRequest generates requests for ListMonthlyLimitsByTeam func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params *ListMonthlyLimitsByTeamParams) (*http.Request, error) { var err error @@ -7341,6 +7408,9 @@ type ClientWithResponsesInterface interface { // GetTeamMembershipsWithResponse request GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + // DeleteTeamMembershipWithResponse request + DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) + // ListMonthlyLimitsByTeamWithResponse request ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) @@ -9032,6 +9102,32 @@ func (r GetTeamMembershipsResponse) StatusCode() int { return 0 } +type DeleteTeamMembershipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteTeamMembershipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamMembershipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListMonthlyLimitsByTeamResponse struct { Body []byte HTTPResponse *http.Response @@ -10535,6 +10631,15 @@ func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context return ParseGetTeamMembershipsResponse(rsp) } +// DeleteTeamMembershipWithResponse request returning *DeleteTeamMembershipResponse +func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { + rsp, err := c.DeleteTeamMembership(ctx, teamName, email, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamMembershipResponse(rsp) +} + // ListMonthlyLimitsByTeamWithResponse request returning *ListMonthlyLimitsByTeamResponse func (c *ClientWithResponses) ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) { rsp, err := c.ListMonthlyLimitsByTeam(ctx, teamName, params, reqEditors...) @@ -14078,6 +14183,60 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } +// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call +func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTeamMembershipResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListMonthlyLimitsByTeamResponse parses an HTTP response from a ListMonthlyLimitsByTeamWithResponse call func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimitsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 831bc07..9352750 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1059,12 +1059,24 @@ type ReleaseURL struct { // Sync Managed Sync definition type Sync struct { + // Cpu CPU quota for the sync + CPU string `json:"cpu"` + // CreatedAt Time when the sync was created CreatedAt time.Time `json:"created_at"` // Disabled Whether the sync is disabled Disabled bool `json:"disabled"` + // EnvKeys Environment variable names for the sync + EnvKeys []string `json:"env_keys"` + + // EnvValues Environment variable values for the sync + EnvValues []string `json:"env_values"` + + // Memory Memory quota for the sync + Memory string `json:"memory"` + // Name Unique name for the sync Name string `json:"name"` @@ -1471,6 +1483,9 @@ type AuthRegistryRequestParams struct { // XMetaPluginVersion Plugin version name XMetaPluginVersion *string `json:"X-Meta-Plugin-Version,omitempty"` + + // XMetaUserTeamName User's team name + XMetaUserTeamName *string `json:"X-Meta-User-Team-Name,omitempty"` } // ListTeamsParams defines parameters for ListTeams. @@ -1630,9 +1645,21 @@ type ListSyncsParams struct { // CreateSyncJSONBody defines parameters for CreateSync. type CreateSyncJSONBody struct { + // Cpu CPU quota for the sync + CPU *string `json:"cpu,omitempty"` + // Disabled Whether the sync is disabled Disabled bool `json:"disabled"` + // EnvKeys Environment variable names for the sync + EnvKeys *[]string `json:"env_keys,omitempty"` + + // EnvValues Environment variable values for the sync + EnvValues *[]string `json:"env_values,omitempty"` + + // Memory Memory quota for the sync + Memory *string `json:"memory,omitempty"` + // Name Unique name for the sync Name string `json:"name"` @@ -1643,9 +1670,21 @@ type CreateSyncJSONBody struct { // UpdateSyncJSONBody defines parameters for UpdateSync. type UpdateSyncJSONBody struct { + // Cpu CPU quota for the sync + CPU *string `json:"cpu,omitempty"` + // Disabled Whether the sync is disabled Disabled *bool `json:"disabled,omitempty"` + // EnvKeys Environment variable names for the sync + EnvKeys *[]string `json:"env_keys,omitempty"` + + // EnvValues Environment variable values for the sync + EnvValues *[]string `json:"env_values,omitempty"` + + // Memory Memory quota for the sync + Memory *string `json:"memory,omitempty"` + // Schedule Cron schedule for the sync Schedule *string `json:"schedule,omitempty"` Spec *string `json:"spec,omitempty"` diff --git a/spec.json b/spec.json index 2843e7b..fc08bba 100644 --- a/spec.json +++ b/spec.json @@ -2964,6 +2964,44 @@ ] } }, + "/teams/{team_name}/memberships/{email}": { + "delete": { + "description": "Remove a user from the team", + "operationId": "DeleteTeamMembership", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/email" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "users" + ] + } + }, "/teams/{team_name}/monthly-limits": { "get": { "description": "List all monthly limits for the team.", @@ -4403,6 +4441,14 @@ "description": "Plugin version name", "example": "v1.0.0" }, + { + "in": "header", + "name": "X-Meta-User-Team-Name", + "schema": { + "type": "string" + }, + "description": "User's team name" + }, { "in": "query", "name": "account", @@ -4546,7 +4592,33 @@ }, "disabled": { "type": "boolean", - "description": "Whether the sync is disabled" + "description": "Whether the sync is disabled", + "default": false + }, + "env_keys": { + "type": "array", + "description": "Environment variable names for the sync", + "items": { + "type": "string" + } + }, + "env_values": { + "type": "array", + "description": "Environment variable values for the sync", + "items": { + "type": "string" + } + }, + "cpu": { + "type": "string", + "description": "CPU quota for the sync", + "default": "1", + "x-go-name": "CPU" + }, + "memory": { + "type": "string", + "description": "Memory quota for the sync", + "default": "2Gi" } } } @@ -4650,6 +4722,31 @@ "disabled": { "type": "boolean", "description": "Whether the sync is disabled" + }, + "env_keys": { + "type": "array", + "description": "Environment variable names for the sync", + "items": { + "type": "string" + } + }, + "env_values": { + "type": "array", + "description": "Environment variable values for the sync", + "items": { + "type": "string" + } + }, + "cpu": { + "type": "string", + "description": "CPU quota for the sync", + "default": "1", + "x-go-name": "CPU" + }, + "memory": { + "type": "string", + "description": "Memory quota for the sync", + "default": "2Gi" } } } @@ -6935,6 +7032,10 @@ "spec", "disabled", "schedule", + "env_keys", + "env_values", + "cpu", + "memory", "created_at", "updated_at" ], @@ -6955,6 +7056,29 @@ "type": "string", "description": "Cron schedule for the sync" }, + "env_keys": { + "type": "array", + "description": "Environment variable names for the sync", + "items": { + "type": "string" + } + }, + "env_values": { + "type": "array", + "description": "Environment variable values for the sync", + "items": { + "type": "string" + } + }, + "cpu": { + "type": "string", + "description": "CPU quota for the sync", + "x-go-name": "CPU" + }, + "memory": { + "type": "string", + "description": "Memory quota for the sync" + }, "created_at": { "type": "string", "format": "date-time", @@ -7289,20 +7413,20 @@ }, "x-go-name": "AddonOrderID" }, - "addon_team": { + "email": { "in": "path", - "name": "addon_team", + "name": "email", "required": true, "schema": { - "$ref": "#/components/schemas/TeamName" + "$ref": "#/components/schemas/Email" } }, - "email": { + "addon_team": { "in": "path", - "name": "email", + "name": "addon_team", "required": true, "schema": { - "$ref": "#/components/schemas/Email" + "$ref": "#/components/schemas/TeamName" } }, "team_subscription_order_id": { From 68874b1880c3c3fd1abfab834add35caa090b641 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jan 2024 13:54:46 +0200 Subject: [PATCH 091/343] fix: Generate CloudQuery Go API Client from `spec.json` (#98) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ models.gen.go | 3 +++ spec.json | 8 ++++++++ 3 files changed, 27 insertions(+) diff --git a/client.gen.go b/client.gen.go index facc146..b7db3c2 100644 --- a/client.gen.go +++ b/client.gen.go @@ -4311,6 +4311,22 @@ func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestPar } + if params.Service != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service", runtime.ParamLocationQuery, *params.Service); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.Scope != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { diff --git a/models.gen.go b/models.gen.go index 9352750..51ed1ce 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1478,6 +1478,9 @@ type AuthRegistryRequestParams struct { // Account Username used for `docker login` Account *string `form:"account,omitempty" json:"account,omitempty"` + // Service Service requesting the JTW token + Service *string `form:"service,omitempty" json:"service,omitempty"` + // Scope Multi-value string containing the repository being access and the operation type (push/pull) Scope *string `form:"scope,omitempty" json:"scope,omitempty"` diff --git a/spec.json b/spec.json index fc08bba..7fb5698 100644 --- a/spec.json +++ b/spec.json @@ -4457,6 +4457,14 @@ }, "description": "Username used for `docker login`" }, + { + "in": "query", + "name": "service", + "schema": { + "type": "string" + }, + "description": "Service requesting the JTW token" + }, { "in": "query", "name": "scope", From 84e8a5ab339a3ac360faa4443c2b6417057be7ec Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:18:50 +0200 Subject: [PATCH 092/343] fix: Generate CloudQuery Go API Client from `spec.json` (#99) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 32 +++++++++ spec.json | 124 ++++++++++++++++++++++++++++++++++ 3 files changed, 340 insertions(+) diff --git a/client.gen.go b/client.gen.go index b7db3c2..2b39b05 100644 --- a/client.gen.go +++ b/client.gen.go @@ -286,6 +286,11 @@ type ClientInterface interface { // DeleteTeamAPIKey request DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateTeamImagesWithBody request with any body + CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTeamImages(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamInvitations request ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1282,6 +1287,30 @@ func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKey return c.Client.Do(req) } +func (c *Client) CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamImagesRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTeamImages(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamImagesRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamInvitationsRequest(c.Server, teamName, params) if err != nil { @@ -5119,6 +5148,53 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyID APIKe return req, nil } +// NewCreateTeamImagesRequest calls the generic CreateTeamImages builder with application/json body +func NewCreateTeamImagesRequest(server string, teamName TeamName, body CreateTeamImagesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamImagesRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateTeamImagesRequestWithBody generates requests for CreateTeamImages with any type of body +func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/images", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListTeamInvitationsRequest generates requests for ListTeamInvitations func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { var err error @@ -7402,6 +7478,11 @@ type ClientWithResponsesInterface interface { // DeleteTeamAPIKeyWithResponse request DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + // CreateTeamImagesWithBodyWithResponse request with any body + CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + + CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + // ListTeamInvitationsWithResponse request ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) @@ -8955,6 +9036,35 @@ func (r DeleteTeamAPIKeyResponse) StatusCode() int { return 0 } +type CreateTeamImagesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Items []TeamImage `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateTeamImagesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamImagesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamInvitationsResponse struct { Body []byte HTTPResponse *http.Response @@ -10577,6 +10687,23 @@ func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, return ParseDeleteTeamAPIKeyResponse(rsp) } +// CreateTeamImagesWithBodyWithResponse request with arbitrary body returning *CreateTeamImagesResponse +func (c *ClientWithResponses) CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { + rsp, err := c.CreateTeamImagesWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamImagesResponse(rsp) +} + +func (c *ClientWithResponses) CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { + rsp, err := c.CreateTeamImages(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamImagesResponse(rsp) +} + // ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) @@ -13880,6 +14007,63 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons return response, nil } +// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call +func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTeamImagesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Items []TeamImage `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 51ed1ce..d3c63f2 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1131,6 +1131,30 @@ type Team struct { Plan *TeamPlan `json:"plan,omitempty"` } +// TeamImage defines model for TeamImage. +type TeamImage struct { + // Checksum SHA1 checksum of image + Checksum string `json:"checksum"` + + // Name Name of image + Name string `json:"name"` + + // UploadUrl URL to upload image + UploadUrl *string `json:"upload_url,omitempty"` + + // Url URL to download image + Url string `json:"url"` +} + +// TeamImageCreate defines model for TeamImageCreate. +type TeamImageCreate struct { + // Checksum SHA1 checksum of image + Checksum string `json:"checksum"` + + // Name Name of image + Name string `json:"name"` +} + // TeamName The unique name for the team. type TeamName = string @@ -1561,6 +1585,11 @@ type CreateTeamAPIKeyJSONBody struct { Name APIKeyName `json:"name"` } +// CreateTeamImagesJSONBody defines parameters for CreateTeamImages. +type CreateTeamImagesJSONBody struct { + Images []TeamImageCreate `json:"images"` +} + // ListTeamInvitationsParams defines parameters for ListTeamInvitations. type ListTeamInvitationsParams struct { // Page Page number of the results to fetch @@ -1807,6 +1836,9 @@ type CreateAddonOrderForTeamJSONRequestBody = AddonOrderCreate // CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. type CreateTeamAPIKeyJSONRequestBody CreateTeamAPIKeyJSONBody +// CreateTeamImagesJSONRequestBody defines body for CreateTeamImages for application/json ContentType. +type CreateTeamImagesJSONRequestBody CreateTeamImagesJSONBody + // EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. type EmailTeamInvitationJSONRequestBody EmailTeamInvitationJSONBody diff --git a/spec.json b/spec.json index 7fb5698..91047fd 100644 --- a/spec.json +++ b/spec.json @@ -2517,6 +2517,82 @@ ] } }, + "/teams/{team_name}/images": { + "post": { + "description": "Get URLs to upload images for a given team", + "operationId": "CreateTeamImages", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "images" + ], + "properties": { + "images": { + "items": { + "$ref": "#/components/schemas/TeamImageCreate" + }, + "type": "array", + "minItems": 1 + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/TeamImage" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams", + "plugins", + "addons" + ] + } + }, "/teams/{team_name}/plugins": { "get": { "description": "List all plugins for the team.", @@ -6401,6 +6477,54 @@ "title": "Team", "type": "object" }, + "TeamImageCreate": { + "type": "object", + "title": "Create Team Image Request", + "additionalProperties": false, + "required": [ + "name", + "checksum" + ], + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "Name of image" + }, + "checksum": { + "type": "string", + "length": 40, + "pattern": "^[a-f0-9]+$", + "description": "SHA1 checksum of image" + } + } + }, + "TeamImage": { + "required": [ + "url", + "name", + "checksum" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of image" + }, + "checksum": { + "type": "string", + "description": "SHA1 checksum of image" + }, + "url": { + "type": "string", + "description": "URL to download image" + }, + "upload_url": { + "type": "string", + "description": "URL to upload image" + } + } + }, "AddonOrderID": { "description": "ID of the addon order", "type": "string", From 515b000bd7472e41066c667e54b5c1b36bf0a5a2 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:54:04 +0200 Subject: [PATCH 093/343] fix: Generate CloudQuery Go API Client from `spec.json` (#100) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 4 ++-- spec.json | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/models.gen.go b/models.gen.go index d3c63f2..2e38e33 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1140,10 +1140,10 @@ type TeamImage struct { Name string `json:"name"` // UploadUrl URL to upload image - UploadUrl *string `json:"upload_url,omitempty"` + UploadURL *string `json:"upload_url,omitempty"` // Url URL to download image - Url string `json:"url"` + URL string `json:"url"` } // TeamImageCreate defines model for TeamImageCreate. diff --git a/spec.json b/spec.json index 91047fd..5882f97 100644 --- a/spec.json +++ b/spec.json @@ -6517,11 +6517,13 @@ }, "url": { "type": "string", - "description": "URL to download image" + "description": "URL to download image", + "x-go-name": "URL" }, "upload_url": { "type": "string", - "description": "URL to upload image" + "description": "URL to upload image", + "x-go-name": "UploadURL" } } }, From 58275d0b0354ed2438c899f6a02bacd8ed50545e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:35:30 +0200 Subject: [PATCH 094/343] fix: Generate CloudQuery Go API Client from `spec.json` (#101) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.json b/spec.json index 5882f97..f96907f 100644 --- a/spec.json +++ b/spec.json @@ -17,7 +17,7 @@ }, "servers": [ { - "url": "https://api.cloudquery.io/v1" + "url": "https://api.cloudquery.io" } ], "security": [ From d00539280ecb73851ef2c314b9aa8955d40b21b5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:07:07 +0200 Subject: [PATCH 095/343] chore(main): Release v1.6.4 (#92) --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 558050e..9b4cb5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [1.6.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.3...v1.6.4) (2024-01-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#100](https://github.com/cloudquery/cloudquery-api-go/issues/100)) ([515b000](https://github.com/cloudquery/cloudquery-api-go/commit/515b000bd7472e41066c667e54b5c1b36bf0a5a2)) +* Generate CloudQuery Go API Client from `spec.json` ([#101](https://github.com/cloudquery/cloudquery-api-go/issues/101)) ([58275d0](https://github.com/cloudquery/cloudquery-api-go/commit/58275d0b0354ed2438c899f6a02bacd8ed50545e)) +* Generate CloudQuery Go API Client from `spec.json` ([#91](https://github.com/cloudquery/cloudquery-api-go/issues/91)) ([7de06f2](https://github.com/cloudquery/cloudquery-api-go/commit/7de06f2038c275960ad102d00cbf360947c96297)) +* Generate CloudQuery Go API Client from `spec.json` ([#93](https://github.com/cloudquery/cloudquery-api-go/issues/93)) ([0d3dea8](https://github.com/cloudquery/cloudquery-api-go/commit/0d3dea833f7be08cfa3ca973e829b1e650cddf2b)) +* Generate CloudQuery Go API Client from `spec.json` ([#94](https://github.com/cloudquery/cloudquery-api-go/issues/94)) ([e2388ba](https://github.com/cloudquery/cloudquery-api-go/commit/e2388ba3f2bf07a96f5a7f4add475365caf2d18c)) +* Generate CloudQuery Go API Client from `spec.json` ([#95](https://github.com/cloudquery/cloudquery-api-go/issues/95)) ([0f4d8b5](https://github.com/cloudquery/cloudquery-api-go/commit/0f4d8b5a8dccf977a179eaf9168a2d90fbaed4bb)) +* Generate CloudQuery Go API Client from `spec.json` ([#96](https://github.com/cloudquery/cloudquery-api-go/issues/96)) ([9a1990c](https://github.com/cloudquery/cloudquery-api-go/commit/9a1990ca787a1cbeac65676967dd746352640be3)) +* Generate CloudQuery Go API Client from `spec.json` ([#97](https://github.com/cloudquery/cloudquery-api-go/issues/97)) ([46da085](https://github.com/cloudquery/cloudquery-api-go/commit/46da0853b105b14c2b084d5a579fbbdea6255aac)) +* Generate CloudQuery Go API Client from `spec.json` ([#98](https://github.com/cloudquery/cloudquery-api-go/issues/98)) ([68874b1](https://github.com/cloudquery/cloudquery-api-go/commit/68874b1880c3c3fd1abfab834add35caa090b641)) +* Generate CloudQuery Go API Client from `spec.json` ([#99](https://github.com/cloudquery/cloudquery-api-go/issues/99)) ([84e8a5a](https://github.com/cloudquery/cloudquery-api-go/commit/84e8a5ab339a3ac360faa4443c2b6417057be7ec)) + ## [1.6.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.2...v1.6.3) (2023-12-18) From 10fd8e4a9f4f5867b8cb2af4a84400e967f8aa84 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 15 Jan 2024 12:20:02 +0200 Subject: [PATCH 096/343] fix: Generate CloudQuery Go API Client from `spec.json` (#102) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 24 ++++++++++++++++-------- models.gen.go | 5 +++++ spec.json | 35 +++++++++++++++++++++++++++++++---- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/client.gen.go b/client.gen.go index 2b39b05..ead47a3 100644 --- a/client.gen.go +++ b/client.gen.go @@ -8636,10 +8636,11 @@ type AuthRegistryRequestResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RegistryAuthToken - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity - JSON500 *InternalError + JSON400 *DockerError + JSON401 *DockerError + JSON404 *DockerError + JSON422 *DockerError + JSON500 *DockerError } // Status returns HTTPResponse.Status @@ -13193,28 +13194,35 @@ func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestR response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 2e38e33..3cf6c08 100644 --- a/models.gen.go +++ b/models.gen.go @@ -441,6 +441,11 @@ type BasicError struct { Status int `json:"status"` } +// DockerError Error Returned from the Docker Authorization Handler to the Docker Registry +type DockerError struct { + Details string `json:"details"` +} + // Email defines model for Email. type Email = openapi_types.Email diff --git a/spec.json b/spec.json index f96907f..23d24f5 100644 --- a/spec.json +++ b/spec.json @@ -4562,16 +4562,19 @@ "description": "Response" }, "400": { - "$ref": "#/components/responses/BadRequest" + "$ref": "#/components/responses/DockerError" }, "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "$ref": "#/components/responses/DockerError" + }, + "404": { + "$ref": "#/components/responses/DockerError" }, "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "$ref": "#/components/responses/DockerError" }, "500": { - "$ref": "#/components/responses/InternalError" + "$ref": "#/components/responses/DockerError" } }, "tags": [ @@ -7158,6 +7161,20 @@ "token" ] }, + "DockerError": { + "additionalProperties": false, + "description": "Error Returned from the Docker Authorization Handler to the Docker Registry", + "required": [ + "details" + ], + "properties": { + "details": { + "type": "string" + } + }, + "title": "Docker Error", + "type": "object" + }, "Sync": { "description": "Managed Sync definition", "type": "object", @@ -7377,6 +7394,16 @@ } }, "description": "Method not allowed" + }, + "DockerError": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DockerError" + } + } + }, + "description": "Error Returned from the Docker Authorization Handler to the Docker Registry" } }, "parameters": { From 48497073af826fa8480e3780341199e7d3d642ca Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:32:55 +0200 Subject: [PATCH 097/343] fix: Generate CloudQuery Go API Client from `spec.json` (#104) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 9 +++++++++ spec.json | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/models.gen.go b/models.gen.go index 3cf6c08..0d76bbf 100644 --- a/models.gen.go +++ b/models.gen.go @@ -54,11 +54,20 @@ const ( // Defines values for PluginCategory. const ( + PluginCategoryCloudFinops PluginCategory = "cloud-finops" PluginCategoryCloudInfrastructure PluginCategory = "cloud-infrastructure" + PluginCategoryDataWarehouses PluginCategory = "data-warehouses" PluginCategoryDatabases PluginCategory = "databases" PluginCategoryEngineeringAnalytics PluginCategory = "engineering-analytics" + PluginCategoryFleetManagement PluginCategory = "fleet-management" + PluginCategoryHumanResources PluginCategory = "human-resources" + PluginCategoryMarketingAnalytics PluginCategory = "marketing-analytics" PluginCategoryOther PluginCategory = "other" + PluginCategoryProductAnalytics PluginCategory = "product-analytics" + PluginCategoryProjectManagement PluginCategory = "project-management" PluginCategorySalesMarketing PluginCategory = "sales-marketing" + PluginCategorySecurity PluginCategory = "security" + PluginCategoryShipmentTracking PluginCategory = "shipment-tracking" ) // Defines values for PluginKind. diff --git a/spec.json b/spec.json index 23d24f5..8941fdc 100644 --- a/spec.json +++ b/spec.json @@ -5275,6 +5275,15 @@ "databases", "sales-marketing", "engineering-analytics", + "marketing-analytics", + "shipment-tracking", + "product-analytics", + "cloud-finops", + "project-management", + "fleet-management", + "security", + "data-warehouses", + "human-resources", "other" ] }, From 5f5b9607ec97925331918e38aa5ba159c82267d7 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:09:29 +0200 Subject: [PATCH 098/343] fix: Generate CloudQuery Go API Client from `spec.json` (#105) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 33 +++++++++++++----------- spec.json | 69 +++++++++++++++++++++++++++------------------------ 2 files changed, 55 insertions(+), 47 deletions(-) diff --git a/models.gen.go b/models.gen.go index 0d76bbf..483ae25 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1082,11 +1082,8 @@ type Sync struct { // Disabled Whether the sync is disabled Disabled bool `json:"disabled"` - // EnvKeys Environment variable names for the sync - EnvKeys []string `json:"env_keys"` - - // EnvValues Environment variable values for the sync - EnvValues []string `json:"env_values"` + // Env Environment variables for the sync + Env []SyncEnv `json:"env"` // Memory Memory quota for the sync Memory string `json:"memory"` @@ -1104,6 +1101,15 @@ type Sync struct { UpdatedAt time.Time `json:"updated_at"` } +// SyncEnv Environment variable +type SyncEnv struct { + // Name Name of the environment variable + Name string `json:"name"` + + // Value Value of the environment variable + Value string `json:"value"` +} + // SyncName Unique name of the sync type SyncName = string @@ -1260,6 +1266,9 @@ type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` Email Email `json:"email"` + // Id ID of the User + ID openapi_types.UUID `json:"id"` + // Name The unique name for the user. Name *UserName `json:"name,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` @@ -1697,11 +1706,8 @@ type CreateSyncJSONBody struct { // Disabled Whether the sync is disabled Disabled bool `json:"disabled"` - // EnvKeys Environment variable names for the sync - EnvKeys *[]string `json:"env_keys,omitempty"` - - // EnvValues Environment variable values for the sync - EnvValues *[]string `json:"env_values,omitempty"` + // Env Environment variables for the sync + Env *[]SyncEnv `json:"env,omitempty"` // Memory Memory quota for the sync Memory *string `json:"memory,omitempty"` @@ -1722,11 +1728,8 @@ type UpdateSyncJSONBody struct { // Disabled Whether the sync is disabled Disabled *bool `json:"disabled,omitempty"` - // EnvKeys Environment variable names for the sync - EnvKeys *[]string `json:"env_keys,omitempty"` - - // EnvValues Environment variable values for the sync - EnvValues *[]string `json:"env_values,omitempty"` + // Env Environment variables for the sync + Env *[]SyncEnv `json:"env,omitempty"` // Memory Memory quota for the sync Memory *string `json:"memory,omitempty"` diff --git a/spec.json b/spec.json index 8941fdc..f6eaef2 100644 --- a/spec.json +++ b/spec.json @@ -3003,6 +3003,7 @@ "user": { "created_at": "2017-07-14T16:53:42Z", "email": "user@clouduery.io", + "id": "12345678-1234-1234-1234-1234567890ab", "name": "user", "updated_at": "2017-07-14T16:53:42Z" } @@ -4682,18 +4683,11 @@ "description": "Whether the sync is disabled", "default": false }, - "env_keys": { + "env": { "type": "array", - "description": "Environment variable names for the sync", + "description": "Environment variables for the sync", "items": { - "type": "string" - } - }, - "env_values": { - "type": "array", - "description": "Environment variable values for the sync", - "items": { - "type": "string" + "$ref": "#/components/schemas/SyncEnv" } }, "cpu": { @@ -4810,18 +4804,11 @@ "type": "boolean", "description": "Whether the sync is disabled" }, - "env_keys": { + "env": { "type": "array", - "description": "Environment variable names for the sync", + "description": "Environment variables for the sync", "items": { - "type": "string" - } - }, - "env_values": { - "type": "array", - "description": "Environment variable values for the sync", - "items": { - "type": "string" + "$ref": "#/components/schemas/SyncEnv" } }, "cpu": { @@ -6666,6 +6653,13 @@ "format": "date-time", "type": "string" }, + "id": { + "description": "ID of the User", + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "x-go-name": "ID" + }, "email": { "$ref": "#/components/schemas/Email" }, @@ -6679,6 +6673,7 @@ } }, "required": [ + "id", "email" ], "title": "CloudQuery User", @@ -7184,6 +7179,24 @@ "title": "Docker Error", "type": "object" }, + "SyncEnv": { + "type": "object", + "description": "Environment variable", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the environment variable" + }, + "value": { + "type": "string", + "description": "Value of the environment variable" + } + } + }, "Sync": { "description": "Managed Sync definition", "type": "object", @@ -7192,8 +7205,7 @@ "spec", "disabled", "schedule", - "env_keys", - "env_values", + "env", "cpu", "memory", "created_at", @@ -7216,18 +7228,11 @@ "type": "string", "description": "Cron schedule for the sync" }, - "env_keys": { + "env": { "type": "array", - "description": "Environment variable names for the sync", + "description": "Environment variables for the sync", "items": { - "type": "string" - } - }, - "env_values": { - "type": "array", - "description": "Environment variable values for the sync", - "items": { - "type": "string" + "$ref": "#/components/schemas/SyncEnv" } }, "cpu": { From 753656a8418fa2dd09d30e6f3610b4d69b87f6c5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:25:36 +0200 Subject: [PATCH 099/343] fix: Generate CloudQuery Go API Client from `spec.json` (#106) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 4 ++-- models.gen.go | 65 ++++++++++++++++++++++++++++++++++++--------------- spec.json | 43 +++++++++++++++++++++++----------- 3 files changed, 78 insertions(+), 34 deletions(-) diff --git a/client.gen.go b/client.gen.go index ead47a3..6f566ee 100644 --- a/client.gen.go +++ b/client.gen.go @@ -8280,7 +8280,7 @@ func (r ListPluginVersionsResponse) StatusCode() int { type GetPluginVersionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PluginVersion + JSON200 *PluginVersionDetails JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound @@ -12438,7 +12438,7 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion + var dest PluginVersionDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 483ae25..e7f9cc0 100644 --- a/models.gen.go +++ b/models.gen.go @@ -82,6 +82,12 @@ const ( PluginNotificationRequestStatusSent PluginNotificationRequestStatus = "sent" ) +// Defines values for PluginPackageType. +const ( + Docker PluginPackageType = "docker" + Native PluginPackageType = "native" +) + // Defines values for PluginReleaseStage. const ( ComingSoon PluginReleaseStage = "coming-soon" @@ -96,12 +102,6 @@ const ( PluginTierPaid PluginTier = "paid" ) -// Defines values for PluginVersionPackageType. -const ( - PluginVersionPackageTypeDocker PluginVersionPackageType = "docker" - PluginVersionPackageTypeNative PluginVersionPackageType = "native" -) - // Defines values for SyncRunStatus. const ( SyncRunStatusCancelled SyncRunStatus = "cancelled" @@ -170,12 +170,6 @@ const ( CreatedAt ListPluginVersionsParamsSortBy = "created_at" ) -// Defines values for CreatePluginVersionJSONBodyPackageType. -const ( - CreatePluginVersionJSONBodyPackageTypeDocker CreatePluginVersionJSONBodyPackageType = "docker" - CreatePluginVersionJSONBodyPackageTypeNative CreatePluginVersionJSONBodyPackageType = "native" -) - // Defines values for EmailTeamInvitationJSONBodyRole. const ( Admin EmailTeamInvitationJSONBodyRole = "admin" @@ -824,6 +818,9 @@ type PluginNotificationRequestCreate struct { // PluginNotificationRequestStatus Status of a plugin notification request type PluginNotificationRequestStatus string +// PluginPackageType The package type of the plugin assets +type PluginPackageType string + // PluginPrice CloudQuery Plugin Price type PluginPrice struct { // EffectiveFrom The date and time the price came (or will come) into effect. @@ -1020,7 +1017,7 @@ type PluginVersion struct { Name VersionName `json:"name"` // PackageType The package type of the plugin assets - PackageType PluginVersionPackageType `json:"package_type"` + PackageType PluginPackageType `json:"package_type"` // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). Protocols PluginProtocols `json:"protocols"` @@ -1035,8 +1032,41 @@ type PluginVersion struct { SupportedTargets []string `json:"supported_targets"` } -// PluginVersionPackageType The package type of the plugin assets -type PluginVersionPackageType string +// PluginVersionDetails defines model for PluginVersionDetails. +type PluginVersionDetails struct { + // Checksums The checksums of the plugin assets + Checksums []string `json:"checksums"` + + // CreatedAt The date and time the plugin version was created. + CreatedAt time.Time `json:"created_at"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. + Draft bool `json:"draft"` + + // ExampleConfig Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format. + ExampleConfig string `json:"example_config"` + + // Message Description of what's new or changed in this version (supports markdown) + Message string `json:"message"` + + // Name The version in semantic version format. + Name VersionName `json:"name"` + + // PackageType The package type of the plugin assets + PackageType PluginPackageType `json:"package_type"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` + + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted bool `json:"retracted"` + + // SupportedTargets The targets supported by this plugin version, formatted as _ + SupportedTargets []string `json:"supported_targets"` +} // PluginVersionUpdate defines model for PluginVersionUpdate. type PluginVersionUpdate struct { @@ -1460,7 +1490,7 @@ type CreatePluginVersionJSONBody struct { Message string `json:"message"` // PackageType The package type of the plugin assets - PackageType CreatePluginVersionJSONBodyPackageType `json:"package_type"` + PackageType PluginPackageType `json:"package_type"` // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). Protocols PluginProtocols `json:"protocols"` @@ -1469,9 +1499,6 @@ type CreatePluginVersionJSONBody struct { SupportedTargets []string `json:"supported_targets"` } -// CreatePluginVersionJSONBodyPackageType defines parameters for CreatePluginVersion. -type CreatePluginVersionJSONBodyPackageType string - // DownloadPluginAssetParams defines parameters for DownloadPluginAsset. type DownloadPluginAssetParams struct { Accept *string `json:"Accept,omitempty"` diff --git a/spec.json b/spec.json index f6eaef2..62f95bd 100644 --- a/spec.json +++ b/spec.json @@ -782,7 +782,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PluginVersion" + "$ref": "#/components/schemas/PluginVersionDetails" } } }, @@ -865,12 +865,7 @@ } }, "package_type": { - "type": "string", - "description": "The package type of the plugin assets", - "enum": [ - "native", - "docker" - ] + "$ref": "#/components/schemas/PluginPackageType" } } } @@ -5630,6 +5625,14 @@ ] } }, + "PluginPackageType": { + "description": "The package type of the plugin assets", + "type": "string", + "enum": [ + "native", + "docker" + ] + }, "PluginVersion": { "additionalProperties": false, "description": "CloudQuery Plugin Version", @@ -5696,17 +5699,31 @@ "description": "The checksums of the plugin assets" }, "package_type": { - "type": "string", - "description": "The package type of the plugin assets", - "enum": [ - "native", - "docker" - ] + "$ref": "#/components/schemas/PluginPackageType" } }, "title": "CloudQuery Plugin Version", "type": "object" }, + "PluginVersionDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/PluginVersion" + }, + { + "type": "object", + "required": [ + "example_config" + ], + "properties": { + "example_config": { + "type": "string", + "description": "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format." + } + } + } + ] + }, "PluginVersionUpdate": { "type": "object", "properties": { From b11aad3812ceec64342e4117ed30848111021353 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:27:04 +0200 Subject: [PATCH 100/343] chore(main): Release v1.6.5 (#103) :robot: I have created a release *beep* *boop* --- ## [1.6.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.4...v1.6.5) (2024-01-18) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#102](https://github.com/cloudquery/cloudquery-api-go/issues/102)) ([10fd8e4](https://github.com/cloudquery/cloudquery-api-go/commit/10fd8e4a9f4f5867b8cb2af4a84400e967f8aa84)) * Generate CloudQuery Go API Client from `spec.json` ([#104](https://github.com/cloudquery/cloudquery-api-go/issues/104)) ([4849707](https://github.com/cloudquery/cloudquery-api-go/commit/48497073af826fa8480e3780341199e7d3d642ca)) * Generate CloudQuery Go API Client from `spec.json` ([#105](https://github.com/cloudquery/cloudquery-api-go/issues/105)) ([5f5b960](https://github.com/cloudquery/cloudquery-api-go/commit/5f5b9607ec97925331918e38aa5ba159c82267d7)) * Generate CloudQuery Go API Client from `spec.json` ([#106](https://github.com/cloudquery/cloudquery-api-go/issues/106)) ([753656a](https://github.com/cloudquery/cloudquery-api-go/commit/753656a8418fa2dd09d30e6f3610b4d69b87f6c5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4cb5d..c236ae8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [1.6.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.4...v1.6.5) (2024-01-18) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#102](https://github.com/cloudquery/cloudquery-api-go/issues/102)) ([10fd8e4](https://github.com/cloudquery/cloudquery-api-go/commit/10fd8e4a9f4f5867b8cb2af4a84400e967f8aa84)) +* Generate CloudQuery Go API Client from `spec.json` ([#104](https://github.com/cloudquery/cloudquery-api-go/issues/104)) ([4849707](https://github.com/cloudquery/cloudquery-api-go/commit/48497073af826fa8480e3780341199e7d3d642ca)) +* Generate CloudQuery Go API Client from `spec.json` ([#105](https://github.com/cloudquery/cloudquery-api-go/issues/105)) ([5f5b960](https://github.com/cloudquery/cloudquery-api-go/commit/5f5b9607ec97925331918e38aa5ba159c82267d7)) +* Generate CloudQuery Go API Client from `spec.json` ([#106](https://github.com/cloudquery/cloudquery-api-go/issues/106)) ([753656a](https://github.com/cloudquery/cloudquery-api-go/commit/753656a8418fa2dd09d30e6f3610b4d69b87f6c5)) + ## [1.6.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.3...v1.6.4) (2024-01-04) From 3e8e5331a7e6d661e4919828aa65e7a6a80fe524 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:51:34 +0200 Subject: [PATCH 101/343] fix: Generate CloudQuery Go API Client from `spec.json` (#107) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 77 +++++++++++++++---------------------------------------- 1 file changed, 20 insertions(+), 57 deletions(-) diff --git a/spec.json b/spec.json index 62f95bd..cc9b6b9 100644 --- a/spec.json +++ b/spec.json @@ -82,7 +82,6 @@ "operationId": "UploadImage", "parameters": [], "tags": [ - "uploads", "images" ], "responses": { @@ -499,7 +498,6 @@ "delete": { "description": "Delete plugin by team and plugin name", "operationId": "DeletePluginByTeamAndPluginName", - "x-internal": true, "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -532,7 +530,6 @@ } }, "tags": [ - "teams", "plugins" ] } @@ -2315,8 +2312,7 @@ } }, "tags": [ - "teams", - "users" + "teams" ] }, "post": { @@ -2582,9 +2578,7 @@ } }, "tags": [ - "teams", - "plugins", - "addons" + "teams" ] } }, @@ -2698,8 +2692,7 @@ } }, "tags": [ - "teams", - "plugins" + "teams" ] } }, @@ -2812,7 +2805,6 @@ } }, "tags": [ - "teams", "addons" ] } @@ -3031,8 +3023,7 @@ } }, "tags": [ - "teams", - "users" + "teams" ] } }, @@ -3069,8 +3060,7 @@ } }, "tags": [ - "teams", - "users" + "teams" ] } }, @@ -3128,9 +3118,7 @@ } }, "tags": [ - "teams", - "plugins", - "limits" + "teams" ] }, "post": { @@ -3178,9 +3166,7 @@ } }, "tags": [ - "teams", - "plugins", - "limits" + "teams" ] } }, @@ -3227,9 +3213,7 @@ } }, "tags": [ - "teams", - "plugins", - "limits" + "teams" ] }, "put": { @@ -3286,9 +3270,7 @@ } }, "tags": [ - "teams", - "plugins", - "limits" + "teams" ] }, "delete": { @@ -3326,9 +3308,7 @@ } }, "tags": [ - "teams", - "plugins", - "limits" + "teams" ] } }, @@ -3444,9 +3424,7 @@ } }, "tags": [ - "teams", - "plugins", - "usage" + "teams" ] }, "post": { @@ -3490,9 +3468,7 @@ } }, "tags": [ - "teams", - "plugins", - "usage" + "teams" ] } }, @@ -3539,9 +3515,7 @@ } }, "tags": [ - "teams", - "plugins", - "usage" + "teams" ] } }, @@ -3612,9 +3586,7 @@ } }, "tags": [ - "teams", - "plugins", - "usage" + "plugins" ] } }, @@ -3685,9 +3657,7 @@ } }, "tags": [ - "teams", - "addons", - "usage" + "addons" ] } }, @@ -3696,8 +3666,7 @@ "operationId": "ListTeamInvitations", "description": "List of open invitations to the team", "tags": [ - "teams", - "users" + "teams" ], "parameters": [ { @@ -3747,8 +3716,7 @@ "operationId": "EmailTeamInvitation", "description": "Invite a user to join a team with their email address", "tags": [ - "teams", - "users" + "teams" ], "parameters": [ { @@ -3812,8 +3780,7 @@ "operationId": "AcceptTeamInvitation", "description": "Accept an invitation to the team, creating a user membership", "tags": [ - "teams", - "users" + "teams" ], "parameters": [ { @@ -3874,8 +3841,7 @@ "operationId": "CancelTeamInvitation", "description": "Cancel an invitation to the team, preventing the user becoming a team member", "tags": [ - "teams", - "users" + "teams" ], "parameters": [ { @@ -4115,8 +4081,7 @@ } }, "tags": [ - "teams", - "users" + "teams" ] } }, @@ -4209,7 +4174,6 @@ "operationId": "ListCurrentUserInvitations", "description": "List of the current user's unaccepted invitations", "tags": [ - "teams", "users" ], "parameters": [ @@ -4309,7 +4273,6 @@ } }, "tags": [ - "teams", "users" ] } From bcf1462886b934c9cdb4754c37f45e48b1ba9d5d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:24:11 +0200 Subject: [PATCH 102/343] fix: Generate CloudQuery Go API Client from `spec.json` (#110) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 12 ++++ spec.json | 69 +++++++++++++++++- 3 files changed, 272 insertions(+), 1 deletion(-) diff --git a/client.gen.go b/client.gen.go index 6f566ee..fbe2726 100644 --- a/client.gen.go +++ b/client.gen.go @@ -388,6 +388,11 @@ type ClientInterface interface { UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSyncRunProgressWithBody request with any body + CreateSyncRunProgressWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSyncRunProgress(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamPluginUsage request ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1731,6 +1736,30 @@ func (c *Client) UpdateSyncRun(ctx context.Context, teamName TeamName, syncName return c.Client.Do(req) } +func (c *Client) CreateSyncRunProgressWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncRunProgressRequestWithBody(c.Server, teamName, syncName, syncRunId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncRunProgress(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncRunProgressRequest(c.Server, teamName, syncName, syncRunId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) if err != nil { @@ -6734,6 +6763,67 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return req, nil } +// NewCreateSyncRunProgressRequest calls the generic CreateSyncRunProgress builder with application/json body +func NewCreateSyncRunProgressRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncRunProgressRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) +} + +// NewCreateSyncRunProgressRequestWithBody generates requests for CreateSyncRunProgress with any type of body +func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/progress", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error @@ -7580,6 +7670,11 @@ type ClientWithResponsesInterface interface { UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + // CreateSyncRunProgressWithBodyWithResponse request with any body + CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) + + CreateSyncRunProgressWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) + // ListTeamPluginUsageWithResponse request ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) @@ -9791,6 +9886,32 @@ func (r UpdateSyncRunResponse) StatusCode() int { return 0 } +type CreateSyncRunProgressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncRunProgressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncRunProgressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response @@ -11012,6 +11133,23 @@ func (c *ClientWithResponses) UpdateSyncRunWithResponse(ctx context.Context, tea return ParseUpdateSyncRunResponse(rsp) } +// CreateSyncRunProgressWithBodyWithResponse request with arbitrary body returning *CreateSyncRunProgressResponse +func (c *ClientWithResponses) CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) { + rsp, err := c.CreateSyncRunProgressWithBody(ctx, teamName, syncName, syncRunId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncRunProgressResponse(rsp) +} + +func (c *ClientWithResponses) CreateSyncRunProgressWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) { + rsp, err := c.CreateSyncRunProgress(ctx, teamName, syncName, syncRunId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncRunProgressResponse(rsp) +} + // ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) @@ -15547,6 +15685,60 @@ func ParseUpdateSyncRunResponse(rsp *http.Response) (*UpdateSyncRunResponse, err return response, nil } +// ParseCreateSyncRunProgressResponse parses an HTTP response from a CreateSyncRunProgressWithResponse call +func ParseCreateSyncRunProgressResponse(rsp *http.Response) (*CreateSyncRunProgressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSyncRunProgressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamPluginUsageResponse parses an HTTP response from a ListTeamPluginUsageWithResponse call func ParseListTeamPluginUsageResponse(rsp *http.Response) (*ListTeamPluginUsageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index e7f9cc0..8f3ed55 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1159,6 +1159,9 @@ type SyncRun struct { // SyncName Name of the sync SyncName string `json:"sync_name"` + + // TotalRows Total number of rows in the sync + TotalRows int64 `json:"total_rows"` } // SyncRunID ID of the SyncRun @@ -1781,6 +1784,12 @@ type UpdateSyncRunJSONBody struct { Status *SyncRunStatus `json:"status,omitempty"` } +// CreateSyncRunProgressJSONBody defines parameters for CreateSyncRunProgress. +type CreateSyncRunProgressJSONBody struct { + // Rows Number of rows synced so far + Rows int64 `json:"rows"` +} + // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. type ListTeamPluginUsageParams struct { // Page Page number of the results to fetch @@ -1907,6 +1916,9 @@ type UpdateSyncJSONRequestBody UpdateSyncJSONBody // UpdateSyncRunJSONRequestBody defines body for UpdateSyncRun for application/json ContentType. type UpdateSyncRunJSONRequestBody UpdateSyncRunJSONBody +// CreateSyncRunProgressJSONRequestBody defines body for CreateSyncRunProgress for application/json ContentType. +type CreateSyncRunProgressJSONRequestBody CreateSyncRunProgressJSONBody + // IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease diff --git a/spec.json b/spec.json index cc9b6b9..b23c871 100644 --- a/spec.json +++ b/spec.json @@ -5042,6 +5042,67 @@ } } } + }, + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/progress": { + "post": { + "description": "Create a new sync run progress update.", + "operationId": "CreateSyncRunProgress", + "x-internal": true, + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + }, + { + "$ref": "#/components/parameters/sync_run_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "rows" + ], + "properties": { + "rows": { + "type": "integer", + "format": "int64", + "description": "Number of rows synced so far" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Progress was reported successfully" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } } }, "components": { @@ -7258,7 +7319,8 @@ "sync_name", "id", "status", - "started_at" + "started_at", + "total_rows" ], "properties": { "sync_name": { @@ -7287,6 +7349,11 @@ "format": "date-time", "type": "string", "description": "Cron schedule for the sync" + }, + "total_rows": { + "type": "integer", + "format": "int64", + "description": "Total number of rows in the sync" } } }, From f1bcc50c874ba18f66acc38a43a87ce8a4140cd7 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Tue, 23 Jan 2024 14:35:53 +0000 Subject: [PATCH 103/343] feat: Add Sync Run API Token Type (#109) --- auth/token.go | 11 +++++++++-- auth/token_test.go | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/auth/token.go b/auth/token.go index 4966427..2fd26b5 100644 --- a/auth/token.go +++ b/auth/token.go @@ -7,6 +7,7 @@ import ( "net/http" "net/url" "os" + "strings" "time" "github.com/cloudquery/cloudquery-api-go/config" @@ -18,6 +19,7 @@ const ( EnvVarCloudQueryAPIKey = "CLOUDQUERY_API_KEY" ExpiryBuffer = 60 * time.Second tokenFilePath = "cloudquery/token" + syncRunAPIKeyPrefix = "cqsr_" ) type tokenResponse struct { @@ -36,6 +38,7 @@ const ( Undefined TokenType = iota BearerToken APIKey + SyncRunAPIKey ) var UndefinedToken = Token{Type: Undefined, Value: ""} @@ -66,8 +69,9 @@ func NewTokenClient() *TokenClient { // GetToken returns the ID token // If CLOUDQUERY_API_KEY is set, it returns that value, otherwise it returns an ID token generated from the refresh token. func (tc *TokenClient) GetToken() (Token, error) { - if tc.GetTokenType() == APIKey { - return Token{Type: APIKey, Value: os.Getenv(EnvVarCloudQueryAPIKey)}, nil + tokenType := tc.GetTokenType() + if tokenType != BearerToken { + return Token{Type: tokenType, Value: os.Getenv(EnvVarCloudQueryAPIKey)}, nil } // If the token is not expired, return it @@ -104,6 +108,9 @@ func (tc *TokenClient) GetToken() (Token, error) { // GetTokenType returns the type of token that will be returned by GetToken func (tc *TokenClient) GetTokenType() TokenType { if token := os.Getenv(EnvVarCloudQueryAPIKey); token != "" { + if strings.HasPrefix(token, syncRunAPIKeyPrefix) { + return SyncRunAPIKey + } return APIKey } return BearerToken diff --git a/auth/token_test.go b/auth/token_test.go index dbc8e56..483d8cc 100644 --- a/auth/token_test.go +++ b/auth/token_test.go @@ -118,6 +118,14 @@ func TestTokenClient_APIKeyTokenType(t *testing.T) { assert.Equal(t, APIKey, tc.GetTokenType()) } +func TestTokenClient_SyncRunAPIKeyTokenType(t *testing.T) { + t.Setenv(EnvVarCloudQueryAPIKey, "cqsr_my_token") + + tc := NewTokenClient() + + assert.Equal(t, SyncRunAPIKey, tc.GetTokenType()) +} + func overrideEnvironmentVariable(t *testing.T, key, value string) func() { originalValue := os.Getenv(key) resetFn := func() { From b45ba19bfea7e77aed3dacd9416ef017e8642010 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:39:42 +0200 Subject: [PATCH 104/343] chore(main): Release v1.7.0 (#108) :robot: I have created a release *beep* *boop* --- ## [1.7.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.5...v1.7.0) (2024-01-23) ### Features * Add Sync Run API Token Type ([#109](https://github.com/cloudquery/cloudquery-api-go/issues/109)) ([f1bcc50](https://github.com/cloudquery/cloudquery-api-go/commit/f1bcc50c874ba18f66acc38a43a87ce8a4140cd7)) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#107](https://github.com/cloudquery/cloudquery-api-go/issues/107)) ([3e8e533](https://github.com/cloudquery/cloudquery-api-go/commit/3e8e5331a7e6d661e4919828aa65e7a6a80fe524)) * Generate CloudQuery Go API Client from `spec.json` ([#110](https://github.com/cloudquery/cloudquery-api-go/issues/110)) ([bcf1462](https://github.com/cloudquery/cloudquery-api-go/commit/bcf1462886b934c9cdb4754c37f45e48b1ba9d5d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c236ae8..d83cc49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.7.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.5...v1.7.0) (2024-01-23) + + +### Features + +* Add Sync Run API Token Type ([#109](https://github.com/cloudquery/cloudquery-api-go/issues/109)) ([f1bcc50](https://github.com/cloudquery/cloudquery-api-go/commit/f1bcc50c874ba18f66acc38a43a87ce8a4140cd7)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#107](https://github.com/cloudquery/cloudquery-api-go/issues/107)) ([3e8e533](https://github.com/cloudquery/cloudquery-api-go/commit/3e8e5331a7e6d661e4919828aa65e7a6a80fe524)) +* Generate CloudQuery Go API Client from `spec.json` ([#110](https://github.com/cloudquery/cloudquery-api-go/issues/110)) ([bcf1462](https://github.com/cloudquery/cloudquery-api-go/commit/bcf1462886b934c9cdb4754c37f45e48b1ba9d5d)) + ## [1.6.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.4...v1.6.5) (2024-01-18) From 5ac719bb0633c3c8d923a8227bd410ecff6a5b75 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:08:27 +0200 Subject: [PATCH 105/343] fix: Generate CloudQuery Go API Client from `spec.json` (#111) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++ spec.json | 69 +++++++++++++++++++++ 2 files changed, 232 insertions(+) diff --git a/client.gen.go b/client.gen.go index fbe2726..5df377e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -388,6 +388,9 @@ type ClientInterface interface { UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetSyncRunLogs request + GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSyncRunProgressWithBody request with any body CreateSyncRunProgressWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1736,6 +1739,18 @@ func (c *Client) UpdateSyncRun(ctx context.Context, teamName TeamName, syncName return c.Client.Do(req) } +func (c *Client) GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncRunLogsRequest(c.Server, teamName, syncName, syncRunId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreateSyncRunProgressWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateSyncRunProgressRequestWithBody(c.Server, teamName, syncName, syncRunId, contentType, body) if err != nil { @@ -6763,6 +6778,54 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return req, nil } +// NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs +func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/logs", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewCreateSyncRunProgressRequest calls the generic CreateSyncRunProgress builder with application/json body func NewCreateSyncRunProgressRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -7670,6 +7733,9 @@ type ClientWithResponsesInterface interface { UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + // GetSyncRunLogsWithResponse request + GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) + // CreateSyncRunProgressWithBodyWithResponse request with any body CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) @@ -9192,6 +9258,7 @@ type EmailTeamInvitationResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Invitation + JSON202 *Invitation JSON400 *BadRequest JSON403 *Forbidden JSON422 *UnprocessableEntity @@ -9886,6 +9953,32 @@ func (r UpdateSyncRunResponse) StatusCode() int { return 0 } +type GetSyncRunLogsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncRunLogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncRunLogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CreateSyncRunProgressResponse struct { Body []byte HTTPResponse *http.Response @@ -11133,6 +11226,15 @@ func (c *ClientWithResponses) UpdateSyncRunWithResponse(ctx context.Context, tea return ParseUpdateSyncRunResponse(rsp) } +// GetSyncRunLogsWithResponse request returning *GetSyncRunLogsResponse +func (c *ClientWithResponses) GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) { + rsp, err := c.GetSyncRunLogs(ctx, teamName, syncName, syncRunId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncRunLogsResponse(rsp) +} + // CreateSyncRunProgressWithBodyWithResponse request with arbitrary body returning *CreateSyncRunProgressResponse func (c *ClientWithResponses) CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) { rsp, err := c.CreateSyncRunProgressWithBody(ctx, teamName, syncName, syncRunId, contentType, body, reqEditors...) @@ -14274,6 +14376,13 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest Invitation + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON202 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15685,6 +15794,60 @@ func ParseUpdateSyncRunResponse(rsp *http.Response) (*UpdateSyncRunResponse, err return response, nil } +// ParseGetSyncRunLogsResponse parses an HTTP response from a GetSyncRunLogsWithResponse call +func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncRunLogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateSyncRunProgressResponse parses an HTTP response from a CreateSyncRunProgressWithResponse call func ParseCreateSyncRunProgressResponse(rsp *http.Response) (*CreateSyncRunProgressResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/spec.json b/spec.json index b23c871..950f623 100644 --- a/spec.json +++ b/spec.json @@ -3760,6 +3760,16 @@ } } }, + "202": { + "description": "Response, email failed to send", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invitation" + } + } + } + }, "400": { "$ref": "#/components/responses/BadRequest" }, @@ -5103,6 +5113,65 @@ } } } + }, + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/logs": { + "get": { + "description": "Get logs for a sync run.", + "operationId": "GetSyncRunLogs", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_name" + }, + { + "$ref": "#/components/parameters/sync_run_id" + } + ], + "responses": { + "200": { + "description": "Chunked response logs for a sync run that is in progress.", + "content": { + "text/plain": { + "schema": { + "type": "string", + "description": "A stream of logs for a sync run." + } + } + } + }, + "302": { + "description": "Redirect to the logs download URL for a sync run that has completed.", + "headers": { + "Location": { + "schema": { + "type": "string", + "description": "URL to download logs" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } } }, "components": { From 7267cc42921a60a6125aa6d1efa787ace164bd80 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:48:35 +0200 Subject: [PATCH 106/343] fix: Generate CloudQuery Go API Client from `spec.json` (#113) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 4280 ++++++++++++++++++++++++++++++++++--------------- models.gen.go | 332 +++- spec.json | 955 +++++++++-- 3 files changed, 4109 insertions(+), 1458 deletions(-) diff --git a/client.gen.go b/client.gen.go index 5df377e..cdd96fa 100644 --- a/client.gen.go +++ b/client.gen.go @@ -355,6 +355,44 @@ type ClientInterface interface { // GetSubscriptionOrderByTeam request GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncDestinations request + ListSyncDestinations(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSyncDestinationWithBody request with any body + CreateSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSyncDestination(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSyncDestination request + DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSyncDestination request + GetSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSyncDestinationWithBody request with any body + UpdateSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListSyncSources request + ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSyncSourceWithBody request with any body + CreateSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSyncSource(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSyncSource request + DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSyncSource request + GetSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSyncSourceWithBody request with any body + UpdateSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncs request ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1595,6 +1633,174 @@ func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamNa return c.Client.Do(req) } +func (c *Client) ListSyncDestinations(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSyncDestinationsRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncDestinationRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncDestination(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncDestinationRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSyncDestinationRequest(c.Server, teamName, syncDestinationName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncDestinationRequest(c.Server, teamName, syncDestinationName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncDestinationRequestWithBody(c.Server, teamName, syncDestinationName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncDestinationRequest(c.Server, teamName, syncDestinationName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSyncSourcesRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncSourceRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncSource(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncSourceRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSyncSourceRequest(c.Server, teamName, syncSourceName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncSourceRequest(c.Server, teamName, syncSourceName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncSourceRequestWithBody(c.Server, teamName, syncSourceName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncSourceRequest(c.Server, teamName, syncSourceName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSyncsRequest(c.Server, teamName, params) if err != nil { @@ -6294,8 +6500,8 @@ func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, team return req, nil } -// NewListSyncsRequest generates requests for ListSyncs -func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { +// NewListSyncDestinationsRequest generates requests for ListSyncDestinations +func NewListSyncDestinationsRequest(server string, teamName TeamName, params *ListSyncDestinationsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6310,7 +6516,7 @@ func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsPara return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6366,19 +6572,19 @@ func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsPara return req, nil } -// NewCreateSyncRequest calls the generic CreateSync builder with application/json body -func NewCreateSyncRequest(server string, teamName TeamName, body CreateSyncJSONRequestBody) (*http.Request, error) { +// NewCreateSyncDestinationRequest calls the generic CreateSyncDestination builder with application/json body +func NewCreateSyncDestinationRequest(server string, teamName TeamName, body CreateSyncDestinationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSyncRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreateSyncRequestWithBody generates requests for CreateSync with any type of body -func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSyncDestinationRequestWithBody generates requests for CreateSyncDestination with any type of body +func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6393,7 +6599,7 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6413,8 +6619,8 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return req, nil } -// NewDeleteSyncRequest generates requests for DeleteSync -func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewDeleteSyncDestinationRequest generates requests for DeleteSyncDestination +func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { var err error var pathParam0 string @@ -6426,7 +6632,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -6436,7 +6642,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6454,8 +6660,8 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return req, nil } -// NewGetSyncRequest generates requests for GetSync -func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewGetSyncDestinationRequest generates requests for GetSyncDestination +func NewGetSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { var err error var pathParam0 string @@ -6467,7 +6673,7 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -6477,7 +6683,7 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6495,19 +6701,19 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return req, nil } -// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body -func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncDestinationRequest calls the generic UpdateSyncDestination builder with application/json body +func NewUpdateSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) + return NewUpdateSyncDestinationRequestWithBody(server, teamName, syncDestinationName, "application/json", bodyReader) } -// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body -func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncDestinationRequestWithBody generates requests for UpdateSyncDestination with any type of body +func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6519,7 +6725,7 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -6529,7 +6735,7 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6549,8 +6755,8 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return req, nil } -// NewListSyncRunsRequest generates requests for ListSyncRuns -func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { +// NewListSyncSourcesRequest generates requests for ListSyncSources +func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyncSourcesParams) (*http.Request, error) { var err error var pathParam0 string @@ -6560,19 +6766,12 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6628,20 +6827,24 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, return req, nil } -// NewCreateSyncRunRequest generates requests for CreateSyncRun -func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewCreateSyncSourceRequest calls the generic CreateSyncSource builder with application/json body +func NewCreateSyncSourceRequest(server string, teamName TeamName, body CreateSyncSourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewCreateSyncSourceRequestWithBody generates requests for CreateSyncSource with any type of body +func NewCreateSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -6651,7 +6854,7 @@ func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6661,16 +6864,18 @@ func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetSyncRunRequest generates requests for GetSyncRun -func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { +// NewDeleteSyncSourceRequest generates requests for DeleteSyncSource +func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { var err error var pathParam0 string @@ -6682,14 +6887,7 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) if err != nil { return nil, err } @@ -6699,7 +6897,7 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6709,7 +6907,7 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -6717,19 +6915,8 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s return req, nil } -// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body -func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) -} - -// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body -func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { +// NewGetSyncSourceRequest generates requests for GetSyncSource +func NewGetSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { var err error var pathParam0 string @@ -6741,14 +6928,7 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) if err != nil { return nil, err } @@ -6758,7 +6938,7 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6768,77 +6948,27 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs -func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/logs", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateSyncRunProgressRequest calls the generic CreateSyncRunProgress builder with application/json body -func NewCreateSyncRunProgressRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncSourceRequest calls the generic UpdateSyncSource builder with application/json body +func NewUpdateSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSyncRunProgressRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) + return NewUpdateSyncSourceRequestWithBody(server, teamName, syncSourceName, "application/json", bodyReader) } -// NewCreateSyncRunProgressRequestWithBody generates requests for CreateSyncRunProgress with any type of body -func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncSourceRequestWithBody generates requests for UpdateSyncSource with any type of body +func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6850,14 +6980,7 @@ func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, s var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) if err != nil { return nil, err } @@ -6867,7 +6990,7 @@ func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, s return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/progress", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6877,7 +7000,7 @@ func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, s return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -6887,8 +7010,8 @@ func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, s return req, nil } -// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage -func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { +// NewListSyncsRequest generates requests for ListSyncs +func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6903,7 +7026,7 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6916,9 +7039,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6932,9 +7055,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis } - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6959,19 +7082,19 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body -func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { +// NewCreateSyncRequest calls the generic CreateSync builder with application/json body +func NewCreateSyncRequest(server string, teamName TeamName, body CreateSyncJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateSyncRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body -func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSyncRequestWithBody generates requests for CreateSync with any type of body +func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6986,7 +7109,7 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7006,8 +7129,8 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return req, nil } -// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage -func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewDeleteSyncRequest generates requests for DeleteSync +func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -7019,21 +7142,48 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } - var pathParam2 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + return req, nil +} + +// NewGetSyncRequest generates requests for GetSync +func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } @@ -7043,7 +7193,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7061,8 +7211,19 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return req, nil } -// NewListUsersByTeamRequest generates requests for ListUsersByTeam -func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { +// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body +func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) +} + +// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body +func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7072,12 +7233,62 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListSyncRunsRequest generates requests for ListSyncRuns +func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7133,16 +7344,30 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return req, nil } -// NewUploadImageRequest generates requests for UploadImage -func NewUploadImageRequest(server string) (*http.Request, error) { +// NewCreateSyncRunRequest generates requests for CreateSyncRun +func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/upload/image") + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7160,16 +7385,37 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return req, nil } -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { +// NewGetSyncRunRequest generates requests for GetSyncRun +func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7187,28 +7433,49 @@ func NewGetCurrentUserRequest(server string) (*http.Request, error) { return req, nil } -// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body -func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body +func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) + return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) } -// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body -func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body +func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") - if operationPath[0] == '/' { + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7227,16 +7494,37 @@ func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body return req, nil } -// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations -func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { +// NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs +func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/invitations") + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/logs", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7246,62 +7534,92 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.Page != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// NewCreateSyncRunProgressRequest calls the generic CreateSyncRunProgress builder with application/json body +func NewCreateSyncRunProgressRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncRunProgressRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) +} - } +// NewCreateSyncRunProgressRequestWithBody generates requests for CreateSyncRunProgress with any type of body +func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { + var err error - if params.PerPage != nil { + var pathParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - } + var pathParam1 string - queryURL.RawQuery = queryValues.Encode() + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/progress", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships -func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/memberships") + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7357,13 +7675,24 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return req, nil } -// NewDeleteUserRequest generates requests for DeleteUser -func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -7373,7 +7702,7 @@ func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/users/%s", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7383,355 +7712,780 @@ func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} +// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage +func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} + var pathParam0 string -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err } -} -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // HealthCheckWithResponse request - HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) + var pathParam2 string - // ListAddonsWithResponse request - ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } - // CreateAddonWithBodyWithResponse request with any body - CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + var pathParam3 string - CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } - // DeleteAddonByTeamAndNameWithResponse request - DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // GetAddonWithResponse request - GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) + operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // UpdateAddonWithBodyWithResponse request with any body - UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // ListAddonVersionsWithResponse request - ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) + return req, nil +} - // GetAddonVersionWithResponse request - GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) - - // UpdateAddonVersionWithBodyWithResponse request with any body - UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) +// NewListUsersByTeamRequest generates requests for ListUsersByTeam +func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { + var err error - UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + var pathParam0 string - // CreateAddonVersionWithBodyWithResponse request with any body - CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // DownloadAddonAssetWithResponse request - DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // UploadAddonAssetWithResponse request - UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ListPluginNotificationRequestsWithResponse request - ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) + if params != nil { + queryValues := queryURL.Query() - // CreatePluginNotificationRequestWithBodyWithResponse request with any body - CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + if params.PerPage != nil { - CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // DeletePluginNotificationRequestWithResponse request - DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) + } - // GetPluginNotificationRequestWithResponse request - GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) + if params.Page != nil { - // ListPluginsWithResponse request - ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // CreatePluginWithBodyWithResponse request with any body - CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + } - CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // DeletePluginByTeamAndPluginNameWithResponse request - DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // GetPluginWithResponse request - GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + return req, nil +} - // UpdatePluginWithBodyWithResponse request with any body - UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) +// NewUploadImageRequest generates requests for UploadImage +func NewUploadImageRequest(server string) (*http.Request, error) { + var err error - UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // DeletePluginUpcomingPriceChangesWithResponse request - DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) + operationPath := fmt.Sprintf("/upload/image") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListPluginUpcomingPriceChangesWithResponse request - ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body - CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } - CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + return req, nil +} - // ListPluginVersionsWithResponse request - ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error - // GetPluginVersionWithResponse request - GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // UpdatePluginVersionWithBodyWithResponse request with any body - UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + return req, nil +} - // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) +} - // UploadPluginAssetWithResponse request - UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - // DeletePluginVersionDocsWithBodyWithResponse request with any body - DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListPluginVersionDocsWithResponse request - ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ReplacePluginVersionDocsWithBodyWithResponse request with any body - ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + req.Header.Add("Content-Type", contentType) - // CreatePluginVersionDocsWithBodyWithResponse request with any body - CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + return req, nil +} - CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) +// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations +func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { + var err error - // DeletePluginVersionTablesWithBodyWithResponse request with any body - DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + operationPath := fmt.Sprintf("/user/invitations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListPluginVersionTablesWithResponse request - ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreatePluginVersionTablesWithBodyWithResponse request with any body - CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + if params != nil { + queryValues := queryURL.Query() - CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + if params.Page != nil { - // GetPluginVersionTableWithResponse request - GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // AuthRegistryRequestWithResponse request - AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + } - // ListTeamsWithResponse request - ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + if params.PerPage != nil { - // CreateTeamWithBodyWithResponse request with any body - CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + } - // DeleteTeamWithResponse request - DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) - - // GetTeamByNameWithResponse request - GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // UpdateTeamWithBodyWithResponse request with any body - UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + return req, nil +} - // ListAddonOrdersByTeamWithResponse request - ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) +// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships +func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { + var err error - // CreateAddonOrderForTeamWithBodyWithResponse request with any body - CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + operationPath := fmt.Sprintf("/user/memberships") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // GetAddonOrderByTeamWithResponse request - GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // DeleteAddonsByTeamWithResponse request - DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) + if params != nil { + queryValues := queryURL.Query() - // ListAddonsByTeamWithResponse request - ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + if params.Page != nil { - // DownloadAddonAssetByTeamWithResponse request - DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // ListTeamAPIKeysWithResponse request - ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + } - // CreateTeamAPIKeyWithBodyWithResponse request with any body - CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + if params.PerPage != nil { - CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + } - // CreateTeamImagesWithBodyWithResponse request with any body - CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // ListTeamInvitationsWithResponse request - ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + return req, nil +} - // EmailTeamInvitationWithBodyWithResponse request with any body - EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) +// NewDeleteUserRequest generates requests for DeleteUser +func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { + var err error - EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + var pathParam0 string - // AcceptTeamInvitationWithBodyWithResponse request with any body - AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } - AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CancelTeamInvitationWithResponse request - CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + operationPath := fmt.Sprintf("/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListInvoicesByTeamWithResponse request - ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // GetTeamMembershipsWithResponse request - GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - // DeleteTeamMembershipWithResponse request - DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) + return req, nil +} - // ListMonthlyLimitsByTeamWithResponse request - ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} - // CreateMonthlyLimitWithBodyWithResponse request with any body - CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} - CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} - // DeleteMonthlyLimitWithResponse request - DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} - // GetMonthlyLimitWithResponse request - GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // HealthCheckWithResponse request + HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - // UpdateMonthlyLimitWithBodyWithResponse request with any body - UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + // ListAddonsWithResponse request + ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) - UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + // CreateAddonWithBodyWithResponse request with any body + CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - // DeletePluginsByTeamWithResponse request - DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - // ListPluginsByTeamWithResponse request - ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + // DeleteAddonByTeamAndNameWithResponse request + DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) - // DownloadPluginAssetByTeamWithResponse request - DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + // GetAddonWithResponse request + GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) - // ListSubscriptionOrdersByTeamWithResponse request - ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) + // UpdateAddonWithBodyWithResponse request with any body + UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body - CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + // ListAddonVersionsWithResponse request + ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) - // GetSubscriptionOrderByTeamWithResponse request - GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + // GetAddonVersionWithResponse request + GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) - // ListSyncsWithResponse request - ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) + // UpdateAddonVersionWithBodyWithResponse request with any body + UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - // CreateSyncWithBodyWithResponse request with any body - CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + // CreateAddonVersionWithBodyWithResponse request with any body + CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - // DeleteSyncWithResponse request - DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) + CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - // GetSyncWithResponse request - GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) + // DownloadAddonAssetWithResponse request + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) - // UpdateSyncWithBodyWithResponse request with any body - UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + // UploadAddonAssetWithResponse request + UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) - UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + // ListPluginNotificationRequestsWithResponse request + ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) - // ListSyncRunsWithResponse request - ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) + // CreatePluginNotificationRequestWithBodyWithResponse request with any body + CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - // CreateSyncRunWithResponse request - CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) + CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - // GetSyncRunWithResponse request - GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) + // DeletePluginNotificationRequestWithResponse request + DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) - // UpdateSyncRunWithBodyWithResponse request with any body - UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + // GetPluginNotificationRequestWithResponse request + GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) - UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + // ListPluginsWithResponse request + ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + + // CreatePluginWithBodyWithResponse request with any body + CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + // DeletePluginByTeamAndPluginNameWithResponse request + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + + // GetPluginWithResponse request + GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + + // UpdatePluginWithBodyWithResponse request with any body + UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + // DeletePluginUpcomingPriceChangesWithResponse request + DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) + + // ListPluginUpcomingPriceChangesWithResponse request + ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) + + // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body + CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + + CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + + // ListPluginVersionsWithResponse request + ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + + // GetPluginVersionWithResponse request + GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + + // UpdatePluginVersionWithBodyWithResponse request with any body + UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + // CreatePluginVersionWithBodyWithResponse request with any body + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + // DownloadPluginAssetWithResponse request + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + + // UploadPluginAssetWithResponse request + UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + + // DeletePluginVersionDocsWithBodyWithResponse request with any body + DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + // ListPluginVersionDocsWithResponse request + ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + + // ReplacePluginVersionDocsWithBodyWithResponse request with any body + ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + + ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + + // CreatePluginVersionDocsWithBodyWithResponse request with any body + CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + // DeletePluginVersionTablesWithBodyWithResponse request with any body + DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + // ListPluginVersionTablesWithResponse request + ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + + // CreatePluginVersionTablesWithBodyWithResponse request with any body + CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + // GetPluginVersionTableWithResponse request + GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + + // AuthRegistryRequestWithResponse request + AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + + // ListTeamsWithResponse request + ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + + // CreateTeamWithBodyWithResponse request with any body + CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + // DeleteTeamWithResponse request + DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) + + // GetTeamByNameWithResponse request + GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + + // UpdateTeamWithBodyWithResponse request with any body + UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + // ListAddonOrdersByTeamWithResponse request + ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + + // CreateAddonOrderForTeamWithBodyWithResponse request with any body + CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + // GetAddonOrderByTeamWithResponse request + GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + + // DeleteAddonsByTeamWithResponse request + DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) + + // ListAddonsByTeamWithResponse request + ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + + // DownloadAddonAssetByTeamWithResponse request + DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + + // ListTeamAPIKeysWithResponse request + ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + + // CreateTeamAPIKeyWithBodyWithResponse request with any body + CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + // DeleteTeamAPIKeyWithResponse request + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + + // CreateTeamImagesWithBodyWithResponse request with any body + CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + + CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + + // ListTeamInvitationsWithResponse request + ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + + // EmailTeamInvitationWithBodyWithResponse request with any body + EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + // AcceptTeamInvitationWithBodyWithResponse request with any body + AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + // CancelTeamInvitationWithResponse request + CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + + // ListInvoicesByTeamWithResponse request + ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + + // GetTeamMembershipsWithResponse request + GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + + // DeleteTeamMembershipWithResponse request + DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) + + // ListMonthlyLimitsByTeamWithResponse request + ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) + + // CreateMonthlyLimitWithBodyWithResponse request with any body + CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + + // DeleteMonthlyLimitWithResponse request + DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) + + // GetMonthlyLimitWithResponse request + GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) + + // UpdateMonthlyLimitWithBodyWithResponse request with any body + UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + + UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + + // ListPluginsByTeamWithResponse request + ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + + // DownloadPluginAssetByTeamWithResponse request + DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + + // ListSubscriptionOrdersByTeamWithResponse request + ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) + + // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body + CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + // GetSubscriptionOrderByTeamWithResponse request + GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + + // ListSyncDestinationsWithResponse request + ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) + + // CreateSyncDestinationWithBodyWithResponse request with any body + CreateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) + + CreateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) + + // DeleteSyncDestinationWithResponse request + DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) + + // GetSyncDestinationWithResponse request + GetSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*GetSyncDestinationResponse, error) + + // UpdateSyncDestinationWithBodyWithResponse request with any body + UpdateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + + UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + + // ListSyncSourcesWithResponse request + ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) + + // CreateSyncSourceWithBodyWithResponse request with any body + CreateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) + + CreateSyncSourceWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) + + // DeleteSyncSourceWithResponse request + DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) + + // GetSyncSourceWithResponse request + GetSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*GetSyncSourceResponse, error) + + // UpdateSyncSourceWithBodyWithResponse request with any body + UpdateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + + UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + + // ListSyncsWithResponse request + ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) + + // CreateSyncWithBodyWithResponse request with any body + CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + + CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + + // DeleteSyncWithResponse request + DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) + + // GetSyncWithResponse request + GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) + + // UpdateSyncWithBodyWithResponse request with any body + UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + + UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + + // ListSyncRunsWithResponse request + ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) + + // CreateSyncRunWithResponse request + CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) + + // GetSyncRunWithResponse request + GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) + + // UpdateSyncRunWithBodyWithResponse request with any body + UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + + UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) // GetSyncRunLogsWithResponse request GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) @@ -9715,12 +10469,12 @@ func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { return 0 } -type ListSyncsResponse struct { +type ListSyncDestinationsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []Sync `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []SyncDestination `json:"items"` + Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication JSON404 *NotFound @@ -9728,7 +10482,269 @@ type ListSyncsResponse struct { } // Status returns HTTPResponse.Status -func (r ListSyncsResponse) Status() string { +func (r ListSyncDestinationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSyncDestinationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSyncDestinationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncDestination + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncDestinationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncDestinationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteSyncDestinationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteSyncDestinationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSyncDestinationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncDestinationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncDestination + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncDestinationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncDestinationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncDestinationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncDestination + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncDestinationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncDestinationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSyncSourcesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []SyncSource `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSyncSourcesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSyncSourcesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncSource + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncSource + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncSource + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSyncsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []Sync `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSyncsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11121,70 +12137,192 @@ func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context return ParseGetSubscriptionOrderByTeamResponse(rsp) } -// ListSyncsWithResponse request returning *ListSyncsResponse -func (c *ClientWithResponses) ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) { - rsp, err := c.ListSyncs(ctx, teamName, params, reqEditors...) +// ListSyncDestinationsWithResponse request returning *ListSyncDestinationsResponse +func (c *ClientWithResponses) ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) { + rsp, err := c.ListSyncDestinations(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseListSyncsResponse(rsp) + return ParseListSyncDestinationsResponse(rsp) } -// CreateSyncWithBodyWithResponse request with arbitrary body returning *CreateSyncResponse -func (c *ClientWithResponses) CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { - rsp, err := c.CreateSyncWithBody(ctx, teamName, contentType, body, reqEditors...) +// CreateSyncDestinationWithBodyWithResponse request with arbitrary body returning *CreateSyncDestinationResponse +func (c *ClientWithResponses) CreateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) { + rsp, err := c.CreateSyncDestinationWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateSyncResponse(rsp) + return ParseCreateSyncDestinationResponse(rsp) } -func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { - rsp, err := c.CreateSync(ctx, teamName, body, reqEditors...) +func (c *ClientWithResponses) CreateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) { + rsp, err := c.CreateSyncDestination(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateSyncResponse(rsp) + return ParseCreateSyncDestinationResponse(rsp) } -// DeleteSyncWithResponse request returning *DeleteSyncResponse -func (c *ClientWithResponses) DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) { - rsp, err := c.DeleteSync(ctx, teamName, syncName, reqEditors...) +// DeleteSyncDestinationWithResponse request returning *DeleteSyncDestinationResponse +func (c *ClientWithResponses) DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) { + rsp, err := c.DeleteSyncDestination(ctx, teamName, syncDestinationName, reqEditors...) if err != nil { return nil, err } - return ParseDeleteSyncResponse(rsp) + return ParseDeleteSyncDestinationResponse(rsp) } -// GetSyncWithResponse request returning *GetSyncResponse -func (c *ClientWithResponses) GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) { - rsp, err := c.GetSync(ctx, teamName, syncName, reqEditors...) +// GetSyncDestinationWithResponse request returning *GetSyncDestinationResponse +func (c *ClientWithResponses) GetSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*GetSyncDestinationResponse, error) { + rsp, err := c.GetSyncDestination(ctx, teamName, syncDestinationName, reqEditors...) if err != nil { return nil, err } - return ParseGetSyncResponse(rsp) + return ParseGetSyncDestinationResponse(rsp) } -// UpdateSyncWithBodyWithResponse request with arbitrary body returning *UpdateSyncResponse -func (c *ClientWithResponses) UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { - rsp, err := c.UpdateSyncWithBody(ctx, teamName, syncName, contentType, body, reqEditors...) +// UpdateSyncDestinationWithBodyWithResponse request with arbitrary body returning *UpdateSyncDestinationResponse +func (c *ClientWithResponses) UpdateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) { + rsp, err := c.UpdateSyncDestinationWithBody(ctx, teamName, syncDestinationName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateSyncResponse(rsp) + return ParseUpdateSyncDestinationResponse(rsp) } -func (c *ClientWithResponses) UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { - rsp, err := c.UpdateSync(ctx, teamName, syncName, body, reqEditors...) +func (c *ClientWithResponses) UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) { + rsp, err := c.UpdateSyncDestination(ctx, teamName, syncDestinationName, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateSyncResponse(rsp) + return ParseUpdateSyncDestinationResponse(rsp) } -// ListSyncRunsWithResponse request returning *ListSyncRunsResponse -func (c *ClientWithResponses) ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) { - rsp, err := c.ListSyncRuns(ctx, teamName, syncName, params, reqEditors...) +// ListSyncSourcesWithResponse request returning *ListSyncSourcesResponse +func (c *ClientWithResponses) ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) { + rsp, err := c.ListSyncSources(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSyncSourcesResponse(rsp) +} + +// CreateSyncSourceWithBodyWithResponse request with arbitrary body returning *CreateSyncSourceResponse +func (c *ClientWithResponses) CreateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) { + rsp, err := c.CreateSyncSourceWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncSourceResponse(rsp) +} + +func (c *ClientWithResponses) CreateSyncSourceWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) { + rsp, err := c.CreateSyncSource(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncSourceResponse(rsp) +} + +// DeleteSyncSourceWithResponse request returning *DeleteSyncSourceResponse +func (c *ClientWithResponses) DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) { + rsp, err := c.DeleteSyncSource(ctx, teamName, syncSourceName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSyncSourceResponse(rsp) +} + +// GetSyncSourceWithResponse request returning *GetSyncSourceResponse +func (c *ClientWithResponses) GetSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*GetSyncSourceResponse, error) { + rsp, err := c.GetSyncSource(ctx, teamName, syncSourceName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncSourceResponse(rsp) +} + +// UpdateSyncSourceWithBodyWithResponse request with arbitrary body returning *UpdateSyncSourceResponse +func (c *ClientWithResponses) UpdateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) { + rsp, err := c.UpdateSyncSourceWithBody(ctx, teamName, syncSourceName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncSourceResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) { + rsp, err := c.UpdateSyncSource(ctx, teamName, syncSourceName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncSourceResponse(rsp) +} + +// ListSyncsWithResponse request returning *ListSyncsResponse +func (c *ClientWithResponses) ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) { + rsp, err := c.ListSyncs(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSyncsResponse(rsp) +} + +// CreateSyncWithBodyWithResponse request with arbitrary body returning *CreateSyncResponse +func (c *ClientWithResponses) CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { + rsp, err := c.CreateSyncWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncResponse(rsp) +} + +func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { + rsp, err := c.CreateSync(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncResponse(rsp) +} + +// DeleteSyncWithResponse request returning *DeleteSyncResponse +func (c *ClientWithResponses) DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) { + rsp, err := c.DeleteSync(ctx, teamName, syncName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSyncResponse(rsp) +} + +// GetSyncWithResponse request returning *GetSyncResponse +func (c *ClientWithResponses) GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) { + rsp, err := c.GetSync(ctx, teamName, syncName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncResponse(rsp) +} + +// UpdateSyncWithBodyWithResponse request with arbitrary body returning *UpdateSyncResponse +func (c *ClientWithResponses) UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { + rsp, err := c.UpdateSyncWithBody(ctx, teamName, syncName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { + rsp, err := c.UpdateSync(ctx, teamName, syncName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncResponse(rsp) +} + +// ListSyncRunsWithResponse request returning *ListSyncRunsResponse +func (c *ClientWithResponses) ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) { + rsp, err := c.ListSyncRuns(ctx, teamName, syncName, params, reqEditors...) if err != nil { return nil, err } @@ -11331,73 +12469,447 @@ func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, return ParseUpdateCurrentUserResponse(rsp) } -// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse -func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { - rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListCurrentUserInvitationsResponse(rsp) -} +// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse +func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { + rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCurrentUserInvitationsResponse(rsp) +} + +// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse +func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { + rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserMembershipsResponse(rsp) +} + +// DeleteUserWithResponse request returning *DeleteUserResponse +func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { + rsp, err := c.DeleteUser(ctx, userID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteUserResponse(rsp) +} + +// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call +func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &HealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call +func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []ListAddon `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call +func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call +func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAddonByTeamAndNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call +func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call +func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call +func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []AddonVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse -func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { - rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) - if err != nil { - return nil, err } - return ParseGetCurrentUserMembershipsResponse(rsp) -} -// DeleteUserWithResponse request returning *DeleteUserResponse -func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { - rsp, err := c.DeleteUser(ctx, userID, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteUserResponse(rsp) + return response, nil } -// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call -func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { +// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call +func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &HealthCheckResponse{ + response := &GetAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } -// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call -func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { +// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call +func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsResponse{ + response := &UpdateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []ListAddon `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11405,6 +12917,20 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11417,22 +12943,29 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { return response, nil } -// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call -func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { +// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call +func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonResponse{ + response := &CreateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Addon + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11445,6 +12978,13 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11452,12 +12992,12 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11471,26 +13011,26 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) return response, nil } -// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call -func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { +// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call +func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonByTeamAndNameResponse{ + response := &DownloadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11513,6 +13053,13 @@ func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTe } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11525,26 +13072,26 @@ func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTe return response, nil } -// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call -func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { +// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call +func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonResponse{ + response := &UploadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11553,12 +13100,12 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11572,27 +13119,70 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { return response, nil } -// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call -func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { +// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call +func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAddonResponse{ + response := &ListPluginNotificationRequestsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon + var dest struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call +func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginNotificationRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11600,6 +13190,13 @@ func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11633,43 +13230,26 @@ func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) return response, nil } -// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call -func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { +// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call +func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonVersionsResponse{ + response := &DeletePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []AddonVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -11690,22 +13270,25 @@ func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsRespo return response, nil } -// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call -func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { +// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call +func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonVersionResponse{ + response := &GetPluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion + var dest struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11718,13 +13301,6 @@ func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11744,33 +13320,29 @@ func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, return response, nil } -// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call -func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { +// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call +func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAddonVersionResponse{ + response := &ListPluginsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + var dest struct { + Items []ListPlugin `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11779,20 +13351,6 @@ func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11805,29 +13363,22 @@ func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionRes return response, nil } -// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call -func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { +// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call +func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonVersionResponse{ + response := &CreatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonVersion + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11840,13 +13391,6 @@ func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionRes } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11854,12 +13398,12 @@ func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionRes } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11873,26 +13417,26 @@ func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionRes return response, nil } -// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call -func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { +// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call +func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetResponse{ + response := &DeletePluginByTeamAndPluginNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11915,13 +13459,6 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11934,26 +13471,26 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes return response, nil } -// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call -func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { +// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call +func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadAddonAssetResponse{ + response := &GetPluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -11962,12 +13499,12 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -11981,36 +13518,54 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons return response, nil } -// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call -func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { +// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call +func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginNotificationRequestsResponse{ + response := &UpdatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginNotificationRequest `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12024,34 +13579,20 @@ func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPlugi return response, nil } -// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call -func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { +// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call +func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginNotificationRequestResponse{ + response := &DeletePluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginNotificationRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12073,13 +13614,6 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12092,20 +13626,30 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call -func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { +// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call +func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginNotificationRequestResponse{ + response := &ListPluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []PluginPrice `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12113,6 +13657,13 @@ func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePl } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12132,29 +13683,26 @@ func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePl return response, nil } -// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call -func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { +// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call +func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginNotificationRequestResponse{ + response := &CreatePluginUpcomingPriceChangeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginNotificationRequest `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginPrice if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12163,6 +13711,13 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12170,6 +13725,13 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12182,15 +13744,15 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo return response, nil } -// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call -func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { +// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call +func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsResponse{ + response := &ListPluginVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -12198,8 +13760,8 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []ListPlugin `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []PluginVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -12211,7 +13773,21 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12225,33 +13801,33 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) return response, nil } -// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call -func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { +// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call +func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginResponse{ + response := &GetPluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Plugin + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersionDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -12260,12 +13836,12 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12279,20 +13855,27 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error return response, nil } -// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call -func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { +// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call +func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginByTeamAndPluginNameResponse{ + response := &UpdatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12307,13 +13890,6 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12333,27 +13909,41 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl return response, nil } -// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call -func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { +// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call +func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginResponse{ + response := &CreatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12361,12 +13951,12 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12380,40 +13970,33 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { return response, nil } -// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call -func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { +// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call +func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginResponse{ + response := &DownloadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -12422,12 +14005,12 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12441,20 +14024,27 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error return response, nil } -// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call -func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { +// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call +func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginUpcomingPriceChangesResponse{ + response := &UploadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12469,13 +14059,6 @@ func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeleteP } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12488,29 +14071,26 @@ func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeleteP return response, nil } -// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call -func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { +// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call +func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginUpcomingPriceChangesResponse{ + response := &DeletePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginPrice `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12533,6 +14113,13 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12545,26 +14132,29 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi return response, nil } -// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call -func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { +// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call +func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginUpcomingPriceChangeResponse{ + response := &ListPluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginPrice + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []PluginDocsPage `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12573,13 +14163,6 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12587,13 +14170,6 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12606,29 +14182,35 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call -func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { +// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call +func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionsResponse{ + response := &ReplacePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: var dest struct { - Items []PluginVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` + Names *[]PluginDocsPageName `json:"names,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12651,6 +14233,13 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12663,26 +14252,35 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes return response, nil } -// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call -func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { +// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call +func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionResponse{ + response := &CreatePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersionDetails + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12705,6 +14303,13 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12717,27 +14322,20 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons return response, nil } -// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call -func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { +// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call +func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginVersionResponse{ + response := &DeletePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12752,6 +14350,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12759,6 +14364,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12771,40 +14383,29 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR return response, nil } -// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call -func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { +// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call +func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionResponse{ + response := &ListPluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + var dest struct { + Items []PluginTable `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12813,12 +14414,12 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12832,26 +14433,35 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR return response, nil } -// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call -func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { +// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call +func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetResponse{ + response := &CreatePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Names *[]PluginTableName `json:"names,omitempty"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12860,6 +14470,13 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12867,12 +14484,12 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12886,26 +14503,26 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR return response, nil } -// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call -func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { +// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call +func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadPluginAssetResponse{ + response := &GetPluginVersionTableResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginTableDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -12914,12 +14531,12 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -12933,57 +14550,57 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo return response, nil } -// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call -func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionDocsResponse{ + response := &AuthRegistryRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RegistryAuthToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12994,15 +14611,15 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers return response, nil } -// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call -func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { +// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call +func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionDocsResponse{ + response := &ListTeamsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -13010,8 +14627,8 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []PluginDocsPage `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []Team `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -13025,6 +14642,13 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13044,24 +14668,22 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD return response, nil } -// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call -func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { +// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call +func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ReplacePluginVersionDocsResponse{ + response := &CreateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13081,20 +14703,6 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13114,29 +14722,20 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe return response, nil } -// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call -func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { +// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call +func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionDocsResponse{ + response := &DeleteTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13184,20 +14783,27 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers return response, nil } -// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call -func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { +// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call +func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionTablesResponse{ + response := &GetTeamByNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13226,13 +14832,6 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13245,30 +14844,34 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe return response, nil } -// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call -func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionTablesResponse{ + response := &UpdateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginTable `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13276,6 +14879,13 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13295,35 +14905,29 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio return response, nil } -// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call -func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { +// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call +func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionTablesResponse{ + response := &ListAddonOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Names *[]PluginTableName `json:"names,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + Items []AddonOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -13346,13 +14950,6 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13365,26 +14962,33 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe return response, nil } -// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call -func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { +// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call +func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionTableResponse{ + response := &CreateAddonOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginTableDetails + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -13412,57 +15016,50 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } -// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call -func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { +// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call +func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthRegistryRequestResponse{ + response := &GetAddonOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RegistryAuthToken + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest DockerError + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DockerError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest DockerError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest DockerError + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13473,29 +15070,26 @@ func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestR return response, nil } -// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call -func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { +// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call +func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamsResponse{ + response := &DeleteAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Team `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -13530,33 +15124,29 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { return response, nil } -// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call -func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { +// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call +func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamResponse{ + response := &ListAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Team - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []Addon `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -13565,12 +15155,19 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13584,26 +15181,26 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { return response, nil } -// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call -func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { +// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call +func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamResponse{ + response := &DownloadAddonAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -13626,12 +15223,12 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13645,33 +15242,29 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { return response, nil } -// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call -func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamByNameResponse{ + response := &ListTeamAPIKeysResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + var dest struct { + Items []APIKey `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -13680,13 +15273,6 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13706,26 +15292,26 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } -// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call -func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateTeamResponse{ + response := &CreateTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest APIKey if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -13741,19 +15327,12 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13767,29 +15346,26 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } -// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call -func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonOrdersByTeamResponse{ + response := &DeleteTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []AddonOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -13798,13 +15374,6 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13824,40 +15393,43 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT return response, nil } -// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call -func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { +// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call +func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonOrderForTeamResponse{ + response := &CreateTeamImagesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonOrder + var dest struct { + Items []TeamImage `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -13878,33 +15450,29 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder return response, nil } -// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call -func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { +// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call +func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonOrderByTeamResponse{ + response := &ListTeamInvitationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonOrder - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err + var dest struct { + Items []Invitation `json:"items"` + Metadata ListMetadata `json:"metadata"` } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -13913,13 +15481,6 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13932,33 +15493,40 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR return response, nil } -// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call -func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { +// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call +func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonsByTeamResponse{ + response := &EmailTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON202 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -13967,12 +15535,12 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13986,36 +15554,33 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes return response, nil } -// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call -func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { +// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call +func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsByTeamResponse{ + response := &AcceptTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Addon `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON303 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -14024,13 +15589,6 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14043,26 +15601,26 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons return response, nil } -// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call -func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { +// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call +func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetByTeamResponse{ + response := &CancelTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -14085,13 +15643,6 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14104,15 +15655,15 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs return response, nil } -// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call -func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { +// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call +func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamAPIKeysResponse{ + response := &ListInvoicesByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14120,7 +15671,7 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []APIKey `json:"items"` + Items []Invoice `json:"items"` Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14135,6 +15686,13 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14154,26 +15712,29 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, return response, nil } -// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call -func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { +// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call +func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamAPIKeyResponse{ + response := &GetTeamMembershipsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest APIKey + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Items []MembershipWithUser `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -14189,12 +15750,19 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -14208,15 +15776,15 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons return response, nil } -// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call -func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { +// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call +func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamAPIKeyResponse{ + response := &DeleteTeamMembershipResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14236,6 +15804,13 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14255,29 +15830,29 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons return response, nil } -// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call -func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { +// ParseListMonthlyLimitsByTeamResponse parses an HTTP response from a ListMonthlyLimitsByTeamWithResponse call +func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimitsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamImagesResponse{ + response := &ListMonthlyLimitsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []TeamImage `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []MonthlyLimit `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -14312,29 +15887,33 @@ func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesRespons return response, nil } -// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call -func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { +// ParseCreateMonthlyLimitResponse parses an HTTP response from a CreateMonthlyLimitWithResponse call +func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamInvitationsResponse{ + response := &CreateMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MonthlyLimit + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -14343,6 +15922,20 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14355,40 +15948,26 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR return response, nil } -// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call -func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { +// ParseDeleteMonthlyLimitResponse parses an HTTP response from a DeleteMonthlyLimitWithResponse call +func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &EmailTeamInvitationResponse{ + response := &DeleteMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invitation - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Invitation - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON202 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -14397,12 +15976,12 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -14416,33 +15995,33 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR return response, nil } -// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call -func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { +// ParseGetMonthlyLimitResponse parses an HTTP response from a GetMonthlyLimitWithResponse call +func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AcceptTeamInvitationResponse{ + response := &GetMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest MembershipWithTeam + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MonthlyLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: - var dest MembershipWithTeam + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON303 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -14451,6 +16030,13 @@ func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitatio } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14463,20 +16049,27 @@ func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitatio return response, nil } -// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call -func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { +// ParseUpdateMonthlyLimitResponse parses an HTTP response from a UpdateMonthlyLimitWithResponse call +func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CancelTeamInvitationResponse{ + response := &UpdateMonthlyLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MonthlyLimit + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14517,29 +16110,26 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio return response, nil } -// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call -func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { +// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call +func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListInvoicesByTeamResponse{ + response := &DeletePluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Invoice `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -14574,15 +16164,15 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes return response, nil } -// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call -func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { +// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call +func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamMembershipsResponse{ + response := &ListPluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14590,21 +16180,14 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []MembershipWithUser `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []Plugin `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14638,26 +16221,26 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } -// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call -func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { +// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call +func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamMembershipResponse{ + response := &DownloadPluginAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -14666,19 +16249,19 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -14692,15 +16275,15 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi return response, nil } -// ParseListMonthlyLimitsByTeamResponse parses an HTTP response from a ListMonthlyLimitsByTeamWithResponse call -func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimitsByTeamResponse, error) { +// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call +func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListMonthlyLimitsByTeamResponse{ + response := &ListSubscriptionOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -14708,8 +16291,8 @@ func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimit switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []MonthlyLimit `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []TeamSubscriptionOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -14749,27 +16332,34 @@ func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimit return response, nil } -// ParseCreateMonthlyLimitResponse parses an HTTP response from a CreateMonthlyLimitWithResponse call -func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitResponse, error) { +// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call +func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateMonthlyLimitResponse{ + response := &CreateSubscriptionOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest MonthlyLimit + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14810,20 +16400,27 @@ func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitRes return response, nil } -// ParseDeleteMonthlyLimitResponse parses an HTTP response from a DeleteMonthlyLimitWithResponse call -func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitResponse, error) { +// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call +func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteMonthlyLimitResponse{ + response := &GetSubscriptionOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TeamSubscriptionOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14857,22 +16454,25 @@ func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitRes return response, nil } -// ParseGetMonthlyLimitResponse parses an HTTP response from a GetMonthlyLimitWithResponse call -func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, error) { +// ParseListSyncDestinationsResponse parses an HTTP response from a ListSyncDestinationsWithResponse call +func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestinationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonthlyLimitResponse{ + response := &ListSyncDestinationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonthlyLimit + var dest struct { + Items []SyncDestination `json:"items"` + Metadata ListMetadata `json:"metadata"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14885,13 +16485,6 @@ func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14911,26 +16504,26 @@ func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, return response, nil } -// ParseUpdateMonthlyLimitResponse parses an HTTP response from a UpdateMonthlyLimitWithResponse call -func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitResponse, error) { +// ParseCreateSyncDestinationResponse parses an HTTP response from a CreateSyncDestinationWithResponse call +func ParseCreateSyncDestinationResponse(rsp *http.Response) (*CreateSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateMonthlyLimitResponse{ + response := &CreateSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonthlyLimit + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncDestination if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -14946,19 +16539,12 @@ func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -14972,27 +16558,20 @@ func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitRes return response, nil } -// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call -func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { +// ParseDeleteSyncDestinationResponse parses an HTTP response from a DeleteSyncDestinationWithResponse call +func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginsByTeamResponse{ + response := &DeleteSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15000,19 +16579,19 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -15026,25 +16605,22 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR return response, nil } -// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call -func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { +// ParseGetSyncDestinationResponse parses an HTTP response from a GetSyncDestinationWithResponse call +func ParseGetSyncDestinationResponse(rsp *http.Response) (*GetSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsByTeamResponse{ + response := &GetSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest SyncDestination if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15057,13 +16633,6 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15083,27 +16652,34 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo return response, nil } -// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call -func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { +// ParseUpdateSyncDestinationResponse parses an HTTP response from a UpdateSyncDestinationWithResponse call +func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetByTeamResponse{ + response := &UpdateSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + var dest SyncDestination if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15118,12 +16694,12 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -15137,15 +16713,15 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } -// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call -func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { +// ParseListSyncSourcesResponse parses an HTTP response from a ListSyncSourcesWithResponse call +func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSubscriptionOrdersByTeamResponse{ + response := &ListSyncSourcesResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -15153,8 +16729,8 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []TeamSubscriptionOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []SyncSource `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -15168,13 +16744,6 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15194,22 +16763,22 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri return response, nil } -// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call -func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { +// ParseCreateSyncSourceResponse parses an HTTP response from a CreateSyncSourceWithResponse call +func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSubscriptionOrderForTeamResponse{ + response := &CreateSyncSourceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest TeamSubscriptionOrder + var dest SyncSource if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15229,12 +16798,45 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteSyncSourceResponse parses an HTTP response from a DeleteSyncSourceWithResponse call +func ParseDeleteSyncSourceResponse(rsp *http.Response) (*DeleteSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -15262,22 +16864,22 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub return response, nil } -// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call -func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { +// ParseGetSyncSourceResponse parses an HTTP response from a GetSyncSourceWithResponse call +func ParseGetSyncSourceResponse(rsp *http.Response) (*GetSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSubscriptionOrderByTeamResponse{ + response := &GetSyncSourceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest TeamSubscriptionOrder + var dest SyncSource if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15290,12 +16892,59 @@ func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscripti } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateSyncSourceResponse parses an HTTP response from a UpdateSyncSourceWithResponse call +func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -15304,6 +16953,13 @@ func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscripti } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 8f3ed55..bf06630 100644 --- a/models.gen.go +++ b/models.gen.go @@ -102,6 +102,45 @@ const ( PluginTierPaid PluginTier = "paid" ) +// Defines values for SyncDestinationMigrateMode. +const ( + SyncDestinationMigrateModeForced SyncDestinationMigrateMode = "forced" + SyncDestinationMigrateModeSafe SyncDestinationMigrateMode = "safe" +) + +// Defines values for SyncDestinationWriteMode. +const ( + SyncDestinationWriteModeAppend SyncDestinationWriteMode = "append" + SyncDestinationWriteModeOverwrite SyncDestinationWriteMode = "overwrite" + SyncDestinationWriteModeOverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" +) + +// Defines values for SyncDestinationCreateMigrateMode. +const ( + SyncDestinationCreateMigrateModeForced SyncDestinationCreateMigrateMode = "forced" + SyncDestinationCreateMigrateModeSafe SyncDestinationCreateMigrateMode = "safe" +) + +// Defines values for SyncDestinationCreateWriteMode. +const ( + SyncDestinationCreateWriteModeAppend SyncDestinationCreateWriteMode = "append" + SyncDestinationCreateWriteModeOverwrite SyncDestinationCreateWriteMode = "overwrite" + SyncDestinationCreateWriteModeOverwriteDeleteStale SyncDestinationCreateWriteMode = "overwrite-delete-stale" +) + +// Defines values for SyncDestinationUpdateMigrateMode. +const ( + Forced SyncDestinationUpdateMigrateMode = "forced" + Safe SyncDestinationUpdateMigrateMode = "safe" +) + +// Defines values for SyncDestinationUpdateWriteMode. +const ( + Append SyncDestinationUpdateWriteMode = "append" + Overwrite SyncDestinationUpdateWriteMode = "overwrite" + OverwriteDeleteStale SyncDestinationUpdateWriteMode = "overwrite-delete-stale" +) + // Defines values for SyncRunStatus. const ( SyncRunStatusCancelled SyncRunStatus = "cancelled" @@ -1109,29 +1148,138 @@ type Sync struct { // CreatedAt Time when the sync was created CreatedAt time.Time `json:"created_at"` + // Destinations List of destinations for the sync + Destinations []string `json:"destinations"` + // Disabled Whether the sync is disabled Disabled bool `json:"disabled"` - // Env Environment variables for the sync - Env []SyncEnv `json:"env"` - // Memory Memory quota for the sync Memory string `json:"memory"` - // Name Unique name for the sync + // Name Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` // Schedule Cron schedule for the sync Schedule string `json:"schedule"` - // Spec YAML specification to run the sync - Spec string `json:"spec"` + // Source Unique name of the source + Source string `json:"source"` // UpdatedAt Time when the sync was updated UpdatedAt time.Time `json:"updated_at"` } -// SyncEnv Environment variable +// SyncCreate Managed Sync definition +type SyncCreate struct { + // Cpu CPU quota for the sync + CPU *string `json:"cpu,omitempty"` + Destinations []string `json:"destinations"` + + // Disabled Whether the sync is disabled + Disabled bool `json:"disabled"` + + // Memory Memory quota for the sync + Memory *string `json:"memory,omitempty"` + + // Name Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // Schedule Cron schedule for the sync + Schedule string `json:"schedule"` + + // Source Unique name of the source + Source string `json:"source"` +} + +// SyncDestination defines model for SyncDestination. +type SyncDestination struct { + // CreatedAt Time when the source was created + CreatedAt time.Time `json:"created_at"` + + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env []SyncEnv `json:"env"` + + // MigrateMode Migrate mode for the destination + MigrateMode SyncDestinationMigrateMode `json:"migrate_mode"` + + // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // Path Plugin path in CloudQuery registry + Path string `json:"path"` + Spec map[string]interface{} `json:"spec"` + + // UpdatedAt Time when the source was last updated + UpdatedAt time.Time `json:"updated_at"` + + // Version Version of the plugin + Version string `json:"version"` + + // WriteMode Write mode for the destination + WriteMode SyncDestinationWriteMode `json:"write_mode"` +} + +// SyncDestinationMigrateMode Migrate mode for the destination +type SyncDestinationMigrateMode string + +// SyncDestinationWriteMode Write mode for the destination +type SyncDestinationWriteMode string + +// SyncDestinationCreate Sync Destination Definition +type SyncDestinationCreate struct { + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env *[]SyncEnv `json:"env,omitempty"` + + // MigrateMode Migrate mode for the destination + MigrateMode *SyncDestinationCreateMigrateMode `json:"migrate_mode,omitempty"` + + // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // Path Plugin path in CloudQuery registry + Path string `json:"path"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Version Version of the plugin + Version string `json:"version"` + + // WriteMode Write mode for the destination + WriteMode *SyncDestinationCreateWriteMode `json:"write_mode,omitempty"` +} + +// SyncDestinationCreateMigrateMode Migrate mode for the destination +type SyncDestinationCreateMigrateMode string + +// SyncDestinationCreateWriteMode Write mode for the destination +type SyncDestinationCreateWriteMode string + +// SyncDestinationUpdate Sync Destination Definition +type SyncDestinationUpdate struct { + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env *[]SyncEnv `json:"env,omitempty"` + + // MigrateMode Migrate mode for the destination + MigrateMode *SyncDestinationUpdateMigrateMode `json:"migrate_mode,omitempty"` + + // Path Plugin path in CloudQuery registry + Path *string `json:"path,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Version Version of the plugin + Version *string `json:"version,omitempty"` + + // WriteMode Write mode for the destination + WriteMode *SyncDestinationUpdateWriteMode `json:"write_mode,omitempty"` +} + +// SyncDestinationUpdateMigrateMode Migrate mode for the destination +type SyncDestinationUpdateMigrateMode string + +// SyncDestinationUpdateWriteMode Write mode for the destination +type SyncDestinationUpdateWriteMode string + +// SyncEnv Environment variable. Environment variables are assumed to be secret. type SyncEnv struct { // Name Name of the environment variable Name string `json:"name"` @@ -1140,9 +1288,6 @@ type SyncEnv struct { Value string `json:"value"` } -// SyncName Unique name of the sync -type SyncName = string - // SyncRun Managed Sync Run definition type SyncRun struct { // CompletedAt Cron schedule for the sync @@ -1170,6 +1315,97 @@ type SyncRunID = openapi_types.UUID // SyncRunStatus The status of the sync run type SyncRunStatus string +// SyncSource defines model for SyncSource. +type SyncSource struct { + // CreatedAt Time when the source was created + CreatedAt time.Time `json:"created_at"` + + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env []SyncEnv `json:"env"` + + // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // Path Plugin path in CloudQuery registry + Path string `json:"path"` + + // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. + SkipTables []string `json:"skip_tables"` + Spec map[string]interface{} `json:"spec"` + + // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. + Tables []string `json:"tables"` + + // UpdatedAt Time when the source was last updated + UpdatedAt time.Time `json:"updated_at"` + + // Version Version of the plugin + Version string `json:"version"` +} + +// SyncSourceCreate Sync Source Definition +type SyncSourceCreate struct { + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env *[]SyncEnv `json:"env,omitempty"` + + // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // Path Plugin path in CloudQuery registry + Path string `json:"path"` + + // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. + SkipTables *[]string `json:"skip_tables,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. + Tables []string `json:"tables"` + + // Version Version of the plugin + Version string `json:"version"` +} + +// SyncSourceUpdate Sync Source Update Definition +type SyncSourceUpdate struct { + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env *[]SyncEnv `json:"env,omitempty"` + + // Path Plugin path in CloudQuery registry + Path *string `json:"path,omitempty"` + + // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. + SkipTables *[]string `json:"skip_tables,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. + Tables *[]string `json:"tables,omitempty"` + + // Version Version of the plugin + Version *string `json:"version,omitempty"` +} + +// SyncUpdate Managed Sync definition +type SyncUpdate struct { + // Cpu CPU quota for the sync + CPU *string `json:"cpu,omitempty"` + Destinations *[]string `json:"destinations,omitempty"` + + // Disabled Whether the sync is disabled + Disabled *bool `json:"disabled,omitempty"` + + // Env Environment variables for the sync + Env *[]SyncEnv `json:"env,omitempty"` + + // Memory Memory quota for the sync + Memory *string `json:"memory,omitempty"` + + // Schedule Cron schedule for the sync + Schedule *string `json:"schedule,omitempty"` + + // Source Unique name of the source + Source *string `json:"source,omitempty"` +} + // Team CloudQuery Team type Team struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -1343,9 +1579,18 @@ type PluginSortBy string // PluginTeam The unique name for the team. type PluginTeam = TeamName +// SyncDestinationName Unique name of the sync destination +type SyncDestinationName = string + +// SyncName Unique name of the sync +type SyncName = string + // SyncRunId ID of the SyncRun type SyncRunId = SyncRunID +// SyncSourceName Unique name of the sync source +type SyncSourceName = string + // TargetName defines model for target_name. type TargetName = string @@ -1719,8 +1964,8 @@ type ListSubscriptionOrdersByTeamParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } -// ListSyncsParams defines parameters for ListSyncs. -type ListSyncsParams struct { +// ListSyncDestinationsParams defines parameters for ListSyncDestinations. +type ListSyncDestinationsParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` @@ -1728,45 +1973,22 @@ type ListSyncsParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// CreateSyncJSONBody defines parameters for CreateSync. -type CreateSyncJSONBody struct { - // Cpu CPU quota for the sync - CPU *string `json:"cpu,omitempty"` - - // Disabled Whether the sync is disabled - Disabled bool `json:"disabled"` - - // Env Environment variables for the sync - Env *[]SyncEnv `json:"env,omitempty"` - - // Memory Memory quota for the sync - Memory *string `json:"memory,omitempty"` - - // Name Unique name for the sync - Name string `json:"name"` +// ListSyncSourcesParams defines parameters for ListSyncSources. +type ListSyncSourcesParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - // Schedule Cron schedule for the sync - Schedule string `json:"schedule"` - Spec string `json:"spec"` + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// UpdateSyncJSONBody defines parameters for UpdateSync. -type UpdateSyncJSONBody struct { - // Cpu CPU quota for the sync - CPU *string `json:"cpu,omitempty"` - - // Disabled Whether the sync is disabled - Disabled *bool `json:"disabled,omitempty"` - - // Env Environment variables for the sync - Env *[]SyncEnv `json:"env,omitempty"` - - // Memory Memory quota for the sync - Memory *string `json:"memory,omitempty"` +// ListSyncsParams defines parameters for ListSyncs. +type ListSyncsParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - // Schedule Cron schedule for the sync - Schedule *string `json:"schedule,omitempty"` - Spec *string `json:"spec,omitempty"` + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` } // ListSyncRunsParams defines parameters for ListSyncRuns. @@ -1907,11 +2129,23 @@ type UpdateMonthlyLimitJSONRequestBody = MonthlyLimitUpdate // CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate +// CreateSyncDestinationJSONRequestBody defines body for CreateSyncDestination for application/json ContentType. +type CreateSyncDestinationJSONRequestBody = SyncDestinationCreate + +// UpdateSyncDestinationJSONRequestBody defines body for UpdateSyncDestination for application/json ContentType. +type UpdateSyncDestinationJSONRequestBody = SyncDestinationUpdate + +// CreateSyncSourceJSONRequestBody defines body for CreateSyncSource for application/json ContentType. +type CreateSyncSourceJSONRequestBody = SyncSourceCreate + +// UpdateSyncSourceJSONRequestBody defines body for UpdateSyncSource for application/json ContentType. +type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate + // CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. -type CreateSyncJSONRequestBody CreateSyncJSONBody +type CreateSyncJSONRequestBody = SyncCreate // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. -type UpdateSyncJSONRequestBody UpdateSyncJSONBody +type UpdateSyncJSONRequestBody = SyncUpdate // UpdateSyncRunJSONRequestBody defines body for UpdateSyncRun for application/json ContentType. type UpdateSyncRunJSONRequestBody UpdateSyncRunJSONBody diff --git a/spec.json b/spec.json index 950f623..890a378 100644 --- a/spec.json +++ b/spec.json @@ -4556,10 +4556,10 @@ ] } }, - "/teams/{team_name}/syncs": { + "/teams/{team_name}/sync-sources": { "get": { - "description": "List all Syncs.", - "operationId": "ListSyncs", + "description": "List all sync source definitions.", + "operationId": "ListSyncSources", "tags": [ "syncs" ], @@ -4587,7 +4587,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/Sync" + "$ref": "#/components/schemas/SyncSource" }, "type": "array" }, @@ -4611,8 +4611,8 @@ } }, "post": { - "description": "Create new Sync definition. Sync runs can be scheduled automatically and manually after sync is created.", - "operationId": "CreateSync", + "description": "Create new Sync Source definition.", + "operationId": "CreateSyncSource", "tags": [ "syncs" ], @@ -4626,52 +4626,455 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "name", - "spec", - "schedule", - "disabled" - ], - "properties": { - "name": { - "type": "string", - "description": "Unique name for the sync" - }, - "spec": { - "type": "string", - "format": "YAML specification to run the sync" - }, - "schedule": { - "type": "string", - "description": "Cron schedule for the sync" - }, - "disabled": { - "type": "boolean", - "description": "Whether the sync is disabled", - "default": false - }, - "env": { - "type": "array", - "description": "Environment variables for the sync", + "$ref": "#/components/schemas/SyncSourceCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncSource" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/sync-sources/{sync_source_name}": { + "get": { + "description": "Get a single sync source definition.", + "operationId": "GetSyncSource", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_source_name" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncSource" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "patch": { + "description": "Update a Sync Source definition.", + "operationId": "UpdateSyncSource", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_source_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncSourceUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncSource" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "delete": { + "description": "Delete a Sync Source definition. Any syncs relying on this source must be deleted first.", + "operationId": "DeleteSyncSource", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_source_name" + } + ], + "responses": { + "204": { + "description": "Deleted" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/sync-destinations": { + "get": { + "description": "List all sync destination definitions.", + "operationId": "ListSyncDestinations", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { "items": { - "$ref": "#/components/schemas/SyncEnv" + "items": { + "$ref": "#/components/schemas/SyncDestination" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "post": { + "description": "Create new Sync Destination definition.", + "operationId": "CreateSyncDestination", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDestinationCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDestination" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}": { + "get": { + "description": "Get a single sync destination definition.", + "operationId": "GetSyncDestination", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_destination_name" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDestination" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "patch": { + "description": "Update a Sync Destination definition.", + "operationId": "UpdateSyncDestination", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_destination_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDestinationUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDestination" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "delete": { + "description": "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", + "operationId": "DeleteSyncDestination", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_destination_name" + } + ], + "responses": { + "204": { + "description": "Deleted" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, + "/teams/{team_name}/syncs": { + "get": { + "description": "List all Syncs.", + "operationId": "ListSyncs", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/per_page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "required": [ + "items", + "metadata" + ], + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Sync" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/components/schemas/ListMetadata" } - }, - "cpu": { - "type": "string", - "description": "CPU quota for the sync", - "default": "1", - "x-go-name": "CPU" - }, - "memory": { - "type": "string", - "description": "Memory quota for the sync", - "default": "2Gi" } } } } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "post": { + "description": "Create new Sync definition. Sync runs can be scheduled automatically and manually after sync is created.", + "operationId": "CreateSync", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncCreate" + } + } } }, "responses": { @@ -4758,39 +5161,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "spec": { - "type": "string", - "format": "YAML specification to run the sync" - }, - "schedule": { - "type": "string", - "description": "Cron schedule for the sync" - }, - "disabled": { - "type": "boolean", - "description": "Whether the sync is disabled" - }, - "env": { - "type": "array", - "description": "Environment variables for the sync", - "items": { - "$ref": "#/components/schemas/SyncEnv" - } - }, - "cpu": { - "type": "string", - "description": "CPU quota for the sync", - "default": "1", - "x-go-name": "CPU" - }, - "memory": { - "type": "string", - "description": "Memory quota for the sync", - "default": "2Gi" - } - } + "$ref": "#/components/schemas/SyncUpdate" } } } @@ -7291,7 +7662,7 @@ }, "SyncEnv": { "type": "object", - "description": "Environment variable", + "description": "Environment variable. Environment variables are assumed to be secret.", "required": [ "name", "value" @@ -7307,15 +7678,290 @@ } } }, + "SyncSourceCreate": { + "title": "Sync Source definition for creating a new source", + "description": "Sync Source Definition", + "type": "object", + "required": [ + "name", + "path", + "version", + "tables" + ], + "properties": { + "name": { + "type": "string", + "example": "my-source-definition", + "description": "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "path": { + "type": "string", + "description": "Plugin path in CloudQuery registry", + "example": "cloudquery/aws" + }, + "version": { + "type": "string", + "description": "Version of the plugin", + "example": "v1.2.3" + }, + "tables": { + "type": "array", + "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items": { + "type": "string" + } + }, + "skip_tables": { + "type": "array", + "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items": { + "type": "string" + } + }, + "spec": { + "type": "object", + "additionalProperties": true, + "format": "Plugin parameters, specific to each plugin" + }, + "env": { + "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SyncEnv" + } + } + } + }, + "SyncSource": { + "allOf": [ + { + "$ref": "#/components/schemas/SyncSourceCreate" + }, + { + "type": "object", + "required": [ + "name", + "path", + "version", + "tables", + "skip_tables", + "spec", + "env", + "created_at", + "updated_at" + ], + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "example": "2023-07-14T16:53:42Z", + "description": "Time when the source was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2023-07-14T16:53:42Z", + "description": "Time when the source was last updated" + } + } + } + ] + }, + "SyncSourceUpdate": { + "title": "Sync Source definition for creating a new source", + "description": "Sync Source Update Definition", + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Plugin path in CloudQuery registry", + "example": "cloudquery/aws" + }, + "version": { + "type": "string", + "description": "Version of the plugin", + "example": "v1.2.3" + }, + "tables": { + "type": "array", + "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items": { + "type": "string" + } + }, + "skip_tables": { + "type": "array", + "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items": { + "type": "string" + } + }, + "spec": { + "type": "object", + "additionalProperties": true, + "format": "Plugin parameters, specific to each plugin" + }, + "env": { + "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SyncEnv" + } + } + } + }, + "SyncDestinationCreate": { + "title": "Sync Destination definition for creating a new destination", + "description": "Sync Destination Definition", + "type": "object", + "required": [ + "name", + "path", + "version" + ], + "properties": { + "name": { + "type": "string", + "example": "my-destination-definition", + "description": "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "path": { + "type": "string", + "description": "Plugin path in CloudQuery registry", + "example": "cloudquery/aws" + }, + "version": { + "type": "string", + "description": "Version of the plugin", + "example": "v1.2.3" + }, + "write_mode": { + "type": "string", + "description": "Write mode for the destination", + "enum": [ + "append", + "overwrite", + "overwrite-delete-stale" + ], + "default": "overwrite-delete-stale" + }, + "migrate_mode": { + "type": "string", + "description": "Migrate mode for the destination", + "enum": [ + "safe", + "forced" + ], + "default": "safe" + }, + "spec": { + "type": "object", + "additionalProperties": true, + "format": "Plugin parameters, specific to each plugin" + }, + "env": { + "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SyncEnv" + } + } + } + }, + "SyncDestination": { + "allOf": [ + { + "$ref": "#/components/schemas/SyncDestinationCreate" + }, + { + "type": "object", + "required": [ + "name", + "path", + "version", + "write_mode", + "migrate_mode", + "spec", + "env", + "created_at", + "updated_at" + ], + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "example": "2023-07-14T16:53:42Z", + "description": "Time when the source was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2023-07-14T16:53:42Z", + "description": "Time when the source was last updated" + } + } + } + ] + }, + "SyncDestinationUpdate": { + "title": "Sync Destination definition for creating a new destination", + "description": "Sync Destination Definition", + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Plugin path in CloudQuery registry", + "example": "cloudquery/aws" + }, + "version": { + "type": "string", + "description": "Version of the plugin", + "example": "v1.2.3" + }, + "write_mode": { + "type": "string", + "description": "Write mode for the destination", + "enum": [ + "append", + "overwrite", + "overwrite-delete-stale" + ], + "default": "overwrite-delete-stale" + }, + "migrate_mode": { + "type": "string", + "description": "Migrate mode for the destination", + "enum": [ + "safe", + "forced" + ], + "default": "safe" + }, + "spec": { + "type": "object", + "additionalProperties": true, + "format": "Plugin parameters, specific to each plugin" + }, + "env": { + "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SyncEnv" + } + } + } + }, "Sync": { "description": "Managed Sync definition", "type": "object", "required": [ "name", - "spec", + "source", + "destinations", "disabled", "schedule", - "env", "cpu", "memory", "created_at", @@ -7324,11 +7970,20 @@ "properties": { "name": { "type": "string", - "description": "Unique name for the sync" + "description": "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", + "pattern": "^[a-zA-Z0-9_-]+$" }, - "spec": { + "source": { "type": "string", - "description": "YAML specification to run the sync" + "description": "Unique name of the source" + }, + "destinations": { + "type": "array", + "description": "List of destinations for the sync", + "items": { + "type": "string", + "description": "Unique name of the destination" + } }, "disabled": { "type": "boolean", @@ -7338,13 +7993,6 @@ "type": "string", "description": "Cron schedule for the sync" }, - "env": { - "type": "array", - "description": "Environment variables for the sync", - "items": { - "$ref": "#/components/schemas/SyncEnv" - } - }, "cpu": { "type": "string", "description": "CPU quota for the sync", @@ -7366,10 +8014,98 @@ } } }, - "SyncName": { - "description": "Unique name of the sync", - "type": "string", - "x-go-name": "SyncName" + "SyncCreate": { + "type": "object", + "description": "Managed Sync definition", + "required": [ + "name", + "source", + "destinations", + "schedule", + "disabled" + ], + "properties": { + "name": { + "type": "string", + "description": "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "source": { + "type": "string", + "description": "Unique name of the source" + }, + "destinations": { + "type": "array", + "items": { + "type": "string", + "description": "Unique name of the destination" + } + }, + "schedule": { + "type": "string", + "description": "Cron schedule for the sync" + }, + "disabled": { + "type": "boolean", + "description": "Whether the sync is disabled", + "default": false + }, + "cpu": { + "type": "string", + "description": "CPU quota for the sync", + "default": "1", + "x-go-name": "CPU" + }, + "memory": { + "type": "string", + "description": "Memory quota for the sync", + "default": "2Gi" + } + } + }, + "SyncUpdate": { + "type": "object", + "description": "Managed Sync definition", + "properties": { + "source": { + "type": "string", + "description": "Unique name of the source" + }, + "destinations": { + "type": "array", + "items": { + "type": "string", + "description": "Unique name of the destination" + } + }, + "schedule": { + "type": "string", + "description": "Cron schedule for the sync" + }, + "disabled": { + "type": "boolean", + "description": "Whether the sync is disabled", + "default": false + }, + "env": { + "type": "array", + "description": "Environment variables for the sync", + "items": { + "$ref": "#/components/schemas/SyncEnv" + } + }, + "cpu": { + "type": "string", + "description": "CPU quota for the sync", + "default": "1", + "x-go-name": "CPU" + }, + "memory": { + "type": "string", + "description": "Memory quota for the sync", + "default": "2Gi" + } + } }, "SyncRunStatus": { "description": "The status of the sync run", @@ -7747,12 +8483,37 @@ }, "x-go-name": "APIKeyID" }, + "sync_source_name": { + "name": "sync_source_name", + "in": "path", + "required": true, + "schema": { + "description": "Unique name of the sync source", + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "x-go-name": "SyncSourceName" + } + }, + "sync_destination_name": { + "name": "sync_destination_name", + "in": "path", + "required": true, + "schema": { + "description": "Unique name of the sync destination", + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "x-go-name": "SyncDestinationName" + } + }, "sync_name": { "name": "sync_name", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/SyncName" + "description": "Unique name of the sync", + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "x-go-name": "SyncName" } }, "sync_run_id": { From d8528b0b610c7a67e990421cdafd391123de4afb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:57:06 +0200 Subject: [PATCH 107/343] fix: Generate CloudQuery Go API Client from `spec.json` (#115) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++---- models.gen.go | 57 ++++++++++++++++++++++++++++++++++++++++++++++++--- spec.json | 49 ++++++++++++++++++++++++++++++++----------- 3 files changed, 95 insertions(+), 19 deletions(-) diff --git a/client.gen.go b/client.gen.go index cdd96fa..d1086a2 100644 --- a/client.gen.go +++ b/client.gen.go @@ -9167,8 +9167,8 @@ type ListPluginVersionsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Items []PluginVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []PluginVersionList `json:"items"` + Metadata ListMetadata `json:"metadata"` } JSON401 *RequiresAuthentication JSON403 *Forbidden @@ -13760,8 +13760,8 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Items []PluginVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` + Items []PluginVersionList `json:"items"` + Metadata ListMetadata `json:"metadata"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err diff --git a/models.gen.go b/models.gen.go index bf06630..46c264a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -896,6 +896,9 @@ type PluginProtocols = []int // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. type PluginReleaseStage string +// PluginSpecJSONSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. +type PluginSpecJSONSchema = string + // PluginTable CloudQuery Plugin Table type PluginTable struct { // Description Description of the table @@ -1038,7 +1041,7 @@ type PluginUpdate struct { USDPerRow *string `json:"usd_per_row,omitempty"` } -// PluginVersion CloudQuery Plugin Version +// PluginVersion defines model for PluginVersion. type PluginVersion struct { // Checksums The checksums of the plugin assets Checksums []string `json:"checksums"` @@ -1067,6 +1070,42 @@ type PluginVersion struct { // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. Retracted bool `json:"retracted"` + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + + // SupportedTargets The targets supported by this plugin version, formatted as _ + SupportedTargets []string `json:"supported_targets"` +} + +// PluginVersionBase CloudQuery Plugin Version +type PluginVersionBase struct { + // Checksums The checksums of the plugin assets + Checksums []string `json:"checksums"` + + // CreatedAt The date and time the plugin version was created. + CreatedAt time.Time `json:"created_at"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. + Draft bool `json:"draft"` + + // Message Description of what's new or changed in this version (supports markdown) + Message string `json:"message"` + + // Name The version in semantic version format. + Name VersionName `json:"name"` + + // PackageType The package type of the plugin assets + PackageType PluginPackageType `json:"package_type"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` + + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted bool `json:"retracted"` + // SupportedTargets The targets supported by this plugin version, formatted as _ SupportedTargets []string `json:"supported_targets"` } @@ -1103,10 +1142,16 @@ type PluginVersionDetails struct { // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. Retracted bool `json:"retracted"` + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + // SupportedTargets The targets supported by this plugin version, formatted as _ SupportedTargets []string `json:"supported_targets"` } +// PluginVersionList CloudQuery Plugin Version +type PluginVersionList = PluginVersionBase + // PluginVersionUpdate defines model for PluginVersionUpdate. type PluginVersionUpdate struct { // Checksums The SHA-256 checksums of the plugin binaries, one per supported target. @@ -1125,8 +1170,11 @@ type PluginVersionUpdate struct { Protocols *PluginProtocols `json:"protocols,omitempty"` // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. - Retracted *bool `json:"retracted,omitempty"` - SupportedTargets *[]string `json:"supported_targets,omitempty"` + Retracted *bool `json:"retracted,omitempty"` + + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + SupportedTargets *[]string `json:"supported_targets,omitempty"` } // RegistryAuthToken JWT token for the image registry @@ -1743,6 +1791,9 @@ type CreatePluginVersionJSONBody struct { // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). Protocols PluginProtocols `json:"protocols"` + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + // SupportedTargets The targets supported by this plugin version, formatted as _ SupportedTargets []string `json:"supported_targets"` } diff --git a/spec.json b/spec.json index 890a378..f4c099c 100644 --- a/spec.json +++ b/spec.json @@ -35,21 +35,12 @@ { "name": "plugins" }, - { - "name": "uploads" - }, { "name": "images" }, { "name": "healthcheck" }, - { - "name": "limits" - }, - { - "name": "usage" - }, { "name": "addons" }, @@ -724,7 +715,7 @@ "properties": { "items": { "items": { - "$ref": "#/components/schemas/PluginVersion" + "$ref": "#/components/schemas/PluginVersionList" }, "type": "array" }, @@ -863,6 +854,9 @@ }, "package_type": { "$ref": "#/components/schemas/PluginPackageType" + }, + "spec_json_schema": { + "$ref": "#/components/schemas/PluginSpecJSONSchema" } } } @@ -6097,7 +6091,7 @@ "docker" ] }, - "PluginVersion": { + "PluginVersionBase": { "additionalProperties": false, "description": "CloudQuery Plugin Version", "required": [ @@ -6169,6 +6163,32 @@ "title": "CloudQuery Plugin Version", "type": "object" }, + "PluginVersionList": { + "allOf": [ + { + "$ref": "#/components/schemas/PluginVersionBase" + } + ] + }, + "PluginSpecJSONSchema": { + "description": "The specification of the plugin. This is a JSON schema that describes the configuration of the plugin.", + "type": "string" + }, + "PluginVersion": { + "allOf": [ + { + "$ref": "#/components/schemas/PluginVersionBase" + }, + { + "type": "object", + "properties": { + "spec_json_schema": { + "$ref": "#/components/schemas/PluginSpecJSONSchema" + } + } + } + ] + }, "PluginVersionDetails": { "allOf": [ { @@ -6223,6 +6243,9 @@ "package_type": { "type": "string", "description": "The package type of the plugin binaries" + }, + "spec_json_schema": { + "$ref": "#/components/schemas/PluginSpecJSONSchema" } } }, @@ -7996,11 +8019,13 @@ "cpu": { "type": "string", "description": "CPU quota for the sync", + "example": "1", "x-go-name": "CPU" }, "memory": { "type": "string", - "description": "Memory quota for the sync" + "description": "Memory quota for the sync", + "example": "2Gi" }, "created_at": { "type": "string", From 9e77b1edbc2a30d390a00c70164fc77476b9b8e1 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:04:39 +0200 Subject: [PATCH 108/343] chore(main): Release v1.7.1 (#112) :robot: I have created a release *beep* *boop* --- ## [1.7.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.0...v1.7.1) (2024-01-31) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#111](https://github.com/cloudquery/cloudquery-api-go/issues/111)) ([5ac719b](https://github.com/cloudquery/cloudquery-api-go/commit/5ac719bb0633c3c8d923a8227bd410ecff6a5b75)) * Generate CloudQuery Go API Client from `spec.json` ([#113](https://github.com/cloudquery/cloudquery-api-go/issues/113)) ([7267cc4](https://github.com/cloudquery/cloudquery-api-go/commit/7267cc42921a60a6125aa6d1efa787ace164bd80)) * Generate CloudQuery Go API Client from `spec.json` ([#115](https://github.com/cloudquery/cloudquery-api-go/issues/115)) ([d8528b0](https://github.com/cloudquery/cloudquery-api-go/commit/d8528b0b610c7a67e990421cdafd391123de4afb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d83cc49..79f120a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.7.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.0...v1.7.1) (2024-01-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#111](https://github.com/cloudquery/cloudquery-api-go/issues/111)) ([5ac719b](https://github.com/cloudquery/cloudquery-api-go/commit/5ac719bb0633c3c8d923a8227bd410ecff6a5b75)) +* Generate CloudQuery Go API Client from `spec.json` ([#113](https://github.com/cloudquery/cloudquery-api-go/issues/113)) ([7267cc4](https://github.com/cloudquery/cloudquery-api-go/commit/7267cc42921a60a6125aa6d1efa787ace164bd80)) +* Generate CloudQuery Go API Client from `spec.json` ([#115](https://github.com/cloudquery/cloudquery-api-go/issues/115)) ([d8528b0](https://github.com/cloudquery/cloudquery-api-go/commit/d8528b0b610c7a67e990421cdafd391123de4afb)) + ## [1.7.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.5...v1.7.0) (2024-01-23) From c4915d7dc638c092f1f2c97a1c9f06e8d9e11d52 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:13:06 +0200 Subject: [PATCH 109/343] fix: Generate CloudQuery Go API Client from `spec.json` (#116) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 4 ++-- spec.json | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/models.gen.go b/models.gen.go index 46c264a..fbf2d5a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1225,7 +1225,7 @@ type SyncCreate struct { Destinations []string `json:"destinations"` // Disabled Whether the sync is disabled - Disabled bool `json:"disabled"` + Disabled *bool `json:"disabled,omitempty"` // Memory Memory quota for the sync Memory *string `json:"memory,omitempty"` @@ -1234,7 +1234,7 @@ type SyncCreate struct { Name string `json:"name"` // Schedule Cron schedule for the sync - Schedule string `json:"schedule"` + Schedule *string `json:"schedule,omitempty"` // Source Unique name of the source Source string `json:"source"` diff --git a/spec.json b/spec.json index f4c099c..51116c9 100644 --- a/spec.json +++ b/spec.json @@ -8045,9 +8045,7 @@ "required": [ "name", "source", - "destinations", - "schedule", - "disabled" + "destinations" ], "properties": { "name": { From f267b6c08e401340203fa0e5dfe4dea011404289 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:57:40 +0200 Subject: [PATCH 110/343] chore(main): Release v1.7.2 (#117) :robot: I have created a release *beep* *boop* --- ## [1.7.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.1...v1.7.2) (2024-01-31) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#116](https://github.com/cloudquery/cloudquery-api-go/issues/116)) ([c4915d7](https://github.com/cloudquery/cloudquery-api-go/commit/c4915d7dc638c092f1f2c97a1c9f06e8d9e11d52)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79f120a..769f190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.7.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.1...v1.7.2) (2024-01-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#116](https://github.com/cloudquery/cloudquery-api-go/issues/116)) ([c4915d7](https://github.com/cloudquery/cloudquery-api-go/commit/c4915d7dc638c092f1f2c97a1c9f06e8d9e11d52)) + ## [1.7.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.0...v1.7.1) (2024-01-31) From c545ec69b9fd356b28516979d439d2b4f75e8a9f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jan 2024 18:45:45 +0200 Subject: [PATCH 111/343] fix: Generate CloudQuery Go API Client from `spec.json` (#118) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 15 +++++++++------ spec.json | 21 +++++++++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/models.gen.go b/models.gen.go index fbf2d5a..69c81ac 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1255,7 +1255,7 @@ type SyncDestination struct { Name string `json:"name"` // Path Plugin path in CloudQuery registry - Path string `json:"path"` + Path SyncPluginPath `json:"path"` Spec map[string]interface{} `json:"spec"` // UpdatedAt Time when the source was last updated @@ -1286,7 +1286,7 @@ type SyncDestinationCreate struct { Name string `json:"name"` // Path Plugin path in CloudQuery registry - Path string `json:"path"` + Path SyncPluginPath `json:"path"` Spec *map[string]interface{} `json:"spec,omitempty"` // Version Version of the plugin @@ -1311,7 +1311,7 @@ type SyncDestinationUpdate struct { MigrateMode *SyncDestinationUpdateMigrateMode `json:"migrate_mode,omitempty"` // Path Plugin path in CloudQuery registry - Path *string `json:"path,omitempty"` + Path *SyncPluginPath `json:"path,omitempty"` Spec *map[string]interface{} `json:"spec,omitempty"` // Version Version of the plugin @@ -1336,6 +1336,9 @@ type SyncEnv struct { Value string `json:"value"` } +// SyncPluginPath Plugin path in CloudQuery registry +type SyncPluginPath = string + // SyncRun Managed Sync Run definition type SyncRun struct { // CompletedAt Cron schedule for the sync @@ -1375,7 +1378,7 @@ type SyncSource struct { Name string `json:"name"` // Path Plugin path in CloudQuery registry - Path string `json:"path"` + Path SyncPluginPath `json:"path"` // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. SkipTables []string `json:"skip_tables"` @@ -1400,7 +1403,7 @@ type SyncSourceCreate struct { Name string `json:"name"` // Path Plugin path in CloudQuery registry - Path string `json:"path"` + Path SyncPluginPath `json:"path"` // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. SkipTables *[]string `json:"skip_tables,omitempty"` @@ -1419,7 +1422,7 @@ type SyncSourceUpdate struct { Env *[]SyncEnv `json:"env,omitempty"` // Path Plugin path in CloudQuery registry - Path *string `json:"path,omitempty"` + Path *SyncPluginPath `json:"path,omitempty"` // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. SkipTables *[]string `json:"skip_tables,omitempty"` diff --git a/spec.json b/spec.json index 51116c9..ac11550 100644 --- a/spec.json +++ b/spec.json @@ -7683,6 +7683,11 @@ "title": "Docker Error", "type": "object" }, + "SyncPluginPath": { + "type": "string", + "description": "Plugin path in CloudQuery registry", + "pattern": "^cloudquery/[^/]+" + }, "SyncEnv": { "type": "object", "description": "Environment variable. Environment variables are assumed to be secret.", @@ -7719,8 +7724,7 @@ "pattern": "^[a-zA-Z0-9_-]+$" }, "path": { - "type": "string", - "description": "Plugin path in CloudQuery registry", + "$ref": "#/components/schemas/SyncPluginPath", "example": "cloudquery/aws" }, "version": { @@ -7797,8 +7801,7 @@ "type": "object", "properties": { "path": { - "type": "string", - "description": "Plugin path in CloudQuery registry", + "$ref": "#/components/schemas/SyncPluginPath", "example": "cloudquery/aws" }, "version": { @@ -7851,9 +7854,8 @@ "pattern": "^[a-zA-Z0-9_-]+$" }, "path": { - "type": "string", - "description": "Plugin path in CloudQuery registry", - "example": "cloudquery/aws" + "$ref": "#/components/schemas/SyncPluginPath", + "example": "cloudquery/postgresql" }, "version": { "type": "string", @@ -7934,9 +7936,8 @@ "type": "object", "properties": { "path": { - "type": "string", - "description": "Plugin path in CloudQuery registry", - "example": "cloudquery/aws" + "$ref": "#/components/schemas/SyncPluginPath", + "example": "cloudquery/postgresql" }, "version": { "type": "string", From 140f2fe262e80c9c915dce3726d8b5978c437805 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:46:35 +0200 Subject: [PATCH 112/343] fix: Generate CloudQuery Go API Client from `spec.json` (#120) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 18 ++++++++++++------ spec.json | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/models.gen.go b/models.gen.go index 69c81ac..49166fc 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1245,7 +1245,7 @@ type SyncDestination struct { // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` - // Env Environment variables for the plugin. All environment variables will be stored as secrets. + // Env Environment variables for the plugin. Env []SyncEnv `json:"env"` // MigrateMode Migrate mode for the destination @@ -1277,7 +1277,7 @@ type SyncDestinationWriteMode string // SyncDestinationCreate Sync Destination Definition type SyncDestinationCreate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnv `json:"env,omitempty"` + Env *[]SyncEnvCreate `json:"env,omitempty"` // MigrateMode Migrate mode for the destination MigrateMode *SyncDestinationCreateMigrateMode `json:"migrate_mode,omitempty"` @@ -1305,7 +1305,7 @@ type SyncDestinationCreateWriteMode string // SyncDestinationUpdate Sync Destination Definition type SyncDestinationUpdate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnv `json:"env,omitempty"` + Env *[]SyncEnvCreate `json:"env,omitempty"` // MigrateMode Migrate mode for the destination MigrateMode *SyncDestinationUpdateMigrateMode `json:"migrate_mode,omitempty"` @@ -1331,6 +1331,12 @@ type SyncDestinationUpdateWriteMode string type SyncEnv struct { // Name Name of the environment variable Name string `json:"name"` +} + +// SyncEnvCreate Environment variable. Environment variables are assumed to be secret. +type SyncEnvCreate struct { + // Name Name of the environment variable + Name string `json:"name"` // Value Value of the environment variable Value string `json:"value"` @@ -1371,7 +1377,7 @@ type SyncSource struct { // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` - // Env Environment variables for the plugin. All environment variables will be stored as secrets. + // Env Environment variables for the plugin. Env []SyncEnv `json:"env"` // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. @@ -1397,7 +1403,7 @@ type SyncSource struct { // SyncSourceCreate Sync Source Definition type SyncSourceCreate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnv `json:"env,omitempty"` + Env *[]SyncEnvCreate `json:"env,omitempty"` // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` @@ -1419,7 +1425,7 @@ type SyncSourceCreate struct { // SyncSourceUpdate Sync Source Update Definition type SyncSourceUpdate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnv `json:"env,omitempty"` + Env *[]SyncEnvCreate `json:"env,omitempty"` // Path Plugin path in CloudQuery registry Path *SyncPluginPath `json:"path,omitempty"` diff --git a/spec.json b/spec.json index ac11550..e1b1ae8 100644 --- a/spec.json +++ b/spec.json @@ -7688,7 +7688,7 @@ "description": "Plugin path in CloudQuery registry", "pattern": "^cloudquery/[^/]+" }, - "SyncEnv": { + "SyncEnvCreate": { "type": "object", "description": "Environment variable. Environment variables are assumed to be secret.", "required": [ @@ -7755,11 +7755,24 @@ "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { - "$ref": "#/components/schemas/SyncEnv" + "$ref": "#/components/schemas/SyncEnvCreate" } } } }, + "SyncEnv": { + "type": "object", + "description": "Environment variable. Environment variables are assumed to be secret.", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the environment variable" + } + } + }, "SyncSource": { "allOf": [ { @@ -7790,6 +7803,13 @@ "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was last updated" + }, + "env": { + "description": "Environment variables for the plugin.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SyncEnv" + } } } } @@ -7832,7 +7852,7 @@ "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { - "$ref": "#/components/schemas/SyncEnv" + "$ref": "#/components/schemas/SyncEnvCreate" } } } @@ -7890,7 +7910,7 @@ "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { - "$ref": "#/components/schemas/SyncEnv" + "$ref": "#/components/schemas/SyncEnvCreate" } } } @@ -7925,6 +7945,13 @@ "format": "date-time", "example": "2023-07-14T16:53:42Z", "description": "Time when the source was last updated" + }, + "env": { + "description": "Environment variables for the plugin.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SyncEnv" + } } } } @@ -7972,7 +7999,7 @@ "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", "type": "array", "items": { - "$ref": "#/components/schemas/SyncEnv" + "$ref": "#/components/schemas/SyncEnvCreate" } } } From d89ea14624cba9de87f494feab7a4034a4e857ef Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:39:54 +0200 Subject: [PATCH 113/343] chore(main): Release v1.7.3 (#119) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 769f190..77eb246 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.7.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.2...v1.7.3) (2024-02-01) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#118](https://github.com/cloudquery/cloudquery-api-go/issues/118)) ([c545ec6](https://github.com/cloudquery/cloudquery-api-go/commit/c545ec69b9fd356b28516979d439d2b4f75e8a9f)) +* Generate CloudQuery Go API Client from `spec.json` ([#120](https://github.com/cloudquery/cloudquery-api-go/issues/120)) ([140f2fe](https://github.com/cloudquery/cloudquery-api-go/commit/140f2fe262e80c9c915dce3726d8b5978c437805)) + ## [1.7.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.1...v1.7.2) (2024-01-31) From a4a1c08e064a0e0a3a377001a0730bf481c633ab Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 5 Feb 2024 23:46:08 +0200 Subject: [PATCH 114/343] fix: Generate CloudQuery Go API Client from `spec.json` (#121) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 56 ++++++++++++++++++++++++++++++++++++++++----------- models.gen.go | 5 +++++ spec.json | 29 ++++++++++++++++++++++++-- 3 files changed, 76 insertions(+), 14 deletions(-) diff --git a/client.gen.go b/client.gen.go index d1086a2..62cb4cd 100644 --- a/client.gen.go +++ b/client.gen.go @@ -427,7 +427,7 @@ type ClientInterface interface { UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSyncRunLogs request - GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) + GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateSyncRunProgressWithBody request with any body CreateSyncRunProgressWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1945,8 +1945,8 @@ func (c *Client) UpdateSyncRun(ctx context.Context, teamName TeamName, syncName return c.Client.Do(req) } -func (c *Client) GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncRunLogsRequest(c.Server, teamName, syncName, syncRunId) +func (c *Client) GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncRunLogsRequest(c.Server, teamName, syncName, syncRunId, params) if err != nil { return nil, err } @@ -7495,7 +7495,7 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName } // NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs -func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { +func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams) (*http.Request, error) { var err error var pathParam0 string @@ -7539,6 +7539,21 @@ func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncNam return nil, err } + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + return req, nil } @@ -8488,7 +8503,7 @@ type ClientWithResponsesInterface interface { UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) // GetSyncRunLogsWithResponse request - GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) + GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) // CreateSyncRunProgressWithBodyWithResponse request with any body CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) @@ -10972,11 +10987,15 @@ func (r UpdateSyncRunResponse) StatusCode() int { type GetSyncRunLogsResponse struct { Body []byte HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + JSON200 *struct { + // Location The location to download the sync run logs from + Location string `json:"location"` + } + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -12365,8 +12384,8 @@ func (c *ClientWithResponses) UpdateSyncRunWithResponse(ctx context.Context, tea } // GetSyncRunLogsWithResponse request returning *GetSyncRunLogsResponse -func (c *ClientWithResponses) GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) { - rsp, err := c.GetSyncRunLogs(ctx, teamName, syncName, syncRunId, reqEditors...) +func (c *ClientWithResponses) GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) { + rsp, err := c.GetSyncRunLogs(ctx, teamName, syncName, syncRunId, params, reqEditors...) if err != nil { return nil, err } @@ -17464,6 +17483,16 @@ func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, e } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Location The location to download the sync run logs from + Location string `json:"location"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -17499,6 +17528,9 @@ func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, e } response.JSON500 = &dest + case rsp.StatusCode == 200: + // Content-type (text/plain) unsupported + } return response, nil diff --git a/models.gen.go b/models.gen.go index 49166fc..13994a7 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2066,6 +2066,11 @@ type UpdateSyncRunJSONBody struct { Status *SyncRunStatus `json:"status,omitempty"` } +// GetSyncRunLogsParams defines parameters for GetSyncRunLogs. +type GetSyncRunLogsParams struct { + Accept *string `json:"Accept,omitempty"` +} + // CreateSyncRunProgressJSONBody defines parameters for CreateSyncRunProgress. type CreateSyncRunProgressJSONBody struct { // Rows Number of rows synced so far diff --git a/spec.json b/spec.json index e1b1ae8..d23f5f4 100644 --- a/spec.json +++ b/spec.json @@ -5487,6 +5487,14 @@ "syncs" ], "parameters": [ + { + "in": "header", + "name": "Accept", + "required": false, + "schema": { + "type": "string" + } + }, { "$ref": "#/components/parameters/team_name" }, @@ -5499,12 +5507,29 @@ ], "responses": { "200": { - "description": "Chunked response logs for a sync run that is in progress.", + "description": "Response", "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "required": [ + "location" + ], + "properties": { + "location": { + "type": "string", + "format": "uri", + "description": "The location to download the sync run logs from" + } + }, + "title": "Sync Run Logs", + "type": "object" + } + }, "text/plain": { "schema": { "type": "string", - "description": "A stream of logs for a sync run." + "description": "Chunked response logs for a sync run that is in progress." } } } From 37ddfcc2ae4e2505ab7e1783850a39fdda361756 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:07:59 +0200 Subject: [PATCH 115/343] fix: Generate CloudQuery Go API Client from `spec.json` (#123) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ models.gen.go | 40 +++++++++++++++++++++++++++++++++------- spec.json | 36 ++++++++++++++++++++++++++++++------ 3 files changed, 79 insertions(+), 13 deletions(-) diff --git a/client.gen.go b/client.gen.go index 62cb4cd..a3eb72d 100644 --- a/client.gen.go +++ b/client.gen.go @@ -10518,6 +10518,7 @@ type CreateSyncDestinationResponse struct { JSON201 *SyncDestination JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -10649,6 +10650,7 @@ type CreateSyncSourceResponse struct { JSON201 *SyncSource JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -16558,6 +16560,13 @@ func ParseCreateSyncDestinationResponse(rsp *http.Response) (*CreateSyncDestinat } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16817,6 +16826,13 @@ func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 13994a7..79bdae0 100644 --- a/models.gen.go +++ b/models.gen.go @@ -90,9 +90,23 @@ const ( // Defines values for PluginReleaseStage. const ( - ComingSoon PluginReleaseStage = "coming-soon" - Ga PluginReleaseStage = "ga" - Preview PluginReleaseStage = "preview" + PluginReleaseStageComingSoon PluginReleaseStage = "coming-soon" + PluginReleaseStageGa PluginReleaseStage = "ga" + PluginReleaseStagePreview PluginReleaseStage = "preview" +) + +// Defines values for PluginReleaseStageCreate. +const ( + PluginReleaseStageCreateComingSoon PluginReleaseStageCreate = "coming-soon" + PluginReleaseStageCreateGa PluginReleaseStageCreate = "ga" + PluginReleaseStageCreatePreview PluginReleaseStageCreate = "preview" +) + +// Defines values for PluginReleaseStageUpdate. +const ( + ComingSoon PluginReleaseStageUpdate = "coming-soon" + Ga PluginReleaseStageUpdate = "ga" + Preview PluginReleaseStageUpdate = "preview" ) // Defines values for PluginTier. @@ -781,8 +795,8 @@ type PluginCreate struct { // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. - ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` - Repository *string `json:"repository,omitempty"` + ReleaseStage *PluginReleaseStageCreate `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription string `json:"short_description"` @@ -896,6 +910,18 @@ type PluginProtocols = []int // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. type PluginReleaseStage string +// PluginReleaseStageCreate Official plugins can go through three release stages: Coming Soon, Preview, and GA. +// The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. +// Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: +// Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. +type PluginReleaseStageCreate string + +// PluginReleaseStageUpdate Official plugins can go through three release stages: Coming Soon, Preview, and GA. +// The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. +// Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: +// Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. +type PluginReleaseStageUpdate string + // PluginSpecJSONSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. type PluginSpecJSONSchema = string @@ -1028,8 +1054,8 @@ type PluginUpdate struct { // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. - ReleaseStage *PluginReleaseStage `json:"release_stage,omitempty"` - Repository *string `json:"repository,omitempty"` + ReleaseStage *PluginReleaseStageUpdate `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription *string `json:"short_description,omitempty"` diff --git a/spec.json b/spec.json index d23f5f4..76bd3fe 100644 --- a/spec.json +++ b/spec.json @@ -4642,6 +4642,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, @@ -4865,6 +4868,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "404": { + "$ref": "#/components/responses/NotFound" + }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, @@ -5051,7 +5057,7 @@ } }, "post": { - "description": "Create new Sync definition. Sync runs can be scheduled automatically and manually after sync is created.", + "description": "Create new Sync definition. Sync runs can be scheduled automatically, or triggered manually after sync is created.", "operationId": "CreateSync", "tags": [ "syncs" @@ -5189,7 +5195,7 @@ } }, "delete": { - "description": "Delete Sync. This will delete Sync configuration and all associated sync runs", + "description": "Delete Sync. This will delete Sync configuration and all associated sync runs, but will not delete the associated source and destination(s). These will need to be deleted separately.", "operationId": "DeleteSync", "tags": [ "syncs" @@ -5759,8 +5765,7 @@ "coming-soon", "preview", "ga" - ], - "default": "coming-soon" + ] }, "PluginTier": { "description": "Supported tiers for plugins", @@ -5889,6 +5894,16 @@ } ] }, + "PluginReleaseStageCreate": { + "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "type": "string", + "enum": [ + "coming-soon", + "preview", + "ga" + ], + "default": "coming-soon" + }, "PluginCreate": { "type": "object", "required": [ @@ -5946,7 +5961,7 @@ "example": "https://github.com/cloudquery/cloudquery" }, "release_stage": { - "$ref": "#/components/schemas/PluginReleaseStage" + "$ref": "#/components/schemas/PluginReleaseStageCreate" }, "logo": { "type": "string", @@ -5968,6 +5983,15 @@ } } }, + "PluginReleaseStageUpdate": { + "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "type": "string", + "enum": [ + "coming-soon", + "preview", + "ga" + ] + }, "PluginUpdate": { "type": "object", "properties": { @@ -6009,7 +6033,7 @@ "description": "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub." }, "release_stage": { - "$ref": "#/components/schemas/PluginReleaseStage" + "$ref": "#/components/schemas/PluginReleaseStageUpdate" }, "usd_per_row": { "type": "string", From fc41e371042da4be7420df48524b4d8c82af75ed Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:21:33 +0200 Subject: [PATCH 116/343] fix: Generate CloudQuery Go API Client from `spec.json` (#124) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++---- spec.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client.gen.go b/client.gen.go index a3eb72d..4619846 100644 --- a/client.gen.go +++ b/client.gen.go @@ -8648,7 +8648,7 @@ func (r DeleteAddonByTeamAndNameResponse) StatusCode() int { type GetAddonResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Addon + JSON200 *ListAddon JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError @@ -9048,7 +9048,7 @@ func (r DeletePluginByTeamAndPluginNameResponse) StatusCode() int { type GetPluginResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Plugin + JSON200 *ListPlugin JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError @@ -12699,7 +12699,7 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon + var dest ListAddon if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13507,7 +13507,7 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + var dest ListPlugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/spec.json b/spec.json index 76bd3fe..965ccad 100644 --- a/spec.json +++ b/spec.json @@ -411,7 +411,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Plugin" + "$ref": "#/components/schemas/ListPlugin" } } }, @@ -1752,7 +1752,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Addon" + "$ref": "#/components/schemas/ListAddon" } } }, From daa185d354063a2d21698c629f84178812a5d882 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:43:53 +0200 Subject: [PATCH 117/343] fix: Generate CloudQuery Go API Client from `spec.json` (#125) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 --- spec.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/models.gen.go b/models.gen.go index 79bdae0..773980e 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1915,9 +1915,6 @@ type CreateTeamJSONBody struct { // Name The unique name for the team. Name TeamName `json:"name"` - - // Plan The plan the team is on - Plan *TeamPlan `json:"plan,omitempty"` } // UpdateTeamJSONBody defines parameters for UpdateTeam. diff --git a/spec.json b/spec.json index 965ccad..1ac5614 100644 --- a/spec.json +++ b/spec.json @@ -2332,9 +2332,6 @@ "description": "The team's display name", "minLength": 1, "maxLength": 255 - }, - "plan": { - "$ref": "#/components/schemas/TeamPlan" } } } From 5a45b734fb24be6a3316516bb61404e8b73ff698 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 14 Feb 2024 19:17:20 +0200 Subject: [PATCH 118/343] fix: Generate CloudQuery Go API Client from `spec.json` (#126) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/models.gen.go b/models.gen.go index 773980e..0066627 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2098,6 +2098,9 @@ type GetSyncRunLogsParams struct { type CreateSyncRunProgressJSONBody struct { // Rows Number of rows synced so far Rows int64 `json:"rows"` + + // Status The status of the sync run + Status *SyncRunStatus `json:"status,omitempty"` } // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. diff --git a/spec.json b/spec.json index 1ac5614..d521df6 100644 --- a/spec.json +++ b/spec.json @@ -5454,6 +5454,9 @@ "type": "integer", "format": "int64", "description": "Number of rows synced so far" + }, + "status": { + "$ref": "#/components/schemas/SyncRunStatus" } } } From 82c73636198aa0a6508e4d66bc12d76461ffb56b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:28:31 +0200 Subject: [PATCH 119/343] chore(main): Release v1.7.4 (#122) :robot: I have created a release *beep* *boop* --- ## [1.7.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.3...v1.7.4) (2024-02-14) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#121](https://github.com/cloudquery/cloudquery-api-go/issues/121)) ([a4a1c08](https://github.com/cloudquery/cloudquery-api-go/commit/a4a1c08e064a0e0a3a377001a0730bf481c633ab)) * Generate CloudQuery Go API Client from `spec.json` ([#123](https://github.com/cloudquery/cloudquery-api-go/issues/123)) ([37ddfcc](https://github.com/cloudquery/cloudquery-api-go/commit/37ddfcc2ae4e2505ab7e1783850a39fdda361756)) * Generate CloudQuery Go API Client from `spec.json` ([#124](https://github.com/cloudquery/cloudquery-api-go/issues/124)) ([fc41e37](https://github.com/cloudquery/cloudquery-api-go/commit/fc41e371042da4be7420df48524b4d8c82af75ed)) * Generate CloudQuery Go API Client from `spec.json` ([#125](https://github.com/cloudquery/cloudquery-api-go/issues/125)) ([daa185d](https://github.com/cloudquery/cloudquery-api-go/commit/daa185d354063a2d21698c629f84178812a5d882)) * Generate CloudQuery Go API Client from `spec.json` ([#126](https://github.com/cloudquery/cloudquery-api-go/issues/126)) ([5a45b73](https://github.com/cloudquery/cloudquery-api-go/commit/5a45b734fb24be6a3316516bb61404e8b73ff698)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77eb246..bdd5c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [1.7.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.3...v1.7.4) (2024-02-14) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#121](https://github.com/cloudquery/cloudquery-api-go/issues/121)) ([a4a1c08](https://github.com/cloudquery/cloudquery-api-go/commit/a4a1c08e064a0e0a3a377001a0730bf481c633ab)) +* Generate CloudQuery Go API Client from `spec.json` ([#123](https://github.com/cloudquery/cloudquery-api-go/issues/123)) ([37ddfcc](https://github.com/cloudquery/cloudquery-api-go/commit/37ddfcc2ae4e2505ab7e1783850a39fdda361756)) +* Generate CloudQuery Go API Client from `spec.json` ([#124](https://github.com/cloudquery/cloudquery-api-go/issues/124)) ([fc41e37](https://github.com/cloudquery/cloudquery-api-go/commit/fc41e371042da4be7420df48524b4d8c82af75ed)) +* Generate CloudQuery Go API Client from `spec.json` ([#125](https://github.com/cloudquery/cloudquery-api-go/issues/125)) ([daa185d](https://github.com/cloudquery/cloudquery-api-go/commit/daa185d354063a2d21698c629f84178812a5d882)) +* Generate CloudQuery Go API Client from `spec.json` ([#126](https://github.com/cloudquery/cloudquery-api-go/issues/126)) ([5a45b73](https://github.com/cloudquery/cloudquery-api-go/commit/5a45b734fb24be6a3316516bb61404e8b73ff698)) + ## [1.7.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.2...v1.7.3) (2024-02-01) From 248816e168734cf9b14913103999800008a491c2 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:24:31 +0200 Subject: [PATCH 120/343] fix: Generate CloudQuery Go API Client from `spec.json` (#127) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ++++++ spec.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/models.gen.go b/models.gen.go index 0066627..2e09c5a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -624,6 +624,9 @@ type ListPlugin struct { LatestVersion *VersionName `json:"latest_version,omitempty"` Logo string `json:"logo"` + // MinimumCloudVersion Minimum plugin version that is supported in CloudQuery managed syncs. + MinimumCloudVersion *string `json:"minimum_cloud_version,omitempty"` + // Name The unique name for the plugin. Name PluginName `json:"name"` @@ -727,6 +730,9 @@ type Plugin struct { Kind PluginKind `json:"kind"` Logo string `json:"logo"` + // MinimumCloudVersion Minimum plugin version that is supported in CloudQuery managed syncs. + MinimumCloudVersion *string `json:"minimum_cloud_version,omitempty"` + // Name The unique name for the plugin. Name PluginName `json:"name"` diff --git a/spec.json b/spec.json index d521df6..cd502b5 100644 --- a/spec.json +++ b/spec.json @@ -5853,6 +5853,12 @@ "format": "int64", "description": "The number of rows that can be synced for free each month.", "example": 1000 + }, + "minimum_cloud_version": { + "type": "string", + "description": "Minimum plugin version that is supported in CloudQuery managed syncs.", + "maxLength": 64, + "example": "v1.2.3" } }, "required": [ From b680d6879e7b99ad3cea24a09883ff2a705194b9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:39:21 +0200 Subject: [PATCH 121/343] fix: Generate CloudQuery Go API Client from `spec.json` (#129) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 12 ++++++++++++ spec.json | 28 ++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index 2e09c5a..0b0ab68 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1385,6 +1385,9 @@ type SyncRun struct { // CreatedAt Whether the sync is disabled CreatedAt *time.Time `json:"created_at,omitempty"` + // Errors Number of errors encountered during the sync + Errors int64 `json:"errors"` + // Id unique ID of the run ID openapi_types.UUID `json:"id"` @@ -1396,6 +1399,9 @@ type SyncRun struct { // TotalRows Total number of rows in the sync TotalRows int64 `json:"total_rows"` + + // Warnings Number of warnings encountered during the sync + Warnings int64 `json:"warnings"` } // SyncRunID ID of the SyncRun @@ -2102,11 +2108,17 @@ type GetSyncRunLogsParams struct { // CreateSyncRunProgressJSONBody defines parameters for CreateSyncRunProgress. type CreateSyncRunProgressJSONBody struct { + // Errors Number of errors encountered so far + Errors int64 `json:"errors"` + // Rows Number of rows synced so far Rows int64 `json:"rows"` // Status The status of the sync run Status *SyncRunStatus `json:"status,omitempty"` + + // Warnings Number of warnings encountered so far + Warnings int64 `json:"warnings"` } // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. diff --git a/spec.json b/spec.json index cd502b5..e86b748 100644 --- a/spec.json +++ b/spec.json @@ -5447,7 +5447,9 @@ "schema": { "type": "object", "required": [ - "rows" + "rows", + "warnings", + "errors" ], "properties": { "rows": { @@ -5455,6 +5457,16 @@ "format": "int64", "description": "Number of rows synced so far" }, + "warnings": { + "type": "integer", + "format": "int64", + "description": "Number of warnings encountered so far" + }, + "errors": { + "type": "integer", + "format": "int64", + "description": "Number of errors encountered so far" + }, "status": { "$ref": "#/components/schemas/SyncRunStatus" } @@ -8231,7 +8243,9 @@ "id", "status", "started_at", - "total_rows" + "total_rows", + "warnings", + "errors" ], "properties": { "sync_name": { @@ -8265,6 +8279,16 @@ "type": "integer", "format": "int64", "description": "Total number of rows in the sync" + }, + "warnings": { + "type": "integer", + "format": "int64", + "description": "Number of warnings encountered during the sync" + }, + "errors": { + "type": "integer", + "format": "int64", + "description": "Number of errors encountered during the sync" } } }, From 2e8a83b4d58523de62057a8f73d51d3301b4fdbe Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:41:18 +0200 Subject: [PATCH 122/343] chore(main): Release v1.7.5 (#128) :robot: I have created a release *beep* *boop* --- ## [1.7.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.4...v1.7.5) (2024-02-16) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#127](https://github.com/cloudquery/cloudquery-api-go/issues/127)) ([248816e](https://github.com/cloudquery/cloudquery-api-go/commit/248816e168734cf9b14913103999800008a491c2)) * Generate CloudQuery Go API Client from `spec.json` ([#129](https://github.com/cloudquery/cloudquery-api-go/issues/129)) ([b680d68](https://github.com/cloudquery/cloudquery-api-go/commit/b680d6879e7b99ad3cea24a09883ff2a705194b9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdd5c1f..6a509d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.7.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.4...v1.7.5) (2024-02-16) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#127](https://github.com/cloudquery/cloudquery-api-go/issues/127)) ([248816e](https://github.com/cloudquery/cloudquery-api-go/commit/248816e168734cf9b14913103999800008a491c2)) +* Generate CloudQuery Go API Client from `spec.json` ([#129](https://github.com/cloudquery/cloudquery-api-go/issues/129)) ([b680d68](https://github.com/cloudquery/cloudquery-api-go/commit/b680d6879e7b99ad3cea24a09883ff2a705194b9)) + ## [1.7.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.3...v1.7.4) (2024-02-14) From aca9d0c5123faf62de5e70bc139ba0015f830629 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:45:57 +0200 Subject: [PATCH 123/343] fix: Generate CloudQuery Go API Client from `spec.json` (#130) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 ++- spec.json | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/models.gen.go b/models.gen.go index 0b0ab68..8f76c16 100644 --- a/models.gen.go +++ b/models.gen.go @@ -159,6 +159,7 @@ const ( const ( SyncRunStatusCancelled SyncRunStatus = "cancelled" SyncRunStatusCompleted SyncRunStatus = "completed" + SyncRunStatusCreated SyncRunStatus = "created" SyncRunStatusFailed SyncRunStatus = "failed" SyncRunStatusStarted SyncRunStatus = "started" ) @@ -1383,7 +1384,7 @@ type SyncRun struct { CompletedAt *time.Time `json:"completed_at,omitempty"` // CreatedAt Whether the sync is disabled - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt time.Time `json:"created_at"` // Errors Number of errors encountered during the sync Errors int64 `json:"errors"` diff --git a/spec.json b/spec.json index e86b748..b550ddc 100644 --- a/spec.json +++ b/spec.json @@ -8232,17 +8232,18 @@ "completed", "failed", "started", - "cancelled" + "cancelled", + "created" ] }, "SyncRun": { "description": "Managed Sync Run definition", "type": "object", "required": [ + "created_at", "sync_name", "id", "status", - "started_at", "total_rows", "warnings", "errors" From 84ee52e4cd8feed20ddb31009280af9c2b46909c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:24:22 +0200 Subject: [PATCH 124/343] fix: Generate CloudQuery Go API Client from `spec.json` (#132) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/spec.json b/spec.json index b550ddc..8d4d944 100644 --- a/spec.json +++ b/spec.json @@ -8150,14 +8150,17 @@ }, "source": { "type": "string", - "description": "Unique name of the source" + "description": "Unique name of the source", + "pattern": "^[a-zA-Z0-9_-]+$" }, "destinations": { "type": "array", "items": { "type": "string", - "description": "Unique name of the destination" - } + "description": "Unique name of the destination", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "minItems": 1 }, "schedule": { "type": "string", @@ -8187,14 +8190,17 @@ "properties": { "source": { "type": "string", - "description": "Unique name of the source" + "description": "Unique name of the source", + "pattern": "^[a-zA-Z0-9_-]+$" }, "destinations": { "type": "array", "items": { "type": "string", - "description": "Unique name of the destination" - } + "description": "Unique name of the destination", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "minItems": 1 }, "schedule": { "type": "string", From 9e72ad24f24bfd51ce1842b2866dd74938e7464d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:43:20 +0200 Subject: [PATCH 125/343] fix: Generate CloudQuery Go API Client from `spec.json` (#133) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 1 + spec.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/models.gen.go b/models.gen.go index 8f76c16..3ef1635 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1228,6 +1228,7 @@ type Sync struct { // CreatedAt Time when the sync was created CreatedAt time.Time `json:"created_at"` + CreatedBy *string `json:"created_by,omitempty"` // Destinations List of destinations for the sync Destinations []string `json:"destinations"` diff --git a/spec.json b/spec.json index 8d4d944..6195432 100644 --- a/spec.json +++ b/spec.json @@ -8131,6 +8131,9 @@ "type": "string", "format": "date-time", "description": "Time when the sync was updated" + }, + "created_by": { + "type": "string" } } }, From 107e98fb861d35f8fa44d112757f1959dff8c5e6 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:43:58 +0200 Subject: [PATCH 126/343] fix: Generate CloudQuery Go API Client from `spec.json` (#134) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 68 ++++++++++++--------------------------------------- spec.json | 57 +++++++++++++++++++----------------------- 2 files changed, 40 insertions(+), 85 deletions(-) diff --git a/models.gen.go b/models.gen.go index 3ef1635..3cc551a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -118,41 +118,15 @@ const ( // Defines values for SyncDestinationMigrateMode. const ( - SyncDestinationMigrateModeForced SyncDestinationMigrateMode = "forced" - SyncDestinationMigrateModeSafe SyncDestinationMigrateMode = "safe" + Forced SyncDestinationMigrateMode = "forced" + Safe SyncDestinationMigrateMode = "safe" ) // Defines values for SyncDestinationWriteMode. const ( - SyncDestinationWriteModeAppend SyncDestinationWriteMode = "append" - SyncDestinationWriteModeOverwrite SyncDestinationWriteMode = "overwrite" - SyncDestinationWriteModeOverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" -) - -// Defines values for SyncDestinationCreateMigrateMode. -const ( - SyncDestinationCreateMigrateModeForced SyncDestinationCreateMigrateMode = "forced" - SyncDestinationCreateMigrateModeSafe SyncDestinationCreateMigrateMode = "safe" -) - -// Defines values for SyncDestinationCreateWriteMode. -const ( - SyncDestinationCreateWriteModeAppend SyncDestinationCreateWriteMode = "append" - SyncDestinationCreateWriteModeOverwrite SyncDestinationCreateWriteMode = "overwrite" - SyncDestinationCreateWriteModeOverwriteDeleteStale SyncDestinationCreateWriteMode = "overwrite-delete-stale" -) - -// Defines values for SyncDestinationUpdateMigrateMode. -const ( - Forced SyncDestinationUpdateMigrateMode = "forced" - Safe SyncDestinationUpdateMigrateMode = "safe" -) - -// Defines values for SyncDestinationUpdateWriteMode. -const ( - Append SyncDestinationUpdateWriteMode = "append" - Overwrite SyncDestinationUpdateWriteMode = "overwrite" - OverwriteDeleteStale SyncDestinationUpdateWriteMode = "overwrite-delete-stale" + Append SyncDestinationWriteMode = "append" + Overwrite SyncDestinationWriteMode = "overwrite" + OverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" ) // Defines values for SyncRunStatus. @@ -1302,19 +1276,13 @@ type SyncDestination struct { WriteMode SyncDestinationWriteMode `json:"write_mode"` } -// SyncDestinationMigrateMode Migrate mode for the destination -type SyncDestinationMigrateMode string - -// SyncDestinationWriteMode Write mode for the destination -type SyncDestinationWriteMode string - // SyncDestinationCreate Sync Destination Definition type SyncDestinationCreate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationCreateMigrateMode `json:"migrate_mode,omitempty"` + MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` @@ -1327,14 +1295,11 @@ type SyncDestinationCreate struct { Version string `json:"version"` // WriteMode Write mode for the destination - WriteMode *SyncDestinationCreateWriteMode `json:"write_mode,omitempty"` + WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } -// SyncDestinationCreateMigrateMode Migrate mode for the destination -type SyncDestinationCreateMigrateMode string - -// SyncDestinationCreateWriteMode Write mode for the destination -type SyncDestinationCreateWriteMode string +// SyncDestinationMigrateMode Migrate mode for the destination +type SyncDestinationMigrateMode string // SyncDestinationUpdate Sync Destination Definition type SyncDestinationUpdate struct { @@ -1342,7 +1307,7 @@ type SyncDestinationUpdate struct { Env *[]SyncEnvCreate `json:"env,omitempty"` // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationUpdateMigrateMode `json:"migrate_mode,omitempty"` + MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` // Path Plugin path in CloudQuery registry Path *SyncPluginPath `json:"path,omitempty"` @@ -1352,14 +1317,11 @@ type SyncDestinationUpdate struct { Version *string `json:"version,omitempty"` // WriteMode Write mode for the destination - WriteMode *SyncDestinationUpdateWriteMode `json:"write_mode,omitempty"` + WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } -// SyncDestinationUpdateMigrateMode Migrate mode for the destination -type SyncDestinationUpdateMigrateMode string - -// SyncDestinationUpdateWriteMode Write mode for the destination -type SyncDestinationUpdateWriteMode string +// SyncDestinationWriteMode Write mode for the destination +type SyncDestinationWriteMode string // SyncEnv Environment variable. Environment variables are assumed to be secret. type SyncEnv struct { @@ -1381,10 +1343,10 @@ type SyncPluginPath = string // SyncRun Managed Sync Run definition type SyncRun struct { - // CompletedAt Cron schedule for the sync + // CompletedAt Time the sync run was completed CompletedAt *time.Time `json:"completed_at,omitempty"` - // CreatedAt Whether the sync is disabled + // CreatedAt Time the sync run was created CreatedAt time.Time `json:"created_at"` // Errors Number of errors encountered during the sync diff --git a/spec.json b/spec.json index 6195432..3d65ada 100644 --- a/spec.json +++ b/spec.json @@ -7924,6 +7924,25 @@ } } }, + "SyncDestinationWriteMode": { + "type": "string", + "description": "Write mode for the destination", + "enum": [ + "append", + "overwrite", + "overwrite-delete-stale" + ], + "default": "overwrite-delete-stale" + }, + "SyncDestinationMigrateMode": { + "type": "string", + "description": "Migrate mode for the destination", + "enum": [ + "safe", + "forced" + ], + "default": "safe" + }, "SyncDestinationCreate": { "title": "Sync Destination definition for creating a new destination", "description": "Sync Destination Definition", @@ -7950,23 +7969,10 @@ "example": "v1.2.3" }, "write_mode": { - "type": "string", - "description": "Write mode for the destination", - "enum": [ - "append", - "overwrite", - "overwrite-delete-stale" - ], - "default": "overwrite-delete-stale" + "$ref": "#/components/schemas/SyncDestinationWriteMode" }, "migrate_mode": { - "type": "string", - "description": "Migrate mode for the destination", - "enum": [ - "safe", - "forced" - ], - "default": "safe" + "$ref": "#/components/schemas/SyncDestinationMigrateMode" }, "spec": { "type": "object", @@ -8039,23 +8045,10 @@ "example": "v1.2.3" }, "write_mode": { - "type": "string", - "description": "Write mode for the destination", - "enum": [ - "append", - "overwrite", - "overwrite-delete-stale" - ], - "default": "overwrite-delete-stale" + "$ref": "#/components/schemas/SyncDestinationWriteMode" }, "migrate_mode": { - "type": "string", - "description": "Migrate mode for the destination", - "enum": [ - "safe", - "forced" - ], - "default": "safe" + "$ref": "#/components/schemas/SyncDestinationMigrateMode" }, "spec": { "type": "object", @@ -8277,13 +8270,13 @@ "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", - "description": "Whether the sync is disabled" + "description": "Time the sync run was created" }, "completed_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", "type": "string", - "description": "Cron schedule for the sync" + "description": "Time the sync run was completed" }, "total_rows": { "type": "integer", From 76953109904102e91eae7462b3e73f5d03ae6b2a Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Fri, 15 Mar 2024 18:04:13 +0100 Subject: [PATCH 127/343] feat: Support sync test connection API tokens (#135) Similar to https://github.com/cloudquery/cloudquery-api-go/pull/109 Testing a connection is very similar to running a sync job, just with a different CLI command and permissions. It needs an API token to be able to download plugins and update the status of the test (it won't have access to update usage and progress line sync run API tokens) --- auth/token.go | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/auth/token.go b/auth/token.go index 2fd26b5..6276ad0 100644 --- a/auth/token.go +++ b/auth/token.go @@ -14,12 +14,13 @@ import ( ) const ( - FirebaseAPIKey = "AIzaSyCxsrwjABEF-dWLzUqmwiL-ct02cnG9GCs" - TokenBaseURL = "https://securetoken.googleapis.com" - EnvVarCloudQueryAPIKey = "CLOUDQUERY_API_KEY" - ExpiryBuffer = 60 * time.Second - tokenFilePath = "cloudquery/token" - syncRunAPIKeyPrefix = "cqsr_" + FirebaseAPIKey = "AIzaSyCxsrwjABEF-dWLzUqmwiL-ct02cnG9GCs" + TokenBaseURL = "https://securetoken.googleapis.com" + EnvVarCloudQueryAPIKey = "CLOUDQUERY_API_KEY" + ExpiryBuffer = 60 * time.Second + tokenFilePath = "cloudquery/token" + syncRunAPIKeyPrefix = "cqsr_" + syncTestConnectionAPIKeyPrefix = "cqstc_" ) type tokenResponse struct { @@ -39,6 +40,7 @@ const ( BearerToken APIKey SyncRunAPIKey + SyncTestConnectionAPIKey ) var UndefinedToken = Token{Type: Undefined, Value: ""} @@ -108,10 +110,14 @@ func (tc *TokenClient) GetToken() (Token, error) { // GetTokenType returns the type of token that will be returned by GetToken func (tc *TokenClient) GetTokenType() TokenType { if token := os.Getenv(EnvVarCloudQueryAPIKey); token != "" { - if strings.HasPrefix(token, syncRunAPIKeyPrefix) { + switch { + case strings.HasPrefix(token, syncRunAPIKeyPrefix): return SyncRunAPIKey + case strings.HasPrefix(token, syncTestConnectionAPIKeyPrefix): + return SyncTestConnectionAPIKey + default: + return APIKey } - return APIKey } return BearerToken } From a0317943ad9361965336a643f0bf2f4af80a9847 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 15 Mar 2024 19:08:21 +0200 Subject: [PATCH 128/343] chore(main): Release v1.8.0 (#131) :robot: I have created a release *beep* *boop* --- ## [1.8.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.5...v1.8.0) (2024-03-15) ### Features * Support sync test connection API tokens ([#135](https://github.com/cloudquery/cloudquery-api-go/issues/135)) ([7695310](https://github.com/cloudquery/cloudquery-api-go/commit/76953109904102e91eae7462b3e73f5d03ae6b2a)) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#130](https://github.com/cloudquery/cloudquery-api-go/issues/130)) ([aca9d0c](https://github.com/cloudquery/cloudquery-api-go/commit/aca9d0c5123faf62de5e70bc139ba0015f830629)) * Generate CloudQuery Go API Client from `spec.json` ([#132](https://github.com/cloudquery/cloudquery-api-go/issues/132)) ([84ee52e](https://github.com/cloudquery/cloudquery-api-go/commit/84ee52e4cd8feed20ddb31009280af9c2b46909c)) * Generate CloudQuery Go API Client from `spec.json` ([#133](https://github.com/cloudquery/cloudquery-api-go/issues/133)) ([9e72ad2](https://github.com/cloudquery/cloudquery-api-go/commit/9e72ad24f24bfd51ce1842b2866dd74938e7464d)) * Generate CloudQuery Go API Client from `spec.json` ([#134](https://github.com/cloudquery/cloudquery-api-go/issues/134)) ([107e98f](https://github.com/cloudquery/cloudquery-api-go/commit/107e98fb861d35f8fa44d112757f1959dff8c5e6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a509d2..7d81c0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [1.8.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.5...v1.8.0) (2024-03-15) + + +### Features + +* Support sync test connection API tokens ([#135](https://github.com/cloudquery/cloudquery-api-go/issues/135)) ([7695310](https://github.com/cloudquery/cloudquery-api-go/commit/76953109904102e91eae7462b3e73f5d03ae6b2a)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#130](https://github.com/cloudquery/cloudquery-api-go/issues/130)) ([aca9d0c](https://github.com/cloudquery/cloudquery-api-go/commit/aca9d0c5123faf62de5e70bc139ba0015f830629)) +* Generate CloudQuery Go API Client from `spec.json` ([#132](https://github.com/cloudquery/cloudquery-api-go/issues/132)) ([84ee52e](https://github.com/cloudquery/cloudquery-api-go/commit/84ee52e4cd8feed20ddb31009280af9c2b46909c)) +* Generate CloudQuery Go API Client from `spec.json` ([#133](https://github.com/cloudquery/cloudquery-api-go/issues/133)) ([9e72ad2](https://github.com/cloudquery/cloudquery-api-go/commit/9e72ad24f24bfd51ce1842b2866dd74938e7464d)) +* Generate CloudQuery Go API Client from `spec.json` ([#134](https://github.com/cloudquery/cloudquery-api-go/issues/134)) ([107e98f](https://github.com/cloudquery/cloudquery-api-go/commit/107e98fb861d35f8fa44d112757f1959dff8c5e6)) + ## [1.7.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.4...v1.7.5) (2024-02-16) From ffde20a66dd68faab42e67b77ebf7fd84ca0235b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:04:49 +0200 Subject: [PATCH 129/343] fix: Generate CloudQuery Go API Client from `spec.json` (#137) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 713 +++++++++++++++++++++++++++++++++++++++++++++++++- models.gen.go | 53 +++- spec.json | 253 ++++++++++++++++++ 3 files changed, 1012 insertions(+), 7 deletions(-) diff --git a/client.gen.go b/client.gen.go index 4619846..b7e3fa7 100644 --- a/client.gen.go +++ b/client.gen.go @@ -363,6 +363,11 @@ type ClientInterface interface { CreateSyncDestination(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // TestSyncDestinationWithBody request with any body + TestSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + TestSyncDestination(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteSyncDestination request DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -382,6 +387,11 @@ type ClientInterface interface { CreateSyncSource(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // TestSyncSourceWithBody request with any body + TestSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + TestSyncSource(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteSyncSource request DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -401,6 +411,14 @@ type ClientInterface interface { CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetSyncTestConnection request + GetSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSyncTestConnectionWithBody request with any body + UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteSync request DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1669,6 +1687,30 @@ func (c *Client) CreateSyncDestination(ctx context.Context, teamName TeamName, b return c.Client.Do(req) } +func (c *Client) TestSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTestSyncDestinationRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TestSyncDestination(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTestSyncDestinationRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncDestinationRequest(c.Server, teamName, syncDestinationName) if err != nil { @@ -1753,6 +1795,30 @@ func (c *Client) CreateSyncSource(ctx context.Context, teamName TeamName, body C return c.Client.Do(req) } +func (c *Client) TestSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTestSyncSourceRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) TestSyncSource(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewTestSyncSourceRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncSourceRequest(c.Server, teamName, syncSourceName) if err != nil { @@ -1837,6 +1903,42 @@ func (c *Client) CreateSync(ctx context.Context, teamName TeamName, body CreateS return c.Client.Do(req) } +func (c *Client) GetSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncTestConnectionRequest(c.Server, teamName, syncTestConnectionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncTestConnectionRequest(c.Server, teamName, syncTestConnectionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncRequest(c.Server, teamName, syncName) if err != nil { @@ -6619,6 +6721,53 @@ func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, c return req, nil } +// NewTestSyncDestinationRequest calls the generic TestSyncDestination builder with application/json body +func NewTestSyncDestinationRequest(server string, teamName TeamName, body TestSyncDestinationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewTestSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewTestSyncDestinationRequestWithBody generates requests for TestSyncDestination with any type of body +func NewTestSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/test", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewDeleteSyncDestinationRequest generates requests for DeleteSyncDestination func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { var err error @@ -6874,6 +7023,53 @@ func NewCreateSyncSourceRequestWithBody(server string, teamName TeamName, conten return req, nil } +// NewTestSyncSourceRequest calls the generic TestSyncSource builder with application/json body +func NewTestSyncSourceRequest(server string, teamName TeamName, body TestSyncSourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewTestSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewTestSyncSourceRequestWithBody generates requests for TestSyncSource with any type of body +func NewTestSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-sources/test", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewDeleteSyncSourceRequest generates requests for DeleteSyncSource func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { var err error @@ -7129,6 +7325,101 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return req, nil } +// NewGetSyncTestConnectionRequest generates requests for GetSyncTestConnection +func NewGetSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateSyncTestConnectionRequest calls the generic UpdateSyncTestConnection builder with application/json body +func NewUpdateSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) +} + +// NewUpdateSyncTestConnectionRequestWithBody generates requests for UpdateSyncTestConnection with any type of body +func NewUpdateSyncTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewDeleteSyncRequest generates requests for DeleteSync func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error @@ -8439,6 +8730,11 @@ type ClientWithResponsesInterface interface { CreateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) + // TestSyncDestinationWithBodyWithResponse request with any body + TestSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) + + TestSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) + // DeleteSyncDestinationWithResponse request DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) @@ -8458,6 +8754,11 @@ type ClientWithResponsesInterface interface { CreateSyncSourceWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) + // TestSyncSourceWithBodyWithResponse request with any body + TestSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) + + TestSyncSourceWithResponse(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) + // DeleteSyncSourceWithResponse request DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) @@ -8477,6 +8778,14 @@ type ClientWithResponsesInterface interface { CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + // GetSyncTestConnectionWithResponse request + GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) + + // UpdateSyncTestConnectionWithBodyWithResponse request with any body + UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) + + UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) + // DeleteSyncWithResponse request DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) @@ -10539,9 +10848,11 @@ func (r CreateSyncDestinationResponse) StatusCode() int { return 0 } -type DeleteSyncDestinationResponse struct { +type TestSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *SyncTestConnection + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity @@ -10549,7 +10860,7 @@ type DeleteSyncDestinationResponse struct { } // Status returns HTTPResponse.Status -func (r DeleteSyncDestinationResponse) Status() string { +func (r TestSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10557,14 +10868,39 @@ func (r DeleteSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncDestinationResponse) StatusCode() int { +func (r TestSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncDestinationResponse struct { +type DeleteSyncDestinationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteSyncDestinationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSyncDestinationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SyncDestination @@ -10671,6 +11007,33 @@ func (r CreateSyncSourceResponse) StatusCode() int { return 0 } +type TestSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncTestConnection + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r TestSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r TestSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteSyncSourceResponse struct { Body []byte HTTPResponse *http.Response @@ -10802,6 +11165,58 @@ func (r CreateSyncResponse) StatusCode() int { return 0 } +type GetSyncTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncTestConnection + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncTestConnection + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteSyncResponse struct { Body []byte HTTPResponse *http.Response @@ -12184,6 +12599,23 @@ func (c *ClientWithResponses) CreateSyncDestinationWithResponse(ctx context.Cont return ParseCreateSyncDestinationResponse(rsp) } +// TestSyncDestinationWithBodyWithResponse request with arbitrary body returning *TestSyncDestinationResponse +func (c *ClientWithResponses) TestSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) { + rsp, err := c.TestSyncDestinationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseTestSyncDestinationResponse(rsp) +} + +func (c *ClientWithResponses) TestSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) { + rsp, err := c.TestSyncDestination(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseTestSyncDestinationResponse(rsp) +} + // DeleteSyncDestinationWithResponse request returning *DeleteSyncDestinationResponse func (c *ClientWithResponses) DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) { rsp, err := c.DeleteSyncDestination(ctx, teamName, syncDestinationName, reqEditors...) @@ -12245,6 +12677,23 @@ func (c *ClientWithResponses) CreateSyncSourceWithResponse(ctx context.Context, return ParseCreateSyncSourceResponse(rsp) } +// TestSyncSourceWithBodyWithResponse request with arbitrary body returning *TestSyncSourceResponse +func (c *ClientWithResponses) TestSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) { + rsp, err := c.TestSyncSourceWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseTestSyncSourceResponse(rsp) +} + +func (c *ClientWithResponses) TestSyncSourceWithResponse(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) { + rsp, err := c.TestSyncSource(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseTestSyncSourceResponse(rsp) +} + // DeleteSyncSourceWithResponse request returning *DeleteSyncSourceResponse func (c *ClientWithResponses) DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) { rsp, err := c.DeleteSyncSource(ctx, teamName, syncSourceName, reqEditors...) @@ -12306,6 +12755,32 @@ func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamNa return ParseCreateSyncResponse(rsp) } +// GetSyncTestConnectionWithResponse request returning *GetSyncTestConnectionResponse +func (c *ClientWithResponses) GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) { + rsp, err := c.GetSyncTestConnection(ctx, teamName, syncTestConnectionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncTestConnectionResponse(rsp) +} + +// UpdateSyncTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionResponse +func (c *ClientWithResponses) UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { + rsp, err := c.UpdateSyncTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { + rsp, err := c.UpdateSyncTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionResponse(rsp) +} + // DeleteSyncWithResponse request returning *DeleteSyncResponse func (c *ClientWithResponses) DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) { rsp, err := c.DeleteSync(ctx, teamName, syncName, reqEditors...) @@ -16586,6 +17061,67 @@ func ParseCreateSyncDestinationResponse(rsp *http.Response) (*CreateSyncDestinat return response, nil } +// ParseTestSyncDestinationResponse parses an HTTP response from a TestSyncDestinationWithResponse call +func ParseTestSyncDestinationResponse(rsp *http.Response) (*TestSyncDestinationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TestSyncDestinationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteSyncDestinationResponse parses an HTTP response from a DeleteSyncDestinationWithResponse call func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -16852,6 +17388,67 @@ func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceRespons return response, nil } +// ParseTestSyncSourceResponse parses an HTTP response from a TestSyncSourceWithResponse call +func ParseTestSyncSourceResponse(rsp *http.Response) (*TestSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TestSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteSyncSourceResponse parses an HTTP response from a DeleteSyncSourceWithResponse call func ParseDeleteSyncSourceResponse(rsp *http.Response) (*DeleteSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -17111,6 +17708,114 @@ func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { return response, nil } +// ParseGetSyncTestConnectionResponse parses an HTTP response from a GetSyncTestConnectionWithResponse call +func ParseGetSyncTestConnectionResponse(rsp *http.Response) (*GetSyncTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateSyncTestConnectionResponse parses an HTTP response from a UpdateSyncTestConnectionWithResponse call +func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSyncTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteSyncResponse parses an HTTP response from a DeleteSyncWithResponse call func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 3cc551a..b464ca8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -138,6 +138,14 @@ const ( SyncRunStatusStarted SyncRunStatus = "started" ) +// Defines values for SyncTestConnectionStatus. +const ( + SyncTestConnectionStatusCompleted SyncTestConnectionStatus = "completed" + SyncTestConnectionStatusCreated SyncTestConnectionStatus = "created" + SyncTestConnectionStatusFailed SyncTestConnectionStatus = "failed" + SyncTestConnectionStatusStarted SyncTestConnectionStatus = "started" +) + // Defines values for TeamPlan. const ( Free TeamPlan = "free" @@ -146,9 +154,9 @@ const ( // Defines values for TeamSubscriptionOrderStatus. const ( - TeamSubscriptionOrderStatusCancelled TeamSubscriptionOrderStatus = "cancelled" - TeamSubscriptionOrderStatusCompleted TeamSubscriptionOrderStatus = "completed" - TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" + Cancelled TeamSubscriptionOrderStatus = "cancelled" + Completed TeamSubscriptionOrderStatus = "completed" + Pending TeamSubscriptionOrderStatus = "pending" ) // Defines values for AddonSortBy. @@ -1443,6 +1451,27 @@ type SyncSourceUpdate struct { Version *string `json:"version,omitempty"` } +// SyncTestConnection defines model for SyncTestConnection. +type SyncTestConnection struct { + // CompletedAt Cron schedule for the sync + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CreatedAt Whether the sync is disabled + CreatedAt time.Time `json:"created_at"` + + // Id unique ID of the test connection + ID ID `json:"id"` + + // Status The status of the sync run + Status SyncTestConnectionStatus `json:"status"` +} + +// ID unique ID of the test connection +type ID = openapi_types.UUID + +// SyncTestConnectionStatus The status of the sync run +type SyncTestConnectionStatus string + // SyncUpdate Managed Sync definition type SyncUpdate struct { // Cpu CPU quota for the sync @@ -1650,6 +1679,9 @@ type SyncRunId = SyncRunID // SyncSourceName Unique name of the sync source type SyncSourceName = string +// SyncTestConnectionId unique ID of the test connection +type SyncTestConnectionId = ID + // TargetName defines model for target_name. type TargetName = string @@ -2050,6 +2082,12 @@ type ListSyncsParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } +// UpdateSyncTestConnectionJSONBody defines parameters for UpdateSyncTestConnection. +type UpdateSyncTestConnectionJSONBody struct { + // Status The status of the sync run + Status SyncTestConnectionStatus `json:"status"` +} + // ListSyncRunsParams defines parameters for ListSyncRuns. type ListSyncRunsParams struct { // PerPage The number of results per page (max 1000). @@ -2205,18 +2243,27 @@ type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate // CreateSyncDestinationJSONRequestBody defines body for CreateSyncDestination for application/json ContentType. type CreateSyncDestinationJSONRequestBody = SyncDestinationCreate +// TestSyncDestinationJSONRequestBody defines body for TestSyncDestination for application/json ContentType. +type TestSyncDestinationJSONRequestBody = SyncDestinationCreate + // UpdateSyncDestinationJSONRequestBody defines body for UpdateSyncDestination for application/json ContentType. type UpdateSyncDestinationJSONRequestBody = SyncDestinationUpdate // CreateSyncSourceJSONRequestBody defines body for CreateSyncSource for application/json ContentType. type CreateSyncSourceJSONRequestBody = SyncSourceCreate +// TestSyncSourceJSONRequestBody defines body for TestSyncSource for application/json ContentType. +type TestSyncSourceJSONRequestBody = SyncSourceCreate + // UpdateSyncSourceJSONRequestBody defines body for UpdateSyncSource for application/json ContentType. type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate // CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. type CreateSyncJSONRequestBody = SyncCreate +// UpdateSyncTestConnectionJSONRequestBody defines body for UpdateSyncTestConnection for application/json ContentType. +type UpdateSyncTestConnectionJSONRequestBody UpdateSyncTestConnectionJSONBody + // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. type UpdateSyncJSONRequestBody = SyncUpdate diff --git a/spec.json b/spec.json index 3d65ada..8ac824d 100644 --- a/spec.json +++ b/spec.json @@ -4651,6 +4651,57 @@ } } }, + "/teams/{team_name}/sync-sources/test": { + "post": { + "description": "Test a Sync Source definition.", + "operationId": "TestSyncSource", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncSourceCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncTestConnection" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, "/teams/{team_name}/sync-sources/{sync_source_name}": { "get": { "description": "Get a single sync source definition.", @@ -4877,6 +4928,57 @@ } } }, + "/teams/{team_name}/sync-destinations/test": { + "post": { + "description": "Test a Sync Destination definition.", + "operationId": "TestSyncDestination", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncDestinationCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncTestConnection" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } + }, "/teams/{team_name}/sync-destinations/{sync_destination_name}": { "get": { "description": "Get a single sync destination definition.", @@ -5580,6 +5682,103 @@ } } } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}": { + "get": { + "description": "Get a Sync Test Connection", + "operationId": "GetSyncTestConnection", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_test_connection_id" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncTestConnection" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + }, + "patch": { + "description": "Update a Sync Test Connection", + "operationId": "UpdateSyncTestConnection", + "tags": [ + "syncs" + ], + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "$ref": "#/components/parameters/sync_test_connection_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/SyncTestConnectionStatus" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncTestConnection" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + } + } } }, "components": { @@ -7882,6 +8081,52 @@ } ] }, + "SyncTestConnectionID": { + "type": "string", + "format": "uuid", + "example": "12345678-1234-1234-1234-1234567890ab", + "description": "unique ID of the test connection", + "x-go-name": "ID" + }, + "SyncTestConnectionStatus": { + "description": "The status of the sync run", + "type": "string", + "enum": [ + "completed", + "failed", + "started", + "created" + ] + }, + "SyncTestConnection": { + "type": "object", + "required": [ + "id", + "created_at", + "status" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/SyncTestConnectionID" + }, + "status": { + "$ref": "#/components/schemas/SyncTestConnectionStatus", + "description": "Status of the sync test connection" + }, + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "Whether the sync is disabled" + }, + "completed_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "Cron schedule for the sync" + } + } + }, "SyncSourceUpdate": { "title": "Sync Source definition for creating a new source", "description": "Sync Source Update Definition", @@ -8656,6 +8901,14 @@ "schema": { "$ref": "#/components/schemas/SyncRunID" } + }, + "sync_test_connection_id": { + "name": "sync_test_connection_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SyncTestConnectionID" + } } } } From 7ca69adc18811d986d9a94f2cd32de659be726a0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:06:44 +0200 Subject: [PATCH 130/343] chore(main): Release v1.8.1 (#138) :robot: I have created a release *beep* *boop* --- ## [1.8.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.0...v1.8.1) (2024-03-18) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#137](https://github.com/cloudquery/cloudquery-api-go/issues/137)) ([ffde20a](https://github.com/cloudquery/cloudquery-api-go/commit/ffde20a66dd68faab42e67b77ebf7fd84ca0235b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d81c0b..bdabe1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.8.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.0...v1.8.1) (2024-03-18) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#137](https://github.com/cloudquery/cloudquery-api-go/issues/137)) ([ffde20a](https://github.com/cloudquery/cloudquery-api-go/commit/ffde20a66dd68faab42e67b77ebf7fd84ca0235b)) + ## [1.8.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.5...v1.8.0) (2024-03-15) From 0eb73912341ed29313c58d35828f7e548e5893fc Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 22 Mar 2024 18:29:23 +0200 Subject: [PATCH 131/343] fix: Generate CloudQuery Go API Client from `spec.json` (#139) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 27 +++++++++++++++++++++++++++ spec.json | 26 ++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index b464ca8..87513fc 100644 --- a/models.gen.go +++ b/models.gen.go @@ -129,6 +129,12 @@ const ( OverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" ) +// Defines values for SyncLastUpdateSource. +const ( + Ui SyncLastUpdateSource = "ui" + Yaml SyncLastUpdateSource = "yaml" +) + // Defines values for SyncRunStatus. const ( SyncRunStatusCancelled SyncRunStatus = "cancelled" @@ -1264,6 +1270,9 @@ type SyncDestination struct { // Env Environment variables for the plugin. Env []SyncEnv `json:"env"` + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource SyncLastUpdateSource `json:"last_update_source"` + // MigrateMode Migrate mode for the destination MigrateMode SyncDestinationMigrateMode `json:"migrate_mode"` @@ -1289,6 +1298,9 @@ type SyncDestinationCreate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + // MigrateMode Migrate mode for the destination MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` @@ -1314,6 +1326,9 @@ type SyncDestinationUpdate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + // MigrateMode Migrate mode for the destination MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` @@ -1346,6 +1361,9 @@ type SyncEnvCreate struct { Value string `json:"value"` } +// SyncLastUpdateSource How was the source or destination been created or updated last +type SyncLastUpdateSource string + // SyncPluginPath Plugin path in CloudQuery registry type SyncPluginPath = string @@ -1390,6 +1408,9 @@ type SyncSource struct { // Env Environment variables for the plugin. Env []SyncEnv `json:"env"` + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource SyncLastUpdateSource `json:"last_update_source"` + // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` @@ -1415,6 +1436,9 @@ type SyncSourceCreate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` @@ -1437,6 +1461,9 @@ type SyncSourceUpdate struct { // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + // Path Plugin path in CloudQuery registry Path *SyncPluginPath `json:"path,omitempty"` diff --git a/spec.json b/spec.json index 8ac824d..2267851 100644 --- a/spec.json +++ b/spec.json @@ -7972,6 +7972,14 @@ } } }, + "SyncLastUpdateSource": { + "description": "How was the source or destination been created or updated last", + "type": "string", + "enum": [ + "yaml", + "ui" + ] + }, "SyncSourceCreate": { "title": "Sync Source definition for creating a new source", "description": "Sync Source Definition", @@ -8023,6 +8031,9 @@ "items": { "$ref": "#/components/schemas/SyncEnvCreate" } + }, + "last_update_source": { + "$ref": "#/components/schemas/SyncLastUpdateSource" } } }, @@ -8055,7 +8066,8 @@ "spec", "env", "created_at", - "updated_at" + "updated_at", + "last_update_source" ], "properties": { "created_at": { @@ -8166,6 +8178,9 @@ "items": { "$ref": "#/components/schemas/SyncEnvCreate" } + }, + "last_update_source": { + "$ref": "#/components/schemas/SyncLastUpdateSource" } } }, @@ -8230,6 +8245,9 @@ "items": { "$ref": "#/components/schemas/SyncEnvCreate" } + }, + "last_update_source": { + "$ref": "#/components/schemas/SyncLastUpdateSource" } } }, @@ -8249,7 +8267,8 @@ "spec", "env", "created_at", - "updated_at" + "updated_at", + "last_update_source" ], "properties": { "created_at": { @@ -8306,6 +8325,9 @@ "items": { "$ref": "#/components/schemas/SyncEnvCreate" } + }, + "last_update_source": { + "$ref": "#/components/schemas/SyncLastUpdateSource" } } }, From bf7b4e60808a4c48de4b5d9b83cb2d9968e2dc17 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Thu, 28 Mar 2024 12:28:44 +0100 Subject: [PATCH 132/343] feat: Add retry to API requests (#141) Looks like this is the only way to inject the retry client, there's also https://github.com/deepmap/oapi-codegen/issues/150 which is in progress via https://github.com/deepmap/oapi-codegen/pull/156 --- client.gen.go | 2 + client.yaml | 4 + go.mod | 2 + go.sum | 6 + templates/client.tmpl | 313 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 327 insertions(+) create mode 100644 templates/client.tmpl diff --git a/client.gen.go b/client.gen.go index b7e3fa7..091f789 100644 --- a/client.gen.go +++ b/client.gen.go @@ -14,6 +14,7 @@ import ( "strings" "github.com/deepmap/oapi-codegen/pkg/runtime" + "github.com/hashicorp/go-retryablehttp" ) // RequestEditorFn is the function signature for the RequestEditor callback function @@ -48,6 +49,7 @@ type ClientOption func(*Client) error // Creates a new Client, with reasonable defaults func NewClient(server string, opts ...ClientOption) (*Client, error) { + opts = append([]ClientOption{WithHTTPClient(retryablehttp.NewClient().StandardClient())}, opts...) // create a client with sane default values client := Client{ Server: server, diff --git a/client.yaml b/client.yaml index 1a12bc4..d1dc280 100644 --- a/client.yaml +++ b/client.yaml @@ -2,3 +2,7 @@ package: cloudquery_api generate: client: true output: client.gen.go +output-options: + user-templates: + # Based on https://github.com/deepmap/oapi-codegen/blob/v1.15.0/pkg/codegen/templates/client.tmpl + client.tmpl: templates/client.tmpl diff --git a/go.mod b/go.mod index a1a6a36..f5118f9 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21.0 require ( github.com/adrg/xdg v0.4.0 github.com/deepmap/oapi-codegen v1.15.0 + github.com/hashicorp/go-retryablehttp v0.7.5 github.com/stretchr/testify v1.8.4 ) @@ -33,6 +34,7 @@ require ( github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 // indirect github.com/google/uuid v1.3.1 // indirect github.com/gorilla/css v1.0.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/iris-contrib/schema v0.0.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect diff --git a/go.sum b/go.sum index 70e4993..def0426 100644 --- a/go.sum +++ b/go.sum @@ -73,6 +73,12 @@ github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= +github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= diff --git a/templates/client.tmpl b/templates/client.tmpl new file mode 100644 index 0000000..8d2f604 --- /dev/null +++ b/templates/client.tmpl @@ -0,0 +1,313 @@ +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +{{$clientTypeName := opts.OutputOptions.ClientTypeName -}} + +// {{ $clientTypeName }} which conforms to the OpenAPI3 specification for this service. +type {{ $clientTypeName }} struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*{{ $clientTypeName }}) error + +// Creates a new {{ $clientTypeName }}, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*{{ $clientTypeName }}, error) { + opts = append([]ClientOption{WithHTTPClient(retryablehttp.NewClient().StandardClient())}, opts...) + // create a client with sane default values + client := {{ $clientTypeName }}{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *{{ $clientTypeName }}) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *{{ $clientTypeName }}) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { +{{range . -}} +{{$hasParams := .RequiresParamObject -}} +{{$pathParams := .PathParams -}} +{{$opid := .OperationId -}} + // {{$opid}}{{if .HasBody}}WithBody{{end}} request{{if .HasBody}} with any body{{end}} + {{$opid}}{{if .HasBody}}WithBody{{end}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}{{if .HasBody}}, contentType string, body io.Reader{{end}}, reqEditors... RequestEditorFn) (*http.Response, error) +{{range .Bodies}} + {{if .IsSupportedByClient -}} + {{$opid}}{{.Suffix}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}, body {{$opid}}{{.NameTag}}RequestBody, reqEditors... RequestEditorFn) (*http.Response, error) + {{end -}} +{{end}}{{/* range .Bodies */}} +{{end}}{{/* range . $opid := .OperationId */}} +} + + +{{/* Generate client methods */}} +{{range . -}} +{{$hasParams := .RequiresParamObject -}} +{{$pathParams := .PathParams -}} +{{$opid := .OperationId -}} + +func (c *{{ $clientTypeName }}) {{$opid}}{{if .HasBody}}WithBody{{end}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}{{if .HasBody}}, contentType string, body io.Reader{{end}}, reqEditors... RequestEditorFn) (*http.Response, error) { + req, err := New{{$opid}}Request{{if .HasBody}}WithBody{{end}}(c.Server{{genParamNames .PathParams}}{{if $hasParams}}, params{{end}}{{if .HasBody}}, contentType, body{{end}}) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +{{range .Bodies}} +{{if .IsSupportedByClient -}} +func (c *{{ $clientTypeName }}) {{$opid}}{{.Suffix}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}, body {{$opid}}{{.NameTag}}RequestBody, reqEditors... RequestEditorFn) (*http.Response, error) { + req, err := New{{$opid}}Request{{.Suffix}}(c.Server{{genParamNames $pathParams}}{{if $hasParams}}, params{{end}}, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} +{{end -}}{{/* if .IsSupported */}} +{{end}}{{/* range .Bodies */}} +{{end}} + +{{/* Generate request builders */}} +{{range .}} +{{$hasParams := .RequiresParamObject -}} +{{$pathParams := .PathParams -}} +{{$bodyRequired := .BodyRequired -}} +{{$opid := .OperationId -}} + +{{range .Bodies}} +{{if .IsSupportedByClient -}} +// New{{$opid}}Request{{.Suffix}} calls the generic {{$opid}} builder with {{.ContentType}} body +func New{{$opid}}Request{{.Suffix}}(server string{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}, body {{$opid}}{{.NameTag}}RequestBody) (*http.Request, error) { + var bodyReader io.Reader + {{if .IsJSON -}} + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + {{else if eq .NameTag "Formdata" -}} + bodyStr, err := runtime.MarshalForm(body, nil) + if err != nil { + return nil, err + } + bodyReader = strings.NewReader(bodyStr.Encode()) + {{else if eq .NameTag "Text" -}} + bodyReader = strings.NewReader(string(body)) + {{end -}} + return New{{$opid}}RequestWithBody(server{{genParamNames $pathParams}}{{if $hasParams}}, params{{end}}, "{{.ContentType}}", bodyReader) +} +{{end -}} +{{end}} + +// New{{$opid}}Request{{if .HasBody}}WithBody{{end}} generates requests for {{$opid}}{{if .HasBody}} with any type of body{{end}} +func New{{$opid}}Request{{if .HasBody}}WithBody{{end}}(server string{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}{{if .HasBody}}, contentType string, body io.Reader{{end}}) (*http.Request, error) { + var err error +{{range $paramIdx, $param := .PathParams}} + var pathParam{{$paramIdx}} string + {{if .IsPassThrough}} + pathParam{{$paramIdx}} = {{.GoVariableName}} + {{end}} + {{if .IsJson}} + var pathParamBuf{{$paramIdx}} []byte + pathParamBuf{{$paramIdx}}, err = json.Marshal({{.GoVariableName}}) + if err != nil { + return nil, err + } + pathParam{{$paramIdx}} = string(pathParamBuf{{$paramIdx}}) + {{end}} + {{if .IsStyled}} + pathParam{{$paramIdx}}, err = runtime.StyleParamWithLocation("{{.Style}}", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationPath, {{.GoVariableName}}) + if err != nil { + return nil, err + } + {{end}} +{{end}} + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("{{genParamFmtString .Path}}"{{range $paramIdx, $param := .PathParams}}, pathParam{{$paramIdx}}{{end}}) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + +{{if .QueryParams}} + if params != nil { + queryValues := queryURL.Query() + {{range $paramIdx, $param := .QueryParams}} + {{if not .Required}} if params.{{.GoName}} != nil { {{end}} + {{if .IsPassThrough}} + queryValues.Add("{{.ParamName}}", {{if not .Required}}*{{end}}params.{{.GoName}}) + {{end}} + {{if .IsJson}} + if queryParamBuf, err := json.Marshal({{if not .Required}}*{{end}}params.{{.GoName}}); err != nil { + return nil, err + } else { + queryValues.Add("{{.ParamName}}", string(queryParamBuf)) + } + + {{end}} + {{if .IsStyled}} + if queryFrag, err := runtime.StyleParamWithLocation("{{.Style}}", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationQuery, {{if not .Required}}*{{end}}params.{{.GoName}}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + {{end}} + {{if not .Required}}}{{end}} + {{end}} + queryURL.RawQuery = queryValues.Encode() + } +{{end}}{{/* if .QueryParams */}} + req, err := http.NewRequest("{{.Method}}", queryURL.String(), {{if .HasBody}}body{{else}}nil{{end}}) + if err != nil { + return nil, err + } + + {{if .HasBody}}req.Header.Add("Content-Type", contentType){{end}} +{{ if .HeaderParams }} + if params != nil { + {{range $paramIdx, $param := .HeaderParams}} + {{if not .Required}} if params.{{.GoName}} != nil { {{end}} + var headerParam{{$paramIdx}} string + {{if .IsPassThrough}} + headerParam{{$paramIdx}} = {{if not .Required}}*{{end}}params.{{.GoName}} + {{end}} + {{if .IsJson}} + var headerParamBuf{{$paramIdx}} []byte + headerParamBuf{{$paramIdx}}, err = json.Marshal({{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + headerParam{{$paramIdx}} = string(headerParamBuf{{$paramIdx}}) + {{end}} + {{if .IsStyled}} + headerParam{{$paramIdx}}, err = runtime.StyleParamWithLocation("{{.Style}}", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationHeader, {{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + {{end}} + req.Header.Set("{{.ParamName}}", headerParam{{$paramIdx}}) + {{if not .Required}}}{{end}} + {{end}} + } +{{- end }}{{/* if .HeaderParams */}} + +{{ if .CookieParams }} + if params != nil { + {{range $paramIdx, $param := .CookieParams}} + {{if not .Required}} if params.{{.GoName}} != nil { {{end}} + var cookieParam{{$paramIdx}} string + {{if .IsPassThrough}} + cookieParam{{$paramIdx}} = {{if not .Required}}*{{end}}params.{{.GoName}} + {{end}} + {{if .IsJson}} + var cookieParamBuf{{$paramIdx}} []byte + cookieParamBuf{{$paramIdx}}, err = json.Marshal({{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + cookieParam{{$paramIdx}} = url.QueryEscape(string(cookieParamBuf{{$paramIdx}})) + {{end}} + {{if .IsStyled}} + cookieParam{{$paramIdx}}, err = runtime.StyleParamWithLocation("simple", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationCookie, {{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + {{end}} + cookie{{$paramIdx}} := &http.Cookie{ + Name:"{{.ParamName}}", + Value:cookieParam{{$paramIdx}}, + } + req.AddCookie(cookie{{$paramIdx}}) + {{if not .Required}}}{{end}} + {{ end -}} + } +{{- end }}{{/* if .CookieParams */}} + return req, nil +} + +{{end}}{{/* Range */}} + +func (c *{{ $clientTypeName }}) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} From d49f87020fb307a5696c049fc2aa25f926353b9f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:29:52 +0200 Subject: [PATCH 133/343] chore(main): Release v1.9.0 (#140) :robot: I have created a release *beep* *boop* --- ## [1.9.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.1...v1.9.0) (2024-03-28) ### Features * Add retry to API requests ([#141](https://github.com/cloudquery/cloudquery-api-go/issues/141)) ([bf7b4e6](https://github.com/cloudquery/cloudquery-api-go/commit/bf7b4e60808a4c48de4b5d9b83cb2d9968e2dc17)) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#139](https://github.com/cloudquery/cloudquery-api-go/issues/139)) ([0eb7391](https://github.com/cloudquery/cloudquery-api-go/commit/0eb73912341ed29313c58d35828f7e548e5893fc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdabe1f..cde2c2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.9.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.1...v1.9.0) (2024-03-28) + + +### Features + +* Add retry to API requests ([#141](https://github.com/cloudquery/cloudquery-api-go/issues/141)) ([bf7b4e6](https://github.com/cloudquery/cloudquery-api-go/commit/bf7b4e60808a4c48de4b5d9b83cb2d9968e2dc17)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#139](https://github.com/cloudquery/cloudquery-api-go/issues/139)) ([0eb7391](https://github.com/cloudquery/cloudquery-api-go/commit/0eb73912341ed29313c58d35828f7e548e5893fc)) + ## [1.8.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.0...v1.8.1) (2024-03-18) From b8ead7c4ae372f36266dd437f0590067ce731598 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:37:58 +0300 Subject: [PATCH 134/343] fix: Generate CloudQuery Go API Client from `spec.json` (#142) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 706 +++++++++++++++++++++++++++++++++++++++++++++++--- models.gen.go | 47 +++- spec.json | 263 ++++++++++++++++++- 3 files changed, 980 insertions(+), 36 deletions(-) diff --git a/client.gen.go b/client.gen.go index 091f789..7a640df 100644 --- a/client.gen.go +++ b/client.gen.go @@ -346,6 +346,22 @@ type ClientInterface interface { // DownloadPluginAssetByTeam request DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteSpendingLimit request + DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSpendingLimit request + GetSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSpendingLimitWithBody request with any body + CreateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSpendingLimit(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSpendingLimitWithBody request with any body + UpdateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSpendingLimit(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSubscriptionOrdersByTeam request ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1605,6 +1621,78 @@ func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamNam return c.Client.Do(req) } +func (c *Client) DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSpendingLimitRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSpendingLimitRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSpendingLimit(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSpendingLimitRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSpendingLimit(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSpendingLimitRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSubscriptionOrdersByTeamRequest(c.Server, teamName, params) if err != nil { @@ -6444,6 +6532,168 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return req, nil } +// NewDeleteSpendingLimitRequest generates requests for DeleteSpendingLimit +func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetSpendingLimitRequest generates requests for GetSpendingLimit +func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateSpendingLimitRequest calls the generic CreateSpendingLimit builder with application/json body +func NewCreateSpendingLimitRequest(server string, teamName TeamName, body CreateSpendingLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateSpendingLimitRequestWithBody generates requests for CreateSpendingLimit with any type of body +func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUpdateSpendingLimitRequest calls the generic UpdateSpendingLimit builder with application/json body +func NewUpdateSpendingLimitRequest(server string, teamName TeamName, body UpdateSpendingLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewUpdateSpendingLimitRequestWithBody generates requests for UpdateSpendingLimit with any type of body +func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { var err error @@ -8713,6 +8963,22 @@ type ClientWithResponsesInterface interface { // DownloadPluginAssetByTeamWithResponse request DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + // DeleteSpendingLimitWithResponse request + DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) + + // GetSpendingLimitWithResponse request + GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) + + // CreateSpendingLimitWithBodyWithResponse request with any body + CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) + + CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) + + // UpdateSpendingLimitWithBodyWithResponse request with any body + UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) + + UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) + // ListSubscriptionOrdersByTeamWithResponse request ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) @@ -10712,21 +10978,17 @@ func (r DownloadPluginAssetByTeamResponse) StatusCode() int { return 0 } -type ListSubscriptionOrdersByTeamResponse struct { +type DeleteSpendingLimitResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []TeamSubscriptionOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSubscriptionOrdersByTeamResponse) Status() string { +func (r DeleteSpendingLimitResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10734,27 +10996,25 @@ func (r ListSubscriptionOrdersByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSubscriptionOrdersByTeamResponse) StatusCode() int { +func (r DeleteSpendingLimitResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSubscriptionOrderForTeamResponse struct { +type GetSpendingLimitResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *TeamSubscriptionOrder - JSON400 *BadRequest + JSON200 *SpendingLimit JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSubscriptionOrderForTeamResponse) Status() string { +func (r GetSpendingLimitResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10762,25 +11022,26 @@ func (r CreateSubscriptionOrderForTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSubscriptionOrderForTeamResponse) StatusCode() int { +func (r GetSpendingLimitResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSubscriptionOrderByTeamResponse struct { +type CreateSpendingLimitResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *TeamSubscriptionOrder + JSON201 *SpendingLimit JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSubscriptionOrderByTeamResponse) Status() string { +func (r CreateSpendingLimitResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10788,27 +11049,137 @@ func (r GetSubscriptionOrderByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { +func (r CreateSpendingLimitResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSyncDestinationsResponse struct { +type UpdateSpendingLimitResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []SyncDestination `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *SpendingLimit + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSyncDestinationsResponse) Status() string { +func (r UpdateSpendingLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSpendingLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSubscriptionOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []TeamSubscriptionOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSubscriptionOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSubscriptionOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSubscriptionOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *TeamSubscriptionOrder + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSubscriptionOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSubscriptionOrderForTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSubscriptionOrderByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TeamSubscriptionOrder + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSubscriptionOrderByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSyncDestinationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Items []SyncDestination `json:"items"` + Metadata ListMetadata `json:"metadata"` + } + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSyncDestinationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -12540,6 +12911,58 @@ func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context. return ParseDownloadPluginAssetByTeamResponse(rsp) } +// DeleteSpendingLimitWithResponse request returning *DeleteSpendingLimitResponse +func (c *ClientWithResponses) DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) { + rsp, err := c.DeleteSpendingLimit(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSpendingLimitResponse(rsp) +} + +// GetSpendingLimitWithResponse request returning *GetSpendingLimitResponse +func (c *ClientWithResponses) GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) { + rsp, err := c.GetSpendingLimit(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSpendingLimitResponse(rsp) +} + +// CreateSpendingLimitWithBodyWithResponse request with arbitrary body returning *CreateSpendingLimitResponse +func (c *ClientWithResponses) CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { + rsp, err := c.CreateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSpendingLimitResponse(rsp) +} + +func (c *ClientWithResponses) CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { + rsp, err := c.CreateSpendingLimit(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSpendingLimitResponse(rsp) +} + +// UpdateSpendingLimitWithBodyWithResponse request with arbitrary body returning *UpdateSpendingLimitResponse +func (c *ClientWithResponses) UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { + rsp, err := c.UpdateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSpendingLimitResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { + rsp, err := c.UpdateSpendingLimit(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSpendingLimitResponse(rsp) +} + // ListSubscriptionOrdersByTeamWithResponse request returning *ListSubscriptionOrdersByTeamResponse func (c *ClientWithResponses) ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) { rsp, err := c.ListSubscriptionOrdersByTeam(ctx, teamName, params, reqEditors...) @@ -16773,6 +17196,229 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } +// ParseDeleteSpendingLimitResponse parses an HTTP response from a DeleteSpendingLimitWithResponse call +func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteSpendingLimitResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetSpendingLimitResponse parses an HTTP response from a GetSpendingLimitWithResponse call +func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSpendingLimitResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SpendingLimit + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateSpendingLimitResponse parses an HTTP response from a CreateSpendingLimitWithResponse call +func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSpendingLimitResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SpendingLimit + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateSpendingLimitResponse parses an HTTP response from a UpdateSpendingLimitWithResponse call +func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSpendingLimitResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SpendingLimit + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 87513fc..3e86ccb 100644 --- a/models.gen.go +++ b/models.gen.go @@ -154,8 +154,10 @@ const ( // Defines values for TeamPlan. const ( - Free TeamPlan = "free" - Paid TeamPlan = "paid" + Enterprise TeamPlan = "enterprise" + Free TeamPlan = "free" + Paid TeamPlan = "paid" + Trial TeamPlan = "trial" ) // Defines values for TeamSubscriptionOrderStatus. @@ -1209,6 +1211,30 @@ type ReleaseURL struct { Url string `json:"url"` } +// SpendingLimit A configurable spending limit for the team. +type SpendingLimit struct { + // CreatedAt The date and time the team limit was created. + CreatedAt time.Time `json:"created_at"` + + // UpdatedAt The date and time the team limit was last updated. + UpdatedAt time.Time `json:"updated_at"` + + // Usd The maximum USD amount the team is allowed to use within a calendar month. + USD int `json:"usd"` +} + +// SpendingLimitCreate A configurable monthly limit for team usage. +type SpendingLimitCreate struct { + // Usd The maximum USD amount the team is allowed to use within a calendar month. + USD int `json:"usd"` +} + +// SpendingLimitUpdate A configurable spending limit for the team. +type SpendingLimitUpdate struct { + // Usd The maximum USD amount the team is allowed to use within a calendar month. + USD int `json:"usd"` +} + // Sync Managed Sync definition type Sync struct { // Cpu CPU quota for the sync @@ -1641,8 +1667,15 @@ type UsageIncrease struct { // RequestId A unique ID associated with the usage increase. RequestId openapi_types.UUID `json:"request_id"` - // Rows The additional rows used by the plugin. - Rows int `json:"rows"` + // Rows The total number of additional rows used by the plugin. + Rows int `json:"rows"` + Tables *[]struct { + // Name The name of the table. + Name string `json:"name"` + + // Rows The additional rows used by the table. + Rows int `json:"rows"` + } `json:"tables,omitempty"` } // User CloudQuery User @@ -2264,6 +2297,12 @@ type CreateMonthlyLimitJSONRequestBody = MonthlyLimitCreate // UpdateMonthlyLimitJSONRequestBody defines body for UpdateMonthlyLimit for application/json ContentType. type UpdateMonthlyLimitJSONRequestBody = MonthlyLimitUpdate +// CreateSpendingLimitJSONRequestBody defines body for CreateSpendingLimit for application/json ContentType. +type CreateSpendingLimitJSONRequestBody = SpendingLimitCreate + +// UpdateSpendingLimitJSONRequestBody defines body for UpdateSpendingLimit for application/json ContentType. +type UpdateSpendingLimitJSONRequestBody = SpendingLimitUpdate + // CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate diff --git a/spec.json b/spec.json index 2267851..6cfd450 100644 --- a/spec.json +++ b/spec.json @@ -3161,6 +3161,169 @@ ] } }, + "/teams/{team_name}/spending-limits": { + "get": { + "description": "Get monthly spending limit for team.", + "operationId": "GetSpendingLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "responses": { + "200": { + "description": "Spending limit retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpendingLimit" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + }, + "post": { + "description": "Create a spending limit for a team", + "operationId": "CreateSpendingLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpendingLimitCreate" + } + } + } + }, + "responses": { + "201": { + "description": "New spending limit created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpendingLimit" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + }, + "put": { + "description": "Update a spending limit for a team", + "operationId": "UpdateSpendingLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpendingLimitUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Spending limit updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpendingLimit" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + }, + "delete": { + "description": "Delete a spending limit for a team", + "operationId": "DeleteSpendingLimit", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + } + ], + "responses": { + "204": { + "description": "Spending limit deleted." + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + } + }, "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}": { "get": { "description": "Get a monthly limit for a plugin", @@ -7214,7 +7377,9 @@ "type": "string", "enum": [ "free", - "paid" + "paid", + "enterprise", + "trial" ] }, "Team": { @@ -7542,6 +7707,77 @@ } } }, + "SpendingLimit": { + "title": "Team Spending Limit", + "description": "A configurable spending limit for the team.", + "type": "object", + "additionalProperties": false, + "required": [ + "created_at", + "updated_at", + "usd" + ], + "properties": { + "created_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "The date and time the team limit was created." + }, + "updated_at": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string", + "description": "The date and time the team limit was last updated." + }, + "usd": { + "example": 1000, + "type": "integer", + "minimum": 0, + "maximum": 1000000000, + "description": "The maximum USD amount the team is allowed to use within a calendar month.", + "x-go-name": "USD" + } + } + }, + "SpendingLimitUpdate": { + "title": "Team Spending Limit", + "description": "A configurable spending limit for the team.", + "type": "object", + "additionalProperties": false, + "required": [ + "usd" + ], + "properties": { + "usd": { + "example": 1000, + "type": "integer", + "minimum": 0, + "maximum": 1000000000, + "description": "The maximum USD amount the team is allowed to use within a calendar month.", + "x-go-name": "USD" + } + } + }, + "SpendingLimitCreate": { + "title": "Team Spending Limit", + "description": "A configurable monthly limit for team usage.", + "type": "object", + "additionalProperties": false, + "required": [ + "usd" + ], + "properties": { + "usd": { + "example": 1000, + "type": "integer", + "minimum": 0, + "maximum": 1000000000, + "description": "The maximum USD amount the team is allowed to use within a calendar month.", + "x-go-name": "USD" + } + } + }, "MonthlyLimitUpdate": { "title": "CloudQuery Plugin Monthly Limit", "description": "A configurable monthly limit for plugin usage.", @@ -7674,11 +7910,34 @@ "plugin_name": { "$ref": "#/components/schemas/PluginName" }, + "tables": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "rows" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the table.", + "example": "my_table" + }, + "rows": { + "type": "integer", + "minimum": 0, + "description": "The additional rows used by the table.", + "example": 100 + } + } + } + }, "rows": { "example": 1000000, "type": "integer", "minimum": 0, - "description": "The additional rows used by the plugin." + "description": "The total number of additional rows used by the plugin." }, "request_id": { "type": "string", From 738de6d0c2b5e8d260e33f8ccd7343fc7a291c49 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Thu, 4 Apr 2024 11:30:30 +0200 Subject: [PATCH 135/343] fix: Disable retry logging (#144) --- client.gen.go | 4 +++- templates/client.tmpl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client.gen.go b/client.gen.go index 7a640df..4b4e1fd 100644 --- a/client.gen.go +++ b/client.gen.go @@ -49,7 +49,9 @@ type ClientOption func(*Client) error // Creates a new Client, with reasonable defaults func NewClient(server string, opts ...ClientOption) (*Client, error) { - opts = append([]ClientOption{WithHTTPClient(retryablehttp.NewClient().StandardClient())}, opts...) + retryClient := retryablehttp.NewClient() + retryClient.Logger = nil + opts = append([]ClientOption{WithHTTPClient(retryClient.StandardClient())}, opts...) // create a client with sane default values client := Client{ Server: server, diff --git a/templates/client.tmpl b/templates/client.tmpl index 8d2f604..92deb84 100644 --- a/templates/client.tmpl +++ b/templates/client.tmpl @@ -32,7 +32,9 @@ type ClientOption func(*{{ $clientTypeName }}) error // Creates a new {{ $clientTypeName }}, with reasonable defaults func NewClient(server string, opts ...ClientOption) (*{{ $clientTypeName }}, error) { - opts = append([]ClientOption{WithHTTPClient(retryablehttp.NewClient().StandardClient())}, opts...) + retryClient := retryablehttp.NewClient() + retryClient.Logger = nil + opts = append([]ClientOption{WithHTTPClient(retryClient.StandardClient())}, opts...) // create a client with sane default values client := {{ $clientTypeName }}{ Server: server, From dfa5a8af33c13e0ae3f6e9837856e21e04907177 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Thu, 4 Apr 2024 11:33:11 +0200 Subject: [PATCH 136/343] refactor: Use spaces (#145) --- templates/client.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/client.tmpl b/templates/client.tmpl index 92deb84..bfe47aa 100644 --- a/templates/client.tmpl +++ b/templates/client.tmpl @@ -33,7 +33,7 @@ type ClientOption func(*{{ $clientTypeName }}) error // Creates a new {{ $clientTypeName }}, with reasonable defaults func NewClient(server string, opts ...ClientOption) (*{{ $clientTypeName }}, error) { retryClient := retryablehttp.NewClient() - retryClient.Logger = nil + retryClient.Logger = nil opts = append([]ClientOption{WithHTTPClient(retryClient.StandardClient())}, opts...) // create a client with sane default values client := {{ $clientTypeName }}{ From 20d6b4e785021fb4cd76b32880d6514d74b6b815 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Apr 2024 12:36:49 +0300 Subject: [PATCH 137/343] chore(main): Release v1.9.1 (#143) :robot: I have created a release *beep* *boop* --- ## [1.9.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.0...v1.9.1) (2024-04-04) ### Bug Fixes * Disable retry logging ([#144](https://github.com/cloudquery/cloudquery-api-go/issues/144)) ([738de6d](https://github.com/cloudquery/cloudquery-api-go/commit/738de6d0c2b5e8d260e33f8ccd7343fc7a291c49)) * Generate CloudQuery Go API Client from `spec.json` ([#142](https://github.com/cloudquery/cloudquery-api-go/issues/142)) ([b8ead7c](https://github.com/cloudquery/cloudquery-api-go/commit/b8ead7c4ae372f36266dd437f0590067ce731598)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cde2c2d..78ecdd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.9.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.0...v1.9.1) (2024-04-04) + + +### Bug Fixes + +* Disable retry logging ([#144](https://github.com/cloudquery/cloudquery-api-go/issues/144)) ([738de6d](https://github.com/cloudquery/cloudquery-api-go/commit/738de6d0c2b5e8d260e33f8ccd7343fc7a291c49)) +* Generate CloudQuery Go API Client from `spec.json` ([#142](https://github.com/cloudquery/cloudquery-api-go/issues/142)) ([b8ead7c](https://github.com/cloudquery/cloudquery-api-go/commit/b8ead7c4ae372f36266dd437f0590067ce731598)) + ## [1.9.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.1...v1.9.0) (2024-03-28) From a90e87b9f0025bdf7a4badf17927369dc167916a Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:42:44 +0300 Subject: [PATCH 138/343] fix: Generate CloudQuery Go API Client from `spec.json` (#146) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 4 ++-- models.gen.go | 36 ++++++++++++++++++++++++++++++++++++ spec.json | 39 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 76 insertions(+), 3 deletions(-) diff --git a/client.gen.go b/client.gen.go index 4b4e1fd..80e9fe0 100644 --- a/client.gen.go +++ b/client.gen.go @@ -11727,7 +11727,7 @@ func (r CreateSyncRunResponse) StatusCode() int { type GetSyncRunResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncRun + JSON200 *SyncRunDetails JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError @@ -18747,7 +18747,7 @@ func ParseGetSyncRunResponse(rsp *http.Response) (*GetSyncRunResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncRun + var dest SyncRunDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 3e86ccb..f585d7f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1420,6 +1420,42 @@ type SyncRun struct { Warnings int64 `json:"warnings"` } +// SyncRunDetails defines model for SyncRunDetails. +type SyncRunDetails struct { + // CompletedAt Time the sync run was completed + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CpuSeconds Total CPU seconds utilized during this sync run + CPUSeconds *float64 `json:"cpu_seconds,omitempty"` + + // CreatedAt Time the sync run was created + CreatedAt time.Time `json:"created_at"` + + // Errors Number of errors encountered during the sync + Errors int64 `json:"errors"` + + // Id unique ID of the run + ID openapi_types.UUID `json:"id"` + + // MemoryByteSeconds Total memory byte seconds utilized during this sync run + MemoryByteSeconds *float64 `json:"memory_byte_seconds,omitempty"` + + // NetworkEgressBytes Total network egress bytes during this sync run + NetworkEgressBytes *float64 `json:"network_egress_bytes,omitempty"` + + // Status The status of the sync run + Status SyncRunStatus `json:"status"` + + // SyncName Name of the sync + SyncName string `json:"sync_name"` + + // TotalRows Total number of rows in the sync + TotalRows int64 `json:"total_rows"` + + // Warnings Number of warnings encountered during the sync + Warnings int64 `json:"warnings"` +} + // SyncRunID ID of the SyncRun type SyncRunID = openapi_types.UUID diff --git a/spec.json b/spec.json index 6cfd450..55ad25f 100644 --- a/spec.json +++ b/spec.json @@ -5610,7 +5610,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SyncRun" + "$ref": "#/components/schemas/SyncRunDetails" } } } @@ -8827,6 +8827,43 @@ "format": "uuid", "example": "12345678-1234-1234-1234-1234567890ab", "x-go-name": "SyncRunID" + }, + "SyncRunDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/SyncRun" + }, + { + "type": "object", + "required": [ + "created_at", + "sync_name", + "id", + "status", + "total_rows", + "warnings", + "errors" + ], + "properties": { + "cpu_seconds": { + "type": "number", + "format": "double", + "description": "Total CPU seconds utilized during this sync run", + "x-go-name": "CPUSeconds" + }, + "memory_byte_seconds": { + "type": "number", + "format": "double", + "description": "Total memory byte seconds utilized during this sync run" + }, + "network_egress_bytes": { + "type": "number", + "format": "double", + "description": "Total network egress bytes during this sync run" + } + } + } + ] } }, "responses": { From 15e02524a5da068c9cc104a3d0ce09c1a268c093 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 17 Apr 2024 12:19:03 +0300 Subject: [PATCH 139/343] fix: Generate CloudQuery Go API Client from `spec.json` (#148) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 7 +++++-- spec.json | 22 ++++++++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/models.gen.go b/models.gen.go index f585d7f..751d0a8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1588,13 +1588,16 @@ type Team struct { CreatedAt *time.Time `json:"created_at,omitempty"` // DisplayName The team's display name - DisplayName string `json:"display_name"` + DisplayName string `json:"display_name"` + IsTrialActive bool `json:"is_trial_active"` // Name The unique name for the team. Name TeamName `json:"name"` // Plan The plan the team is on - Plan *TeamPlan `json:"plan,omitempty"` + Plan TeamPlan `json:"plan"` + PlanEndTime *time.Time `json:"plan_end_time,omitempty"` + TrialEndTime *time.Time `json:"trial_end_time,omitempty"` } // TeamImage defines model for TeamImage. diff --git a/spec.json b/spec.json index 55ad25f..9c3f346 100644 --- a/spec.json +++ b/spec.json @@ -4412,7 +4412,9 @@ "team": { "created_at": "2017-07-14T16:53:42Z", "name": "cloudquery", - "display_name": "CloudQuery" + "display_name": "CloudQuery", + "plan": "free", + "is_trial_active": false } } ] @@ -7397,6 +7399,20 @@ "plan": { "$ref": "#/components/schemas/TeamPlan" }, + "plan_end_time": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + }, + "is_trial_active": { + "type": "boolean", + "example": false + }, + "trial_end_time": { + "example": "2017-07-14T16:53:42Z", + "format": "date-time", + "type": "string" + }, "display_name": { "description": "The team's display name", "maxLength": 255, @@ -7406,7 +7422,9 @@ }, "required": [ "name", - "display_name" + "display_name", + "plan", + "is_trial_active" ], "title": "Team", "type": "object" From 33fe0a62af1b44e23908e4cc308b6585a96e095d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 17 Apr 2024 17:27:59 +0300 Subject: [PATCH 140/343] fix: Generate CloudQuery Go API Client from `spec.json` (#149) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ spec.json | 3 +++ 2 files changed, 11 insertions(+) diff --git a/client.gen.go b/client.gen.go index 80e9fe0..3583d7e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -10203,6 +10203,7 @@ type CreateTeamResponse struct { JSON201 *Team JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -15626,6 +15627,13 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/spec.json b/spec.json index 9c3f346..3170879 100644 --- a/spec.json +++ b/spec.json @@ -2355,6 +2355,9 @@ "401": { "$ref": "#/components/responses/RequiresAuthentication" }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, From 788534459b01f2786bb8dd7a840f49743995b471 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 22 Apr 2024 17:25:28 +0300 Subject: [PATCH 141/343] fix: Generate CloudQuery Go API Client from `spec.json` (#150) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 5 ++++- spec.json | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/models.gen.go b/models.gen.go index 751d0a8..1b31227 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1679,16 +1679,19 @@ type UsageCurrent struct { // PluginTeam The unique name for the team. PluginTeam TeamName `json:"plugin_team"` - // RemainingRows The estimated number of rows remaining in the plugin's quota for the calendar month at the current price per row. This includes both free and paid rows up to the monthly limit defined for the plugin. + // RemainingRows Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows. + // Deprecated: RemainingRows *int64 `json:"remaining_rows,omitempty"` // RemainingUsd The remaining USD amount in the plugin's quota for the calendar month. + // Deprecated: RemainingUSD *string `json:"remaining_usd,omitempty"` // Rows The number of rows used by the plugin in the calendar month. Rows int64 `json:"rows"` // Usd The USD amount used by the plugin in the calendar month, rounded to two decimal places. + // Deprecated: USD string `json:"usd"` } diff --git a/spec.json b/spec.json index 3170879..35e67d9 100644 --- a/spec.json +++ b/spec.json @@ -7889,23 +7889,26 @@ "description": "The number of rows used by the plugin in the calendar month." }, "usd": { + "deprecated": true, "type": "string", "example": "43.95", "description": "The USD amount used by the plugin in the calendar month, rounded to two decimal places.", "x-go-name": "USD" }, "remaining_usd": { + "deprecated": true, "type": "string", "example": "56.05", "description": "The remaining USD amount in the plugin's quota for the calendar month.", "x-go-name": "RemainingUSD" }, "remaining_rows": { - "example": 1000000, + "deprecated": true, + "example": 1, "type": "integer", "format": "int64", "minimum": 0, - "description": "The estimated number of rows remaining in the plugin's quota for the calendar month at the current price per row. This includes both free and paid rows up to the monthly limit defined for the plugin." + "description": "Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows." } } }, From cd9aa4416b92b586b754906b7772d998822e1c28 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:19:07 +0300 Subject: [PATCH 142/343] fix: Generate CloudQuery Go API Client from `spec.json` (#151) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 210 +++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 74 ++++++++++++++++++ spec.json | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 497 insertions(+) diff --git a/client.gen.go b/client.gen.go index 3583d7e..fc8d796 100644 --- a/client.gen.go +++ b/client.gen.go @@ -480,6 +480,9 @@ type ClientInterface interface { IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamUsageSummary request + GetTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamPluginUsage request GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2211,6 +2214,18 @@ func (c *Client) IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, return c.Client.Do(req) } +func (c *Client) GetTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamUsageSummaryRequest(c.Server, teamName, groupBy, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTeamPluginUsageRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) if err != nil { @@ -8282,6 +8297,101 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return req, nil } +// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary +func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group_by", runtime.ParamLocationPath, groupBy) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage-summary/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.AggregationPeriod != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error @@ -9097,6 +9207,9 @@ type ClientWithResponsesInterface interface { IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + // GetTeamUsageSummaryWithResponse request + GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) + // GetTeamPluginUsageWithResponse request GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) @@ -11889,6 +12002,33 @@ func (r IncreaseTeamPluginUsageResponse) StatusCode() int { return 0 } +type GetTeamUsageSummaryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageSummary + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamUsageSummaryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamUsageSummaryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response @@ -13340,6 +13480,15 @@ func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Co return ParseIncreaseTeamPluginUsageResponse(rsp) } +// GetTeamUsageSummaryWithResponse request returning *GetTeamUsageSummaryResponse +func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { + rsp, err := c.GetTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamUsageSummaryResponse(rsp) +} + // GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) @@ -19087,6 +19236,67 @@ func ParseIncreaseTeamPluginUsageResponse(rsp *http.Response) (*IncreaseTeamPlug return response, nil } +// ParseGetTeamUsageSummaryResponse parses an HTTP response from a GetTeamUsageSummaryWithResponse call +func ParseGetTeamUsageSummaryResponse(rsp *http.Response) (*GetTeamUsageSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTeamUsageSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UsageSummary + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetTeamPluginUsageResponse parses an HTTP response from a GetTeamPluginUsageWithResponse call func ParseGetTeamPluginUsageResponse(rsp *http.Response) (*GetTeamPluginUsageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 1b31227..7992b21 100644 --- a/models.gen.go +++ b/models.gen.go @@ -167,6 +167,12 @@ const ( Pending TeamSubscriptionOrderStatus = "pending" ) +// Defines values for UsageSummaryMetadataAggregationPeriod. +const ( + UsageSummaryMetadataAggregationPeriodDay UsageSummaryMetadataAggregationPeriod = "day" + UsageSummaryMetadataAggregationPeriodMonth UsageSummaryMetadataAggregationPeriod = "month" +) + // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -220,6 +226,18 @@ const ( Member EmailTeamInvitationJSONBodyRole = "member" ) +// Defines values for GetTeamUsageSummaryParamsAggregationPeriod. +const ( + GetTeamUsageSummaryParamsAggregationPeriodDay GetTeamUsageSummaryParamsAggregationPeriod = "day" + GetTeamUsageSummaryParamsAggregationPeriodMonth GetTeamUsageSummaryParamsAggregationPeriod = "month" +) + +// Defines values for GetTeamUsageSummaryParamsGroupBy. +const ( + GetTeamUsageSummaryParamsGroupByPlugin GetTeamUsageSummaryParamsGroupBy = "plugin" + GetTeamUsageSummaryParamsGroupByPriceCategory GetTeamUsageSummaryParamsGroupBy = "price_category" +) + // APIKey API Key to interact with CloudQuery Cloud under specific team type APIKey struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -1720,6 +1738,47 @@ type UsageIncrease struct { } `json:"tables,omitempty"` } +// UsageSummary A usage summary for a team, summarizing the paid rows synced by each plugin or price category over a given time range. +// Note that empty or all-zero values are not included in the response. +type UsageSummary struct { + // Groups The groups of the usage summary. Every group will have a corresponding value at the same index in the values array. + Groups []UsageSummaryGroup `json:"groups"` + + // Metadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. + Metadata struct { + // AggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. + AggregationPeriod UsageSummaryMetadataAggregationPeriod `json:"aggregation_period"` + + // End The exclusive end of the query time range. + End time.Time `json:"end"` + + // Start The inclusive start of the query time range. + Start time.Time `json:"start"` + } `json:"metadata"` + Values []UsageSummaryValue `json:"values"` +} + +// UsageSummaryMetadataAggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. +type UsageSummaryMetadataAggregationPeriod string + +// UsageSummaryGroup A usage summary group. +type UsageSummaryGroup struct { + // Name The name of the group. + Name string `json:"name"` + + // Value The value of the group at this index. + Value string `json:"value"` +} + +// UsageSummaryValue A usage summary value. +type UsageSummaryValue struct { + // PaidRows The paid rows that were synced in this period, one per group. + PaidRows *[]int64 `json:"paid_rows,omitempty"` + + // Timestamp The timestamp marking the start of a period. + Timestamp time.Time `json:"timestamp"` +} + // User CloudQuery User type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -2234,6 +2293,21 @@ type ListTeamPluginUsageParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } +// GetTeamUsageSummaryParams defines parameters for GetTeamUsageSummary. +type GetTeamUsageSummaryParams struct { + Start *time.Time `form:"start,omitempty" json:"start,omitempty"` + End *time.Time `form:"end,omitempty" json:"end,omitempty"` + + // AggregationPeriod An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month. + AggregationPeriod *GetTeamUsageSummaryParamsAggregationPeriod `form:"aggregation_period,omitempty" json:"aggregation_period,omitempty"` +} + +// GetTeamUsageSummaryParamsAggregationPeriod defines parameters for GetTeamUsageSummary. +type GetTeamUsageSummaryParamsAggregationPeriod string + +// GetTeamUsageSummaryParamsGroupBy defines parameters for GetTeamUsageSummary. +type GetTeamUsageSummaryParamsGroupBy string + // ListUsersByTeamParams defines parameters for ListUsersByTeam. type ListUsersByTeamParams struct { // PerPage The number of results per page (max 1000). diff --git a/spec.json b/spec.json index 35e67d9..91a9eb8 100644 --- a/spec.json +++ b/spec.json @@ -3676,6 +3676,93 @@ ] } }, + "/teams/{team_name}/usage-summary/{group_by}": { + "get": { + "description": "Get a summary of usage for the specified time range, grouped by plugin.", + "operationId": "GetTeamUsageSummary", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "in": "path", + "name": "group_by", + "required": true, + "schema": { + "type": "string", + "enum": [ + "price_category", + "plugin" + ] + } + }, + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "description": "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago." + } + }, + { + "in": "query", + "name": "end", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "description": "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time." + } + }, + { + "in": "query", + "name": "aggregation_period", + "description": "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", + "required": false, + "schema": { + "type": "string", + "default": "day", + "enum": [ + "day", + "month" + ] + } + } + ], + "responses": { + "200": { + "description": "A summary of usage for the specified time range.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageSummary" + } + } + } + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + } + }, "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { "get": { "description": "Download an asset for a given plugin version as the current team.", @@ -7971,6 +8058,132 @@ } } }, + "UsageSummaryGroup": { + "title": "CloudQuery Usage Summary Group", + "description": "A usage summary group.", + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the group.", + "example": "plugin" + }, + "value": { + "type": "string", + "description": "The value of the group at this index.", + "example": "cloudquery/source/aws" + } + } + }, + "UsageSummaryValue": { + "title": "CloudQuery Usage Summary Value", + "description": "A usage summary value.", + "type": "object", + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp marking the start of a period." + }, + "paid_rows": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The paid rows that were synced in this period, one per group." + } + } + }, + "UsageSummary": { + "title": "CloudQuery Usage Summary", + "description": "A usage summary for a team, summarizing the paid rows synced by each plugin or price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "groups", + "values", + "metadata" + ], + "properties": { + "groups": { + "type": "array", + "description": "The groups of the usage summary. Every group will have a corresponding value at the same index in the values array.", + "items": { + "$ref": "#/components/schemas/UsageSummaryGroup" + }, + "example": [ + { + "name": "plugin", + "value": "cloudquery/source/aws" + }, + { + "name": "plugin", + "value": "cloudquery/source/gcp" + } + ] + }, + "values": { + "items": { + "$ref": "#/components/schemas/UsageSummaryValue" + }, + "type": "array", + "example": [ + { + "timestamp": "2021-01-01T00:00:00Z", + "paid_rows": [ + 100, + 200 + ] + }, + { + "timestamp": "2021-01-02T00:00:00Z", + "paid_rows": [ + 150, + 300 + ] + } + ] + }, + "metadata": { + "type": "object", + "description": "Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details.", + "required": [ + "start", + "end", + "aggregation_period" + ], + "additionalProperties": false, + "properties": { + "start": { + "type": "string", + "format": "date-time", + "description": "The inclusive start of the query time range." + }, + "end": { + "type": "string", + "format": "date-time", + "description": "The exclusive end of the query time range." + }, + "aggregation_period": { + "type": "string", + "description": "The aggregation period to sum data over. In other words, data will be returned at this granularity.", + "enum": [ + "day", + "month" + ] + } + } + } + } + }, "Invitation": { "additionalProperties": false, "required": [ From 57939a53deb3f8bd2c7219ae0ebe58633e3c8adf Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:45:55 +0300 Subject: [PATCH 143/343] fix: Generate CloudQuery Go API Client from `spec.json` (#152) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 187 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 51 ++++++++++++++ spec.json | 155 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 393 insertions(+) diff --git a/client.gen.go b/client.gen.go index fc8d796..8307dca 100644 --- a/client.gen.go +++ b/client.gen.go @@ -348,6 +348,9 @@ type ClientInterface interface { // DownloadPluginAssetByTeam request DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamSpend request + GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteSpendingLimit request DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1626,6 +1629,18 @@ func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamNam return c.Client.Do(req) } +func (c *Client) GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamSpendRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSpendingLimitRequest(c.Server, teamName) if err != nil { @@ -6549,6 +6564,78 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return req, nil } +// NewGetTeamSpendRequest generates requests for GetTeamSpend +func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpendParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/spend", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewDeleteSpendingLimitRequest generates requests for DeleteSpendingLimit func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { var err error @@ -9075,6 +9162,9 @@ type ClientWithResponsesInterface interface { // DownloadPluginAssetByTeamWithResponse request DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + // GetTeamSpendWithResponse request + GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) + // DeleteSpendingLimitWithResponse request DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) @@ -11094,6 +11184,33 @@ func (r DownloadPluginAssetByTeamResponse) StatusCode() int { return 0 } +type GetTeamSpendResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SpendSummary + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamSpendResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamSpendResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteSpendingLimitResponse struct { Body []byte HTTPResponse *http.Response @@ -13054,6 +13171,15 @@ func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context. return ParseDownloadPluginAssetByTeamResponse(rsp) } +// GetTeamSpendWithResponse request returning *GetTeamSpendResponse +func (c *ClientWithResponses) GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) { + rsp, err := c.GetTeamSpend(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamSpendResponse(rsp) +} + // DeleteSpendingLimitWithResponse request returning *DeleteSpendingLimitResponse func (c *ClientWithResponses) DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) { rsp, err := c.DeleteSpendingLimit(ctx, teamName, reqEditors...) @@ -17355,6 +17481,67 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } +// ParseGetTeamSpendResponse parses an HTTP response from a GetTeamSpendWithResponse call +func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTeamSpendResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SpendSummary + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteSpendingLimitResponse parses an HTTP response from a DeleteSpendingLimitWithResponse call func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 7992b21..6d6986c 100644 --- a/models.gen.go +++ b/models.gen.go @@ -116,6 +116,13 @@ const ( PluginTierPaid PluginTier = "paid" ) +// Defines values for PriceCategory. +const ( + Api PriceCategory = "api" + Database PriceCategory = "database" + Unknown PriceCategory = "unknown" +) + // Defines values for SyncDestinationMigrateMode. const ( Forced SyncDestinationMigrateMode = "forced" @@ -1218,6 +1225,16 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } +// PriceCategory Supported price categories for billing +type PriceCategory string + +// PriceCategorySpend Spend by price category for a defined period. +type PriceCategorySpend struct { + // Category Supported price categories for billing + Category PriceCategory `json:"category"` + Total string `json:"total"` +} + // RegistryAuthToken JWT token for the image registry type RegistryAuthToken struct { AccessToken string `json:"access_token"` @@ -1229,6 +1246,31 @@ type ReleaseURL struct { Url string `json:"url"` } +// SpendSummary A spend summary for a team, summarizing the spend by each price category over a given time range. +// Note that empty or all-zero values are not included in the response. +type SpendSummary struct { + // Metadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. + Metadata struct { + // End The exclusive end of the query time range. + End time.Time `json:"end"` + + // Start The inclusive start of the query time range. + Start time.Time `json:"start"` + } `json:"metadata"` + Values []SpendSummaryValue `json:"values"` +} + +// SpendSummaryValue A spend summary value. +type SpendSummaryValue struct { + ByCategory []PriceCategorySpend `json:"by_category"` + + // Date The timestamp for the spend summary. + Date time.Time `json:"date"` + + // Total Total spend for the period in USD. + Total string `json:"total"` +} + // SpendingLimit A configurable spending limit for the team. type SpendingLimit struct { // CreatedAt The date and time the team limit was created. @@ -2207,6 +2249,15 @@ type DownloadPluginAssetByTeamParams struct { Accept *string `json:"Accept,omitempty"` } +// GetTeamSpendParams defines parameters for GetTeamSpend. +type GetTeamSpendParams struct { + // Start A valid ISO 8601 date string representing the inclusive start of the period. + Start *time.Time `form:"start,omitempty" json:"start,omitempty"` + + // End A valid ISO 8601 date string representing the exclusive end of the period. + End *time.Time `form:"end,omitempty" json:"end,omitempty"` +} + // ListSubscriptionOrdersByTeamParams defines parameters for ListSubscriptionOrdersByTeam. type ListSubscriptionOrdersByTeamParams struct { // Page Page number of the results to fetch diff --git a/spec.json b/spec.json index 91a9eb8..13516eb 100644 --- a/spec.json +++ b/spec.json @@ -3763,6 +3763,67 @@ ] } }, + "/teams/{team_name}/spend": { + "get": { + "description": "Get team spend for defined period.", + "operationId": "GetTeamSpend", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "A valid ISO 8601 date string representing the inclusive start of the period." + }, + { + "in": "query", + "name": "end", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "A valid ISO 8601 date string representing the exclusive end of the period." + } + ], + "responses": { + "200": { + "description": "Team spend for defined period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpendSummary" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + } + }, "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { "get": { "description": "Download an asset for a given plugin version as the current team.", @@ -8184,6 +8245,100 @@ } } }, + "PriceCategory": { + "description": "Supported price categories for billing", + "type": "string", + "enum": [ + "unknown", + "api", + "database" + ] + }, + "PriceCategorySpend": { + "title": "Spend by price category", + "description": "Spend by price category for a defined period.", + "type": "object", + "additionalProperties": false, + "required": [ + "category", + "total" + ], + "properties": { + "category": { + "$ref": "#/components/schemas/PriceCategory" + }, + "total": { + "type": "string" + } + } + }, + "SpendSummaryValue": { + "title": "CloudQuery Spend Summary Value", + "description": "A spend summary value.", + "type": "object", + "additionalProperties": false, + "required": [ + "date", + "by_category", + "total" + ], + "properties": { + "date": { + "type": "string", + "format": "date-time", + "description": "The timestamp for the spend summary." + }, + "by_category": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceCategorySpend" + } + }, + "total": { + "type": "string", + "description": "Total spend for the period in USD." + } + } + }, + "SpendSummary": { + "title": "CloudQuery Spend Summary", + "description": "A spend summary for a team, summarizing the spend by each price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "type": "object", + "additionalProperties": false, + "required": [ + "values", + "metadata" + ], + "properties": { + "values": { + "items": { + "$ref": "#/components/schemas/SpendSummaryValue" + }, + "type": "array" + }, + "metadata": { + "type": "object", + "description": "Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details.", + "required": [ + "start", + "end" + ], + "additionalProperties": false, + "properties": { + "start": { + "type": "string", + "format": "date-time", + "description": "The inclusive start of the query time range." + }, + "end": { + "type": "string", + "format": "date-time", + "description": "The exclusive end of the query time range." + } + } + } + } + }, "Invitation": { "additionalProperties": false, "required": [ From 13e63ad91365ea906dec430b68d7255261a091fa Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:43:27 +0300 Subject: [PATCH 144/343] fix: Generate CloudQuery Go API Client from `spec.json` (#153) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 35 +++++++++++++++++++++++------------ spec.json | 28 ++++++++++++++++++---------- 2 files changed, 41 insertions(+), 22 deletions(-) diff --git a/models.gen.go b/models.gen.go index 6d6986c..ec9119c 100644 --- a/models.gen.go +++ b/models.gen.go @@ -88,6 +88,12 @@ const ( Native PluginPackageType = "native" ) +// Defines values for PluginPriceCategory. +const ( + Api PluginPriceCategory = "api" + Database PluginPriceCategory = "database" +) + // Defines values for PluginReleaseStage. const ( PluginReleaseStageComingSoon PluginReleaseStage = "coming-soon" @@ -116,13 +122,6 @@ const ( PluginTierPaid PluginTier = "paid" ) -// Defines values for PriceCategory. -const ( - Api PriceCategory = "api" - Database PriceCategory = "database" - Unknown PriceCategory = "unknown" -) - // Defines values for SyncDestinationMigrateMode. const ( Forced SyncDestinationMigrateMode = "forced" @@ -649,6 +648,9 @@ type ListPlugin struct { // Official True if the plugin is maintained by CloudQuery, false otherwise Official bool `json:"official"` + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. Public *bool `json:"public,omitempty"` @@ -755,6 +757,9 @@ type Plugin struct { // Official True if the plugin is maintained by CloudQuery, false otherwise Official bool `json:"official"` + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. Public *bool `json:"public,omitempty"` @@ -810,6 +815,9 @@ type PluginCreate struct { // Name The unique name for the plugin. Name PluginName `json:"name"` + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team. Public bool `json:"public"` @@ -911,6 +919,9 @@ type PluginPrice struct { USDPerRow string `json:"usd_per_row"` } +// PluginPriceCategory Supported price categories for billing +type PluginPriceCategory string + // PluginPriceCreate CloudQuery Plugin Price Create type PluginPriceCreate struct { // EffectiveFrom The date and time the price came (or will come) into effect. @@ -1069,6 +1080,9 @@ type PluginUpdate struct { // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... Logo *string `json:"logo,omitempty"` + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + // Public If plugin is not public, it won't be visible to other teams in the CloudQuery Hub. Public *bool `json:"public,omitempty"` @@ -1225,14 +1239,11 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } -// PriceCategory Supported price categories for billing -type PriceCategory string - // PriceCategorySpend Spend by price category for a defined period. type PriceCategorySpend struct { // Category Supported price categories for billing - Category PriceCategory `json:"category"` - Total string `json:"total"` + Category PluginPriceCategory `json:"category"` + Total string `json:"total"` } // RegistryAuthToken JWT token for the image registry diff --git a/spec.json b/spec.json index 13516eb..0ccd7d0 100644 --- a/spec.json +++ b/spec.json @@ -6285,6 +6285,14 @@ "other" ] }, + "PluginPriceCategory": { + "description": "Supported price categories for billing", + "type": "string", + "enum": [ + "api", + "database" + ] + }, "PluginReleaseStage": { "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", "type": "string", @@ -6319,6 +6327,9 @@ "category": { "$ref": "#/components/schemas/PluginCategory" }, + "price_category": { + "$ref": "#/components/schemas/PluginPriceCategory" + }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", @@ -6463,6 +6474,9 @@ "category": { "$ref": "#/components/schemas/PluginCategory" }, + "price_category": { + "$ref": "#/components/schemas/PluginPriceCategory" + }, "tier": { "$ref": "#/components/schemas/PluginTier" }, @@ -6531,6 +6545,9 @@ "category": { "$ref": "#/components/schemas/PluginCategory" }, + "price_category": { + "$ref": "#/components/schemas/PluginPriceCategory" + }, "tier": { "$ref": "#/components/schemas/PluginTier" }, @@ -8245,15 +8262,6 @@ } } }, - "PriceCategory": { - "description": "Supported price categories for billing", - "type": "string", - "enum": [ - "unknown", - "api", - "database" - ] - }, "PriceCategorySpend": { "title": "Spend by price category", "description": "Spend by price category for a defined period.", @@ -8265,7 +8273,7 @@ ], "properties": { "category": { - "$ref": "#/components/schemas/PriceCategory" + "$ref": "#/components/schemas/PluginPriceCategory" }, "total": { "type": "string" From ecfd6590a9e8a183be8de0fc56d790513c4b3b36 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 1 May 2024 15:24:56 +0300 Subject: [PATCH 145/343] fix: Generate CloudQuery Go API Client from `spec.json` (#154) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 49 ++++++++++++++++++++++++++++++++++++------------- spec.json | 29 +++++++++++++++++++---------- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/models.gen.go b/models.gen.go index ec9119c..89797fb 100644 --- a/models.gen.go +++ b/models.gen.go @@ -628,7 +628,8 @@ type ListPlugin struct { // DisplayName The plugin's display name DisplayName string `json:"display_name"` - // FreeRowsPerMonth The number of rows that can be synced for free each month. + // FreeRowsPerMonth Deprecated. Refer to `price_category` instead. + // Deprecated: FreeRowsPerMonth int64 `json:"free_rows_per_month"` Homepage *string `json:"homepage,omitempty"` @@ -665,11 +666,15 @@ type ListPlugin struct { // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` - // Tier Supported tiers for plugins + // Tier Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, please use either free or paid. Tier PluginTier `json:"tier"` UpdatedAt time.Time `json:"updated_at"` - // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + // UsdPerRow Deprecated. Refer to `price_category` instead. + // Deprecated: USDPerRow string `json:"usd_per_row"` } @@ -740,7 +745,8 @@ type Plugin struct { // DisplayName The plugin's display name DisplayName string `json:"display_name"` - // FreeRowsPerMonth The number of rows that can be synced for free each month. + // FreeRowsPerMonth Deprecated. Refer to `price_category` instead. + // Deprecated: FreeRowsPerMonth int64 `json:"free_rows_per_month"` Homepage *string `json:"homepage,omitempty"` @@ -774,11 +780,15 @@ type Plugin struct { // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` - // Tier Supported tiers for plugins + // Tier Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, please use either free or paid. Tier PluginTier `json:"tier"` UpdatedAt time.Time `json:"updated_at"` - // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + // UsdPerRow Deprecated. Refer to `price_category` instead. + // Deprecated: USDPerRow string `json:"usd_per_row"` } @@ -802,7 +812,8 @@ type PluginCreate struct { // DisplayName The plugin's display name, as shown in the CloudQuery Hub. DisplayName string `json:"display_name"` - // FreeRowsPerMonth The number of rows that can be synced for free each month. + // FreeRowsPerMonth Deprecated. Use `price_category` instead. + // Deprecated: FreeRowsPerMonth *int64 `json:"free_rows_per_month,omitempty"` Homepage *string `json:"homepage,omitempty"` @@ -834,10 +845,14 @@ type PluginCreate struct { // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` - // Tier Supported tiers for plugins + // Tier Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, please use either free or paid. Tier PluginTier `json:"tier"` - // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + // UsdPerRow Deprecated. Use `price_category` instead. + // Deprecated: USDPerRow *string `json:"usd_per_row,omitempty"` } @@ -1062,7 +1077,10 @@ type PluginTableDetails struct { // PluginTableName Name of the table type PluginTableName = string -// PluginTier Supported tiers for plugins +// PluginTier Supported tiers for plugins. +// - free: Free tier, with no paid tables. +// - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. +// - open-core: This option is deprecated, please use either free or paid. type PluginTier string // PluginUpdate defines model for PluginUpdate. @@ -1073,7 +1091,8 @@ type PluginUpdate struct { // DisplayName The plugin's display name, as shown in the CloudQuery Hub. DisplayName *string `json:"display_name,omitempty"` - // FreeRowsPerMonth The number of rows that can be synced for free each month. + // FreeRowsPerMonth Deprecated. Update `price_category` instead. + // Deprecated: FreeRowsPerMonth *int64 `json:"free_rows_per_month,omitempty"` Homepage *string `json:"homepage,omitempty"` @@ -1096,10 +1115,14 @@ type PluginUpdate struct { // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription *string `json:"short_description,omitempty"` - // Tier Supported tiers for plugins + // Tier Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, please use either free or paid. Tier *PluginTier `json:"tier,omitempty"` - // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + // UsdPerRow Deprecated. Update `price_category` instead. + // Deprecated: USDPerRow *string `json:"usd_per_row,omitempty"` } diff --git a/spec.json b/spec.json index 0ccd7d0..0cc7c1f 100644 --- a/spec.json +++ b/spec.json @@ -527,7 +527,8 @@ }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/upcoming-price-changes": { "get": { - "description": "List upcoming price changes for a given plugin. If the plugin has no upcoming price changes, an empty list is returned. At most one upcoming price change is returned.", + "deprecated": true, + "description": "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", "operationId": "ListPluginUpcomingPriceChanges", "parameters": [ { @@ -584,7 +585,8 @@ ] }, "post": { - "description": "Create an upcoming plugin price change. If the plugin has no upcoming price change, a new one is created. If the plugin already has an upcoming price change, this call will fail. (Delete pending price changes with the appropriate delete call.) The effective date of the price change must be at least 8 days in the future.", + "deprecated": true, + "description": "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", "operationId": "CreatePluginUpcomingPriceChange", "parameters": [ { @@ -638,7 +640,8 @@ ] }, "delete": { - "description": "Delete all pending plugin price changes.", + "deprecated": true, + "description": "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", "operationId": "DeletePluginUpcomingPriceChanges", "parameters": [ { @@ -6303,7 +6306,7 @@ ] }, "PluginTier": { - "description": "Supported tiers for plugins", + "description": "Supported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, please use either free or paid.\n", "type": "string", "enum": [ "free", @@ -6380,16 +6383,18 @@ "type": "boolean" }, "usd_per_row": { + "deprecated": true, "type": "string", "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price per row in USD. This is used to calculate the price of a sync.", + "description": "Deprecated. Refer to `price_category` instead.", "example": "0.0001", "x-go-name": "USDPerRow" }, "free_rows_per_month": { + "deprecated": true, "type": "integer", "format": "int64", - "description": "The number of rows that can be synced for free each month.", + "description": "Deprecated. Refer to `price_category` instead.", "example": 1000 }, "minimum_cloud_version": { @@ -6516,16 +6521,18 @@ "example": "https://images.cloudquery.io/logos/aws.png" }, "usd_per_row": { + "deprecated": true, "type": "string", "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price per row in USD. This is used to calculate the price of a sync.", + "description": "Deprecated. Use `price_category` instead.", "example": "0.00001", "x-go-name": "USDPerRow" }, "free_rows_per_month": { + "deprecated": true, "type": "integer", "format": "int64", - "description": "The number of rows that can be synced for free each month.", + "description": "Deprecated. Use `price_category` instead.", "example": 10000 } } @@ -6586,16 +6593,18 @@ "$ref": "#/components/schemas/PluginReleaseStageUpdate" }, "usd_per_row": { + "deprecated": true, "type": "string", "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price per row in USD. This is used to calculate the price of a sync.", + "description": "Deprecated. Update `price_category` instead.", "example": "0.0001", "x-go-name": "USDPerRow" }, "free_rows_per_month": { + "deprecated": true, "type": "integer", "format": "int64", - "description": "The number of rows that can be synced for free each month.", + "description": "Deprecated. Update `price_category` instead.", "example": 1000 } } From 1b3d18ce2ee5dc61edce4767c70b04026fd095bb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 6 May 2024 12:03:02 +0300 Subject: [PATCH 146/343] fix: Generate CloudQuery Go API Client from `spec.json` (#155) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 67 ++++++++++++++++++++++++++++++++++++++------------- spec.json | 22 ++++++++++++++--- 2 files changed, 69 insertions(+), 20 deletions(-) diff --git a/models.gen.go b/models.gen.go index 89797fb..60fadd1 100644 --- a/models.gen.go +++ b/models.gen.go @@ -90,8 +90,9 @@ const ( // Defines values for PluginPriceCategory. const ( - Api PluginPriceCategory = "api" - Database PluginPriceCategory = "database" + PluginPriceCategoryApi PluginPriceCategory = "api" + PluginPriceCategoryDatabase PluginPriceCategory = "database" + PluginPriceCategoryFree PluginPriceCategory = "free" ) // Defines values for PluginReleaseStage. @@ -150,6 +151,12 @@ const ( SyncRunStatusStarted SyncRunStatus = "started" ) +// Defines values for SyncRunStatusReason. +const ( + Error SyncRunStatusReason = "error" + OomKilled SyncRunStatusReason = "oom_killed" +) + // Defines values for SyncTestConnectionStatus. const ( SyncTestConnectionStatusCompleted SyncTestConnectionStatus = "completed" @@ -160,10 +167,10 @@ const ( // Defines values for TeamPlan. const ( - Enterprise TeamPlan = "enterprise" - Free TeamPlan = "free" - Paid TeamPlan = "paid" - Trial TeamPlan = "trial" + TeamPlanEnterprise TeamPlan = "enterprise" + TeamPlanFree TeamPlan = "free" + TeamPlanPaid TeamPlan = "paid" + TeamPlanTrial TeamPlan = "trial" ) // Defines values for TeamSubscriptionOrderStatus. @@ -666,10 +673,13 @@ type ListPlugin struct { // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` - // Tier Supported tiers for plugins. + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. // - free: Free tier, with no paid tables. // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. - // - open-core: This option is deprecated, please use either free or paid. + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: Tier PluginTier `json:"tier"` UpdatedAt time.Time `json:"updated_at"` @@ -780,10 +790,13 @@ type Plugin struct { // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` - // Tier Supported tiers for plugins. + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. // - free: Free tier, with no paid tables. // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. - // - open-core: This option is deprecated, please use either free or paid. + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: Tier PluginTier `json:"tier"` UpdatedAt time.Time `json:"updated_at"` @@ -845,11 +858,14 @@ type PluginCreate struct { // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` - // Tier Supported tiers for plugins. + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. // - free: Free tier, with no paid tables. // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. - // - open-core: This option is deprecated, please use either free or paid. - Tier PluginTier `json:"tier"` + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: + Tier *PluginTier `json:"tier,omitempty"` // UsdPerRow Deprecated. Use `price_category` instead. // Deprecated: @@ -1077,10 +1093,12 @@ type PluginTableDetails struct { // PluginTableName Name of the table type PluginTableName = string -// PluginTier Supported tiers for plugins. +// PluginTier This field is deprecated, refer to `price_category` instead. +// This field is only kept for backward compatibility and may be removed in a future release. +// Supported tiers for plugins. // - free: Free tier, with no paid tables. // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. -// - open-core: This option is deprecated, please use either free or paid. +// - open-core: This option is deprecated, values will either be free or paid. type PluginTier string // PluginUpdate defines model for PluginUpdate. @@ -1115,10 +1133,13 @@ type PluginUpdate struct { // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. ShortDescription *string `json:"short_description,omitempty"` - // Tier Supported tiers for plugins. + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. // - free: Free tier, with no paid tables. // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. - // - open-core: This option is deprecated, please use either free or paid. + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: Tier *PluginTier `json:"tier,omitempty"` // UsdPerRow Deprecated. Update `price_category` instead. @@ -1504,6 +1525,9 @@ type SyncRun struct { // Status The status of the sync run Status SyncRunStatus `json:"status"` + // StatusReason The reason for the status + StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` + // SyncName Name of the sync SyncName string `json:"sync_name"` @@ -1540,6 +1564,9 @@ type SyncRunDetails struct { // Status The status of the sync run Status SyncRunStatus `json:"status"` + // StatusReason The reason for the status + StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` + // SyncName Name of the sync SyncName string `json:"sync_name"` @@ -1556,6 +1583,9 @@ type SyncRunID = openapi_types.UUID // SyncRunStatus The status of the sync run type SyncRunStatus string +// SyncRunStatusReason The reason for the status +type SyncRunStatusReason string + // SyncSource defines model for SyncSource. type SyncSource struct { // CreatedAt Time when the source was created @@ -2347,6 +2377,9 @@ type ListSyncRunsParams struct { type UpdateSyncRunJSONBody struct { // Status The status of the sync run Status *SyncRunStatus `json:"status,omitempty"` + + // StatusReason The reason for the status + StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` } // GetSyncRunLogsParams defines parameters for GetSyncRunLogs. diff --git a/spec.json b/spec.json index 0cc7c1f..ec31af1 100644 --- a/spec.json +++ b/spec.json @@ -5807,6 +5807,9 @@ "properties": { "status": { "$ref": "#/components/schemas/SyncRunStatus" + }, + "status_reason": { + "$ref": "#/components/schemas/SyncRunStatusReason" } } } @@ -6293,7 +6296,8 @@ "type": "string", "enum": [ "api", - "database" + "database", + "free" ] }, "PluginReleaseStage": { @@ -6306,8 +6310,9 @@ ] }, "PluginTier": { - "description": "Supported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, please use either free or paid.\n", + "description": "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", "type": "string", + "deprecated": true, "enum": [ "free", "paid", @@ -6460,7 +6465,6 @@ "kind", "name", "category", - "tier", "display_name", "short_description", "logo", @@ -9173,6 +9177,14 @@ "created" ] }, + "SyncRunStatusReason": { + "description": "The reason for the status", + "type": "string", + "enum": [ + "error", + "oom_killed" + ] + }, "SyncRun": { "description": "Managed Sync Run definition", "type": "object", @@ -9201,6 +9213,10 @@ "$ref": "#/components/schemas/SyncRunStatus", "description": "Status of the sync run" }, + "status_reason": { + "$ref": "#/components/schemas/SyncRunStatusReason", + "description": "Reason for the status of the sync run" + }, "created_at": { "example": "2017-07-14T16:53:42Z", "format": "date-time", From bffc1b7219558250661590d6c6342da3408b7690 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 6 May 2024 17:56:29 +0300 Subject: [PATCH 147/343] fix: Generate CloudQuery Go API Client from `spec.json` (#156) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 265 ++++++++++++++++++++++++++++++++++++++++++++++++-- models.gen.go | 90 ++++++++++++++--- spec.json | 195 ++++++++++++++++++++++++++++++++++--- 3 files changed, 516 insertions(+), 34 deletions(-) diff --git a/client.gen.go b/client.gen.go index 8307dca..119db5c 100644 --- a/client.gen.go +++ b/client.gen.go @@ -484,7 +484,10 @@ type ClientInterface interface { IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTeamUsageSummary request - GetTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + GetTeamUsageSummary(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetGroupedTeamUsageSummary request + GetGroupedTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTeamPluginUsage request GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2229,8 +2232,20 @@ func (c *Client) IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) GetTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamUsageSummaryRequest(c.Server, teamName, groupBy, params) +func (c *Client) GetTeamUsageSummary(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamUsageSummaryRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetGroupedTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetGroupedTeamUsageSummaryRequest(c.Server, teamName, groupBy, params) if err != nil { return nil, err } @@ -8385,7 +8400,111 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, } // NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary -func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams) (*http.Request, error) { +func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Metrics != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.AggregationPeriod != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetGroupedTeamUsageSummaryRequest generates requests for GetGroupedTeamUsageSummary +func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams) (*http.Request, error) { var err error var pathParam0 string @@ -8420,6 +8539,22 @@ func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, groupBy Get if params != nil { queryValues := queryURL.Query() + if params.Metrics != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.Start != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { @@ -9298,7 +9433,10 @@ type ClientWithResponsesInterface interface { IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) // GetTeamUsageSummaryWithResponse request - GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) + GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) + + // GetGroupedTeamUsageSummaryWithResponse request + GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) // GetTeamPluginUsageWithResponse request GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) @@ -12123,6 +12261,7 @@ type GetTeamUsageSummaryResponse struct { Body []byte HTTPResponse *http.Response JSON200 *UsageSummary + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound @@ -12146,6 +12285,34 @@ func (r GetTeamUsageSummaryResponse) StatusCode() int { return 0 } +type GetGroupedTeamUsageSummaryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageSummary + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetGroupedTeamUsageSummaryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetGroupedTeamUsageSummaryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response @@ -13607,14 +13774,23 @@ func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Co } // GetTeamUsageSummaryWithResponse request returning *GetTeamUsageSummaryResponse -func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetTeamUsageSummaryParamsGroupBy, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { - rsp, err := c.GetTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) +func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { + rsp, err := c.GetTeamUsageSummary(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } return ParseGetTeamUsageSummaryResponse(rsp) } +// GetGroupedTeamUsageSummaryWithResponse request returning *GetGroupedTeamUsageSummaryResponse +func (c *ClientWithResponses) GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) { + rsp, err := c.GetGroupedTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetGroupedTeamUsageSummaryResponse(rsp) +} + // GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) @@ -19444,6 +19620,81 @@ func ParseGetTeamUsageSummaryResponse(rsp *http.Response) (*GetTeamUsageSummaryR } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetGroupedTeamUsageSummaryResponse parses an HTTP response from a GetGroupedTeamUsageSummaryWithResponse call +func ParseGetGroupedTeamUsageSummaryResponse(rsp *http.Response) (*GetGroupedTeamUsageSummaryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetGroupedTeamUsageSummaryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UsageSummary + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 60fadd1..4896f92 100644 --- a/models.gen.go +++ b/models.gen.go @@ -186,6 +186,14 @@ const ( UsageSummaryMetadataAggregationPeriodMonth UsageSummaryMetadataAggregationPeriod = "month" ) +// Defines values for UsageSummaryMetadataMetrics. +const ( + UsageSummaryMetadataMetricsCloudEgressBytes UsageSummaryMetadataMetrics = "cloud_egress_bytes" + UsageSummaryMetadataMetricsCloudVcpuSeconds UsageSummaryMetadataMetrics = "cloud_vcpu_seconds" + UsageSummaryMetadataMetricsCloudVramByteSeconds UsageSummaryMetadataMetrics = "cloud_vram_byte_seconds" + UsageSummaryMetadataMetricsPaidRows UsageSummaryMetadataMetrics = "paid_rows" +) + // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -239,16 +247,39 @@ const ( Member EmailTeamInvitationJSONBodyRole = "member" ) +// Defines values for GetTeamUsageSummaryParamsMetrics. +const ( + GetTeamUsageSummaryParamsMetricsCloudVcpuSeconds GetTeamUsageSummaryParamsMetrics = "cloud_vcpu_seconds" + GetTeamUsageSummaryParamsMetricsCloudVramByteSeconds GetTeamUsageSummaryParamsMetrics = "cloud_vram_byte_seconds" + GetTeamUsageSummaryParamsMetricsNetworkEgressBytes GetTeamUsageSummaryParamsMetrics = "network_egress_bytes" + GetTeamUsageSummaryParamsMetricsPaidRows GetTeamUsageSummaryParamsMetrics = "paid_rows" +) + // Defines values for GetTeamUsageSummaryParamsAggregationPeriod. const ( GetTeamUsageSummaryParamsAggregationPeriodDay GetTeamUsageSummaryParamsAggregationPeriod = "day" GetTeamUsageSummaryParamsAggregationPeriodMonth GetTeamUsageSummaryParamsAggregationPeriod = "month" ) -// Defines values for GetTeamUsageSummaryParamsGroupBy. +// Defines values for GetGroupedTeamUsageSummaryParamsMetrics. const ( - GetTeamUsageSummaryParamsGroupByPlugin GetTeamUsageSummaryParamsGroupBy = "plugin" - GetTeamUsageSummaryParamsGroupByPriceCategory GetTeamUsageSummaryParamsGroupBy = "price_category" + CloudVcpuSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vcpu_seconds" + CloudVramByteSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vram_byte_seconds" + NetworkEgressBytes GetGroupedTeamUsageSummaryParamsMetrics = "network_egress_bytes" + PaidRows GetGroupedTeamUsageSummaryParamsMetrics = "paid_rows" +) + +// Defines values for GetGroupedTeamUsageSummaryParamsAggregationPeriod. +const ( + Day GetGroupedTeamUsageSummaryParamsAggregationPeriod = "day" + Month GetGroupedTeamUsageSummaryParamsAggregationPeriod = "month" +) + +// Defines values for GetGroupedTeamUsageSummaryParamsGroupBy. +const ( + GetGroupedTeamUsageSummaryParamsGroupByPlugin GetGroupedTeamUsageSummaryParamsGroupBy = "plugin" + GetGroupedTeamUsageSummaryParamsGroupByPriceCategory GetGroupedTeamUsageSummaryParamsGroupBy = "price_category" + GetGroupedTeamUsageSummaryParamsGroupBySyncId GetGroupedTeamUsageSummaryParamsGroupBy = "sync_id" ) // APIKey API Key to interact with CloudQuery Cloud under specific team @@ -1326,16 +1357,16 @@ type SpendSummaryValue struct { Total string `json:"total"` } -// SpendingLimit A configurable spending limit for the team. +// SpendingLimit A configurable spending limit for the team. Empty values indicate no limit. type SpendingLimit struct { // CreatedAt The date and time the team limit was created. - CreatedAt time.Time `json:"created_at"` + CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt The date and time the team limit was last updated. - UpdatedAt time.Time `json:"updated_at"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` // Usd The maximum USD amount the team is allowed to use within a calendar month. - USD int `json:"usd"` + USD *int `json:"usd,omitempty"` } // SpendingLimitCreate A configurable monthly limit for team usage. @@ -1844,7 +1875,7 @@ type UsageIncrease struct { } `json:"tables,omitempty"` } -// UsageSummary A usage summary for a team, summarizing the paid rows synced by each plugin or price category over a given time range. +// UsageSummary A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range. // Note that empty or all-zero values are not included in the response. type UsageSummary struct { // Groups The groups of the usage summary. Every group will have a corresponding value at the same index in the values array. @@ -1858,6 +1889,9 @@ type UsageSummary struct { // End The exclusive end of the query time range. End time.Time `json:"end"` + // Metrics List of metrics included in the response. + Metrics []UsageSummaryMetadataMetrics `json:"metrics"` + // Start The inclusive start of the query time range. Start time.Time `json:"start"` } `json:"metadata"` @@ -1867,6 +1901,9 @@ type UsageSummary struct { // UsageSummaryMetadataAggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. type UsageSummaryMetadataAggregationPeriod string +// UsageSummaryMetadataMetrics defines model for UsageSummary.Metadata.Metrics. +type UsageSummaryMetadataMetrics string + // UsageSummaryGroup A usage summary group. type UsageSummaryGroup struct { // Name The name of the group. @@ -1878,6 +1915,15 @@ type UsageSummaryGroup struct { // UsageSummaryValue A usage summary value. type UsageSummaryValue struct { + // CloudEgressBytes Egress bytes consumed in this period, one per group. + CloudEgressBytes *[]int64 `json:"cloud_egress_bytes,omitempty"` + + // CloudVcpuSeconds vCPU/seconds consumed in this period, one per group. + CloudVcpuSeconds *[]int64 `json:"cloud_vcpu_seconds,omitempty"` + + // CloudVramByteSeconds vRAM/byte-seconds consumed in this period, one per group. + CloudVramByteSeconds *[]int64 `json:"cloud_vram_byte_seconds,omitempty"` + // PaidRows The paid rows that were synced in this period, one per group. PaidRows *[]int64 `json:"paid_rows,omitempty"` @@ -2413,18 +2459,38 @@ type ListTeamPluginUsageParams struct { // GetTeamUsageSummaryParams defines parameters for GetTeamUsageSummary. type GetTeamUsageSummaryParams struct { - Start *time.Time `form:"start,omitempty" json:"start,omitempty"` - End *time.Time `form:"end,omitempty" json:"end,omitempty"` + Metrics *[]GetTeamUsageSummaryParamsMetrics `form:"metrics,omitempty" json:"metrics,omitempty"` + Start *time.Time `form:"start,omitempty" json:"start,omitempty"` + End *time.Time `form:"end,omitempty" json:"end,omitempty"` // AggregationPeriod An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month. AggregationPeriod *GetTeamUsageSummaryParamsAggregationPeriod `form:"aggregation_period,omitempty" json:"aggregation_period,omitempty"` } +// GetTeamUsageSummaryParamsMetrics defines parameters for GetTeamUsageSummary. +type GetTeamUsageSummaryParamsMetrics string + // GetTeamUsageSummaryParamsAggregationPeriod defines parameters for GetTeamUsageSummary. type GetTeamUsageSummaryParamsAggregationPeriod string -// GetTeamUsageSummaryParamsGroupBy defines parameters for GetTeamUsageSummary. -type GetTeamUsageSummaryParamsGroupBy string +// GetGroupedTeamUsageSummaryParams defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParams struct { + Metrics *[]GetGroupedTeamUsageSummaryParamsMetrics `form:"metrics,omitempty" json:"metrics,omitempty"` + Start *time.Time `form:"start,omitempty" json:"start,omitempty"` + End *time.Time `form:"end,omitempty" json:"end,omitempty"` + + // AggregationPeriod An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month. + AggregationPeriod *GetGroupedTeamUsageSummaryParamsAggregationPeriod `form:"aggregation_period,omitempty" json:"aggregation_period,omitempty"` +} + +// GetGroupedTeamUsageSummaryParamsMetrics defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParamsMetrics string + +// GetGroupedTeamUsageSummaryParamsAggregationPeriod defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParamsAggregationPeriod string + +// GetGroupedTeamUsageSummaryParamsGroupBy defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParamsGroupBy string // ListUsersByTeamParams defines parameters for ListUsersByTeam. type ListUsersByTeamParams struct { diff --git a/spec.json b/spec.json index ec31af1..97047de 100644 --- a/spec.json +++ b/spec.json @@ -3063,7 +3063,8 @@ }, "/teams/{team_name}/monthly-limits": { "get": { - "description": "List all monthly limits for the team.", + "deprecated": true, + "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nList all monthly limits for the team.\n", "operationId": "ListMonthlyLimitsByTeam", "parameters": [ { @@ -3119,7 +3120,8 @@ ] }, "post": { - "description": "Create a monthly limit for a plugin", + "deprecated": true, + "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nCreate a monthly limit for a plugin\n", "operationId": "CreateMonthlyLimit", "parameters": [ { @@ -3332,7 +3334,8 @@ }, "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}": { "get": { - "description": "Get a monthly limit for a plugin", + "deprecated": true, + "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nGet a monthly limit for a plugin\n", "operationId": "GetMonthlyLimit", "parameters": [ { @@ -3377,7 +3380,8 @@ ] }, "put": { - "description": "Update a monthly limit for a plugin", + "deprecated": true, + "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nUpdate a monthly limit for a plugin\n", "operationId": "UpdateMonthlyLimit", "parameters": [ { @@ -3679,10 +3683,109 @@ ] } }, - "/teams/{team_name}/usage-summary/{group_by}": { + "/teams/{team_name}/usage-summary": { "get": { - "description": "Get a summary of usage for the specified time range, grouped by plugin.", + "description": "Get a summary of usage for the specified time range.", "operationId": "GetTeamUsageSummary", + "parameters": [ + { + "$ref": "#/components/parameters/team_name" + }, + { + "in": "query", + "name": "metrics", + "required": false, + "schema": { + "type": "array", + "description": "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", + "items": { + "type": "string", + "enum": [ + "paid_rows", + "cloud_vcpu_seconds", + "cloud_vram_byte_seconds", + "network_egress_bytes" + ] + }, + "default": [ + "paid_rows" + ] + } + }, + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "description": "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago." + } + }, + { + "in": "query", + "name": "end", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "description": "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time." + } + }, + { + "in": "query", + "name": "aggregation_period", + "description": "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", + "required": false, + "schema": { + "type": "string", + "default": "day", + "enum": [ + "day", + "month" + ] + } + } + ], + "responses": { + "200": { + "description": "A summary of usage for the specified time range.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageSummary" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/RequiresAuthentication" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "422": { + "$ref": "#/components/responses/UnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalError" + } + }, + "tags": [ + "teams" + ] + } + }, + "/teams/{team_name}/usage-summary/{group_by}": { + "get": { + "description": "Get a grouped summary of usage for the specified time range.", + "operationId": "GetGroupedTeamUsageSummary", "parameters": [ { "$ref": "#/components/parameters/team_name" @@ -3695,7 +3798,30 @@ "type": "string", "enum": [ "price_category", - "plugin" + "plugin", + "sync_id" + ], + "description": "Group by usage summary. `plugin` and `price_category` groupings are only available for `paid-rows`." + } + }, + { + "in": "query", + "name": "metrics", + "required": false, + "schema": { + "type": "array", + "description": "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", + "items": { + "type": "string", + "enum": [ + "paid_rows", + "cloud_vcpu_seconds", + "cloud_vram_byte_seconds", + "network_egress_bytes" + ] + }, + "default": [ + "paid_rows" ] } }, @@ -3745,6 +3871,9 @@ } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "401": { "$ref": "#/components/responses/RequiresAuthentication" }, @@ -7908,14 +8037,9 @@ }, "SpendingLimit": { "title": "Team Spending Limit", - "description": "A configurable spending limit for the team.", + "description": "A configurable spending limit for the team. Empty values indicate no limit.", "type": "object", "additionalProperties": false, - "required": [ - "created_at", - "updated_at", - "usd" - ], "properties": { "created_at": { "example": "2017-07-14T16:53:42Z", @@ -8190,12 +8314,36 @@ "format": "int64" }, "description": "The paid rows that were synced in this period, one per group." + }, + "cloud_vcpu_seconds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "vCPU/seconds consumed in this period, one per group." + }, + "cloud_vram_byte_seconds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "vRAM/byte-seconds consumed in this period, one per group." + }, + "cloud_egress_bytes": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Egress bytes consumed in this period, one per group." } } }, "UsageSummary": { "title": "CloudQuery Usage Summary", - "description": "A usage summary for a team, summarizing the paid rows synced by each plugin or price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "description": "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", "type": "object", "additionalProperties": false, "required": [ @@ -8249,7 +8397,8 @@ "required": [ "start", "end", - "aggregation_period" + "aggregation_period", + "metrics" ], "additionalProperties": false, "properties": { @@ -8270,6 +8419,22 @@ "day", "month" ] + }, + "metrics": { + "type": "array", + "description": "List of metrics included in the response.", + "items": { + "type": "string", + "enum": [ + "paid_rows", + "cloud_egress_bytes", + "cloud_vcpu_seconds", + "cloud_vram_byte_seconds" + ] + }, + "default": [ + "paid_rows" + ] } } } From 6846e843cc68715a9110947add0a312c74dc21f5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 6 May 2024 18:55:33 +0300 Subject: [PATCH 148/343] fix: Generate CloudQuery Go API Client from `spec.json` (#157) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.json b/spec.json index 97047de..699b77c 100644 --- a/spec.json +++ b/spec.json @@ -6,7 +6,7 @@ "name": "CloudQuery Support Team", "url": "https://cloudquery.io" }, - "description": "API to interact with CloudQuery Cloud", + "description": "Welcome to the CloudQuery API documentation! This API can be used to interact with the CloudQuery platform. The API allows you to manage your teams, usage, spend limits, plugins, addons, cloud syncs, and much more.\n\nThe API is secured using bearer tokens. To get started, you can generate an API key from the CloudQuery dashboard. For a step-by-step guide, see: https://docs.cloudquery.io/docs/deployment/generate-api-key.\n\nThe base URL for the API is `https://api.cloudquery.io`.\n", "license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" From 2f19e75b48a6b6b7730a6290d57fb15ba8062c9b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 7 May 2024 12:09:35 +0300 Subject: [PATCH 149/343] chore(main): Release v1.9.2 (#147) :robot: I have created a release *beep* *boop* --- ## [1.9.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.1...v1.9.2) (2024-05-06) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#146](https://github.com/cloudquery/cloudquery-api-go/issues/146)) ([a90e87b](https://github.com/cloudquery/cloudquery-api-go/commit/a90e87b9f0025bdf7a4badf17927369dc167916a)) * Generate CloudQuery Go API Client from `spec.json` ([#148](https://github.com/cloudquery/cloudquery-api-go/issues/148)) ([15e0252](https://github.com/cloudquery/cloudquery-api-go/commit/15e02524a5da068c9cc104a3d0ce09c1a268c093)) * Generate CloudQuery Go API Client from `spec.json` ([#149](https://github.com/cloudquery/cloudquery-api-go/issues/149)) ([33fe0a6](https://github.com/cloudquery/cloudquery-api-go/commit/33fe0a62af1b44e23908e4cc308b6585a96e095d)) * Generate CloudQuery Go API Client from `spec.json` ([#150](https://github.com/cloudquery/cloudquery-api-go/issues/150)) ([7885344](https://github.com/cloudquery/cloudquery-api-go/commit/788534459b01f2786bb8dd7a840f49743995b471)) * Generate CloudQuery Go API Client from `spec.json` ([#151](https://github.com/cloudquery/cloudquery-api-go/issues/151)) ([cd9aa44](https://github.com/cloudquery/cloudquery-api-go/commit/cd9aa4416b92b586b754906b7772d998822e1c28)) * Generate CloudQuery Go API Client from `spec.json` ([#152](https://github.com/cloudquery/cloudquery-api-go/issues/152)) ([57939a5](https://github.com/cloudquery/cloudquery-api-go/commit/57939a53deb3f8bd2c7219ae0ebe58633e3c8adf)) * Generate CloudQuery Go API Client from `spec.json` ([#153](https://github.com/cloudquery/cloudquery-api-go/issues/153)) ([13e63ad](https://github.com/cloudquery/cloudquery-api-go/commit/13e63ad91365ea906dec430b68d7255261a091fa)) * Generate CloudQuery Go API Client from `spec.json` ([#154](https://github.com/cloudquery/cloudquery-api-go/issues/154)) ([ecfd659](https://github.com/cloudquery/cloudquery-api-go/commit/ecfd6590a9e8a183be8de0fc56d790513c4b3b36)) * Generate CloudQuery Go API Client from `spec.json` ([#155](https://github.com/cloudquery/cloudquery-api-go/issues/155)) ([1b3d18c](https://github.com/cloudquery/cloudquery-api-go/commit/1b3d18ce2ee5dc61edce4767c70b04026fd095bb)) * Generate CloudQuery Go API Client from `spec.json` ([#156](https://github.com/cloudquery/cloudquery-api-go/issues/156)) ([bffc1b7](https://github.com/cloudquery/cloudquery-api-go/commit/bffc1b7219558250661590d6c6342da3408b7690)) * Generate CloudQuery Go API Client from `spec.json` ([#157](https://github.com/cloudquery/cloudquery-api-go/issues/157)) ([6846e84](https://github.com/cloudquery/cloudquery-api-go/commit/6846e843cc68715a9110947add0a312c74dc21f5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78ecdd7..9b4aa59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [1.9.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.1...v1.9.2) (2024-05-06) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#146](https://github.com/cloudquery/cloudquery-api-go/issues/146)) ([a90e87b](https://github.com/cloudquery/cloudquery-api-go/commit/a90e87b9f0025bdf7a4badf17927369dc167916a)) +* Generate CloudQuery Go API Client from `spec.json` ([#148](https://github.com/cloudquery/cloudquery-api-go/issues/148)) ([15e0252](https://github.com/cloudquery/cloudquery-api-go/commit/15e02524a5da068c9cc104a3d0ce09c1a268c093)) +* Generate CloudQuery Go API Client from `spec.json` ([#149](https://github.com/cloudquery/cloudquery-api-go/issues/149)) ([33fe0a6](https://github.com/cloudquery/cloudquery-api-go/commit/33fe0a62af1b44e23908e4cc308b6585a96e095d)) +* Generate CloudQuery Go API Client from `spec.json` ([#150](https://github.com/cloudquery/cloudquery-api-go/issues/150)) ([7885344](https://github.com/cloudquery/cloudquery-api-go/commit/788534459b01f2786bb8dd7a840f49743995b471)) +* Generate CloudQuery Go API Client from `spec.json` ([#151](https://github.com/cloudquery/cloudquery-api-go/issues/151)) ([cd9aa44](https://github.com/cloudquery/cloudquery-api-go/commit/cd9aa4416b92b586b754906b7772d998822e1c28)) +* Generate CloudQuery Go API Client from `spec.json` ([#152](https://github.com/cloudquery/cloudquery-api-go/issues/152)) ([57939a5](https://github.com/cloudquery/cloudquery-api-go/commit/57939a53deb3f8bd2c7219ae0ebe58633e3c8adf)) +* Generate CloudQuery Go API Client from `spec.json` ([#153](https://github.com/cloudquery/cloudquery-api-go/issues/153)) ([13e63ad](https://github.com/cloudquery/cloudquery-api-go/commit/13e63ad91365ea906dec430b68d7255261a091fa)) +* Generate CloudQuery Go API Client from `spec.json` ([#154](https://github.com/cloudquery/cloudquery-api-go/issues/154)) ([ecfd659](https://github.com/cloudquery/cloudquery-api-go/commit/ecfd6590a9e8a183be8de0fc56d790513c4b3b36)) +* Generate CloudQuery Go API Client from `spec.json` ([#155](https://github.com/cloudquery/cloudquery-api-go/issues/155)) ([1b3d18c](https://github.com/cloudquery/cloudquery-api-go/commit/1b3d18ce2ee5dc61edce4767c70b04026fd095bb)) +* Generate CloudQuery Go API Client from `spec.json` ([#156](https://github.com/cloudquery/cloudquery-api-go/issues/156)) ([bffc1b7](https://github.com/cloudquery/cloudquery-api-go/commit/bffc1b7219558250661590d6c6342da3408b7690)) +* Generate CloudQuery Go API Client from `spec.json` ([#157](https://github.com/cloudquery/cloudquery-api-go/issues/157)) ([6846e84](https://github.com/cloudquery/cloudquery-api-go/commit/6846e843cc68715a9110947add0a312c74dc21f5)) + ## [1.9.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.0...v1.9.1) (2024-04-04) From 3d854f8120d9bbb7a6c80c1c61f1a5a3c2cf5c20 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Wed, 8 May 2024 15:47:59 +0100 Subject: [PATCH 150/343] feat: Use consistent enum naming (#159) This ensures enums are always generated with the same name, regardless of conflicts (see https://github.com/deepmap/oapi-codegen/pull/662) --- models.gen.go | 64 +++++++++++++++++++++++++-------------------------- models.yaml | 2 ++ 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/models.gen.go b/models.gen.go index 4896f92..851f510 100644 --- a/models.gen.go +++ b/models.gen.go @@ -16,7 +16,7 @@ const ( // Defines values for APIKeyScope. const ( - ReadAndWrite APIKeyScope = "read-and-write" + APIKeyScopeReadAndWrite APIKeyScope = "read-and-write" ) // Defines values for AddonCategory. @@ -30,7 +30,7 @@ const ( // Defines values for AddonFormat. const ( - Zip AddonFormat = "zip" + AddonFormatZip AddonFormat = "zip" ) // Defines values for AddonOrderStatus. @@ -48,8 +48,8 @@ const ( // Defines values for AddonType. const ( - Transformation AddonType = "transformation" - Visualization AddonType = "visualization" + AddonTypeTransformation AddonType = "transformation" + AddonTypeVisualization AddonType = "visualization" ) // Defines values for PluginCategory. @@ -72,8 +72,8 @@ const ( // Defines values for PluginKind. const ( - Destination PluginKind = "destination" - Source PluginKind = "source" + PluginKindDestination PluginKind = "destination" + PluginKindSource PluginKind = "source" ) // Defines values for PluginNotificationRequestStatus. @@ -84,8 +84,8 @@ const ( // Defines values for PluginPackageType. const ( - Docker PluginPackageType = "docker" - Native PluginPackageType = "native" + PluginPackageTypeDocker PluginPackageType = "docker" + PluginPackageTypeNative PluginPackageType = "native" ) // Defines values for PluginPriceCategory. @@ -111,9 +111,9 @@ const ( // Defines values for PluginReleaseStageUpdate. const ( - ComingSoon PluginReleaseStageUpdate = "coming-soon" - Ga PluginReleaseStageUpdate = "ga" - Preview PluginReleaseStageUpdate = "preview" + PluginReleaseStageUpdateComingSoon PluginReleaseStageUpdate = "coming-soon" + PluginReleaseStageUpdateGa PluginReleaseStageUpdate = "ga" + PluginReleaseStageUpdatePreview PluginReleaseStageUpdate = "preview" ) // Defines values for PluginTier. @@ -125,21 +125,21 @@ const ( // Defines values for SyncDestinationMigrateMode. const ( - Forced SyncDestinationMigrateMode = "forced" - Safe SyncDestinationMigrateMode = "safe" + SyncDestinationMigrateModeForced SyncDestinationMigrateMode = "forced" + SyncDestinationMigrateModeSafe SyncDestinationMigrateMode = "safe" ) // Defines values for SyncDestinationWriteMode. const ( - Append SyncDestinationWriteMode = "append" - Overwrite SyncDestinationWriteMode = "overwrite" - OverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" + SyncDestinationWriteModeAppend SyncDestinationWriteMode = "append" + SyncDestinationWriteModeOverwrite SyncDestinationWriteMode = "overwrite" + SyncDestinationWriteModeOverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" ) // Defines values for SyncLastUpdateSource. const ( - Ui SyncLastUpdateSource = "ui" - Yaml SyncLastUpdateSource = "yaml" + SyncLastUpdateSourceUi SyncLastUpdateSource = "ui" + SyncLastUpdateSourceYaml SyncLastUpdateSource = "yaml" ) // Defines values for SyncRunStatus. @@ -153,8 +153,8 @@ const ( // Defines values for SyncRunStatusReason. const ( - Error SyncRunStatusReason = "error" - OomKilled SyncRunStatusReason = "oom_killed" + SyncRunStatusReasonError SyncRunStatusReason = "error" + SyncRunStatusReasonOomKilled SyncRunStatusReason = "oom_killed" ) // Defines values for SyncTestConnectionStatus. @@ -175,9 +175,9 @@ const ( // Defines values for TeamSubscriptionOrderStatus. const ( - Cancelled TeamSubscriptionOrderStatus = "cancelled" - Completed TeamSubscriptionOrderStatus = "completed" - Pending TeamSubscriptionOrderStatus = "pending" + TeamSubscriptionOrderStatusCancelled TeamSubscriptionOrderStatus = "cancelled" + TeamSubscriptionOrderStatusCompleted TeamSubscriptionOrderStatus = "completed" + TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" ) // Defines values for UsageSummaryMetadataAggregationPeriod. @@ -238,13 +238,13 @@ const ( // Defines values for ListPluginVersionsParamsSortBy. const ( - CreatedAt ListPluginVersionsParamsSortBy = "created_at" + ListPluginVersionsParamsSortByCreatedAt ListPluginVersionsParamsSortBy = "created_at" ) // Defines values for EmailTeamInvitationJSONBodyRole. const ( - Admin EmailTeamInvitationJSONBodyRole = "admin" - Member EmailTeamInvitationJSONBodyRole = "member" + EmailTeamInvitationJSONBodyRoleAdmin EmailTeamInvitationJSONBodyRole = "admin" + EmailTeamInvitationJSONBodyRoleMember EmailTeamInvitationJSONBodyRole = "member" ) // Defines values for GetTeamUsageSummaryParamsMetrics. @@ -263,16 +263,16 @@ const ( // Defines values for GetGroupedTeamUsageSummaryParamsMetrics. const ( - CloudVcpuSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vcpu_seconds" - CloudVramByteSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vram_byte_seconds" - NetworkEgressBytes GetGroupedTeamUsageSummaryParamsMetrics = "network_egress_bytes" - PaidRows GetGroupedTeamUsageSummaryParamsMetrics = "paid_rows" + GetGroupedTeamUsageSummaryParamsMetricsCloudVcpuSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vcpu_seconds" + GetGroupedTeamUsageSummaryParamsMetricsCloudVramByteSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vram_byte_seconds" + GetGroupedTeamUsageSummaryParamsMetricsNetworkEgressBytes GetGroupedTeamUsageSummaryParamsMetrics = "network_egress_bytes" + GetGroupedTeamUsageSummaryParamsMetricsPaidRows GetGroupedTeamUsageSummaryParamsMetrics = "paid_rows" ) // Defines values for GetGroupedTeamUsageSummaryParamsAggregationPeriod. const ( - Day GetGroupedTeamUsageSummaryParamsAggregationPeriod = "day" - Month GetGroupedTeamUsageSummaryParamsAggregationPeriod = "month" + GetGroupedTeamUsageSummaryParamsAggregationPeriodDay GetGroupedTeamUsageSummaryParamsAggregationPeriod = "day" + GetGroupedTeamUsageSummaryParamsAggregationPeriodMonth GetGroupedTeamUsageSummaryParamsAggregationPeriod = "month" ) // Defines values for GetGroupedTeamUsageSummaryParamsGroupBy. diff --git a/models.yaml b/models.yaml index 1321987..c088ab1 100644 --- a/models.yaml +++ b/models.yaml @@ -2,3 +2,5 @@ package: cloudquery_api generate: models: true output: models.gen.go +compatibility: + always-prefix-enum-values: true From 2bf22889b82d572fb727c0075cd80a1b489acff3 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 8 May 2024 17:49:01 +0300 Subject: [PATCH 151/343] chore(main): Release v1.10.0 (#160) :robot: I have created a release *beep* *boop* --- ## [1.10.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.2...v1.10.0) (2024-05-08) ### Features * Use consistent enum naming ([#159](https://github.com/cloudquery/cloudquery-api-go/issues/159)) ([3d854f8](https://github.com/cloudquery/cloudquery-api-go/commit/3d854f8120d9bbb7a6c80c1c61f1a5a3c2cf5c20)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4aa59..a4116dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.10.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.2...v1.10.0) (2024-05-08) + + +### Features + +* Use consistent enum naming ([#159](https://github.com/cloudquery/cloudquery-api-go/issues/159)) ([3d854f8](https://github.com/cloudquery/cloudquery-api-go/commit/3d854f8120d9bbb7a6c80c1c61f1a5a3c2cf5c20)) + ## [1.9.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.1...v1.9.2) (2024-05-06) From 01453e3bf74fa1f9f36a43c9ae78e4130a254f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Muraru?= Date: Thu, 9 May 2024 11:03:46 +0300 Subject: [PATCH 152/343] feat: Extract nested properties in their own structs (#158) --- .github/workflows/gen-client.yml | 6 + Makefile | 12 + client.gen.go | 548 +- models.gen.go | 634 +- spec.json | 15936 +++++++++++++---------------- 5 files changed, 7907 insertions(+), 9229 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 189f176..eb78f90 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -16,6 +16,12 @@ jobs: run: | curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/internal/servergen/spec.json -o spec.json + - name: Format Specs File + run: | + docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli:v7.5.0 generate -i /local/spec.json -g openapi --skip-validate-spec -o /local/.generated + cp .generated/openapi.json spec.json + sudo rm -rf .generated + - name: Set up Go 1.x uses: actions/setup-go@v3 with: diff --git a/Makefile b/Makefile index 357a92a..6a91c67 100644 --- a/Makefile +++ b/Makefile @@ -6,3 +6,15 @@ test: lint: golangci-lint run +.PHONY: gen-client +gen-client: + @command -v openapi-generator >/dev/null 2>&1 || { \ + echo "Error: 'openapi-generator' command not found. Please install it before running convert-spec."; \ + echo "On MacOS you can use Homebrew: brew install openapi-generator"; \ + echo "You can install it by following the instructions at: https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#1---installation"; \ + exit 1; \ + } + openapi-generator generate -g openapi -i spec.json -o .openapi-tmp + mv .openapi-tmp/openapi.json spec.json + rm -rf .openapi-tmp + go generate ./... \ No newline at end of file diff --git a/client.gen.go b/client.gen.go index 119db5c..b4d9927 100644 --- a/client.gen.go +++ b/client.gen.go @@ -9489,12 +9489,9 @@ func (r HealthCheckResponse) StatusCode() int { type ListAddonsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []ListAddon `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON500 *InternalError + JSON200 *ListAddons200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -9620,14 +9617,11 @@ func (r UpdateAddonResponse) StatusCode() int { type ListAddonVersionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []AddonVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListAddonVersions200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -9782,12 +9776,9 @@ func (r UploadAddonAssetResponse) StatusCode() int { type ListPluginNotificationRequestsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []PluginNotificationRequest `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON500 *InternalError + JSON200 *ListPluginNotificationRequests200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -9861,13 +9852,10 @@ func (r DeletePluginNotificationRequestResponse) StatusCode() int { type GetPluginNotificationRequestResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []PluginNotificationRequest `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListPluginNotificationRequests200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -9889,12 +9877,9 @@ func (r GetPluginNotificationRequestResponse) StatusCode() int { type ListPluginsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []ListPlugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON500 *InternalError + JSON200 *ListPlugins200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10045,14 +10030,11 @@ func (r DeletePluginUpcomingPriceChangesResponse) StatusCode() int { type ListPluginUpcomingPriceChangesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []PluginPrice `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListPluginUpcomingPriceChanges200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10101,14 +10083,11 @@ func (r CreatePluginUpcomingPriceChangeResponse) StatusCode() int { type ListPluginVersionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []PluginVersionList `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListPluginVersions200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10287,13 +10266,10 @@ func (r DeletePluginVersionDocsResponse) StatusCode() int { type ListPluginVersionDocsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []PluginDocsPage `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListPluginVersionDocs200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10315,15 +10291,13 @@ func (r ListPluginVersionDocsResponse) StatusCode() int { type ReplacePluginVersionDocsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + JSON201 *CreatePluginVersionDocs201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10345,15 +10319,13 @@ func (r ReplacePluginVersionDocsResponse) StatusCode() int { type CreatePluginVersionDocsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + JSON201 *CreatePluginVersionDocs201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10402,13 +10374,10 @@ func (r DeletePluginVersionTablesResponse) StatusCode() int { type ListPluginVersionTablesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []PluginTable `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListPluginVersionTables200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10430,15 +10399,13 @@ func (r ListPluginVersionTablesResponse) StatusCode() int { type CreatePluginVersionTablesResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *struct { - Names *[]PluginTableName `json:"names,omitempty"` - } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + JSON201 *CreatePluginVersionTables201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10512,14 +10479,11 @@ func (r AuthRegistryRequestResponse) StatusCode() int { type ListTeamsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []Team `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListTeams200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10649,14 +10613,11 @@ func (r UpdateTeamResponse) StatusCode() int { type ListAddonOrdersByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []AddonOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListAddonOrdersByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10756,14 +10717,11 @@ func (r DeleteAddonsByTeamResponse) StatusCode() int { type ListAddonsByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []Addon `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListAddonsByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10812,13 +10770,10 @@ func (r DownloadAddonAssetByTeamResponse) StatusCode() int { type ListTeamAPIKeysResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []APIKey `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListTeamAPIKeys200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10891,14 +10846,11 @@ func (r DeleteTeamAPIKeyResponse) StatusCode() int { type CreateTeamImagesResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *struct { - Items []TeamImage `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON201 *CreateTeamImages201Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -10920,12 +10872,9 @@ func (r CreateTeamImagesResponse) StatusCode() int { type ListTeamInvitationsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON403 *Forbidden - JSON500 *InternalError + JSON200 *ListTeamInvitations200Response + JSON403 *Forbidden + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11025,14 +10974,11 @@ func (r CancelTeamInvitationResponse) StatusCode() int { type ListInvoicesByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []Invoice `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListInvoicesByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11054,15 +11000,12 @@ func (r ListInvoicesByTeamResponse) StatusCode() int { type GetTeamMembershipsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []MembershipWithUser `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *GetTeamMemberships200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11110,14 +11053,11 @@ func (r DeleteTeamMembershipResponse) StatusCode() int { type ListMonthlyLimitsByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []MonthlyLimit `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListMonthlyLimitsByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11270,14 +11210,11 @@ func (r DeletePluginsByTeamResponse) StatusCode() int { type ListPluginsByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListPluginsByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11457,14 +11394,11 @@ func (r UpdateSpendingLimitResponse) StatusCode() int { type ListSubscriptionOrdersByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []TeamSubscriptionOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListSubscriptionOrdersByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11540,13 +11474,10 @@ func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { type ListSyncDestinationsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []SyncDestination `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListSyncDestinations200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11699,13 +11630,10 @@ func (r UpdateSyncDestinationResponse) StatusCode() int { type ListSyncSourcesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []SyncSource `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListSyncSources200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -11858,13 +11786,10 @@ func (r UpdateSyncSourceResponse) StatusCode() int { type ListSyncsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []Sync `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListSyncs200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -12042,13 +11967,10 @@ func (r UpdateSyncResponse) StatusCode() int { type ListSyncRunsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []SyncRun `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListSyncRuns200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -12148,15 +12070,12 @@ func (r UpdateSyncRunResponse) StatusCode() int { type GetSyncRunLogsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - // Location The location to download the sync run logs from - Location string `json:"location"` - } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + JSON200 *SyncRunLogs + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -12204,14 +12123,11 @@ func (r CreateSyncRunProgressResponse) StatusCode() int { type ListTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []UsageCurrent `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListTeamPluginUsage200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -12342,15 +12258,12 @@ func (r GetTeamPluginUsageResponse) StatusCode() int { type ListUsersByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []User `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + JSON200 *ListUsersByTeam200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -12447,11 +12360,8 @@ func (r UpdateCurrentUserResponse) StatusCode() int { type ListCurrentUserInvitationsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []InvitationWithToken `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON500 *InternalError + JSON200 *ListCurrentUserInvitations200Response + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -12473,13 +12383,10 @@ func (r ListCurrentUserInvitationsResponse) StatusCode() int { type GetCurrentUserMembershipsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *struct { - Items []MembershipWithTeam `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError + JSON200 *GetCurrentUserMemberships200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -13902,10 +13809,7 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []ListAddon `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListAddons200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14161,10 +14065,7 @@ func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsRespo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []AddonVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListAddonVersions200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14509,10 +14410,7 @@ func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPlugi switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginNotificationRequest `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14660,10 +14558,7 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginNotificationRequest `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14710,10 +14605,7 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []ListPlugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPlugins200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15016,10 +14908,7 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginPrice `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPluginUpcomingPriceChanges200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15134,10 +15023,7 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginVersionList `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPluginVersions200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15522,10 +15408,7 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginDocsPage `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPluginVersionDocs200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15572,9 +15455,7 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15642,9 +15523,7 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginDocsPageName `json:"names,omitempty"` - } + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15773,10 +15652,7 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginTable `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPluginVersionTables200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15823,9 +15699,7 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Names *[]PluginTableName `json:"names,omitempty"` - } + var dest CreatePluginVersionTables201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16001,10 +15875,7 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Team `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListTeams200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16302,10 +16173,7 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []AddonOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListAddonOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16521,10 +16389,7 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Addon `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListAddonsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16639,10 +16504,7 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []APIKey `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListTeamAPIKeys200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16790,10 +16652,7 @@ func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Items []TeamImage `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest CreateTeamImages201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16847,10 +16706,7 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListTeamInvitations200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -17052,10 +16908,7 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Invoice `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListInvoicesByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -17109,10 +16962,7 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []MembershipWithUser `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest GetTeamMemberships200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -17227,10 +17077,7 @@ func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimit switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []MonthlyLimit `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListMonthlyLimitsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -17561,10 +17408,7 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListPluginsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -17956,10 +17800,7 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []TeamSubscriptionOrder `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListSubscriptionOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -18135,10 +17976,7 @@ func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestination switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []SyncDestination `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListSyncDestinations200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -18462,10 +18300,7 @@ func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []SyncSource `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListSyncSources200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -18789,10 +18624,7 @@ func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Sync `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListSyncs200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19163,10 +18995,7 @@ func ParseListSyncRunsResponse(rsp *http.Response) (*ListSyncRunsResponse, error switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []SyncRun `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListSyncRuns200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19375,10 +19204,7 @@ func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, e switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Location The location to download the sync run logs from - Location string `json:"location"` - } + var dest SyncRunLogs if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19496,10 +19322,7 @@ func ParseListTeamPluginUsageResponse(rsp *http.Response) (*ListTeamPluginUsageR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []UsageCurrent `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListTeamPluginUsage200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19804,10 +19627,7 @@ func ParseListUsersByTeamResponse(rsp *http.Response) (*ListUsersByTeamResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []User `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListUsersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -20009,10 +19829,7 @@ func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUs switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []InvitationWithToken `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest ListCurrentUserInvitations200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -20045,10 +19862,7 @@ func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUser switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []MembershipWithTeam `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest GetCurrentUserMemberships200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 851f510..10f5366 100644 --- a/models.gen.go +++ b/models.gen.go @@ -52,6 +52,12 @@ const ( AddonTypeVisualization AddonType = "visualization" ) +// Defines values for EmailTeamInvitationRequestRole. +const ( + EmailTeamInvitationRequestRoleAdmin EmailTeamInvitationRequestRole = "admin" + EmailTeamInvitationRequestRoleMember EmailTeamInvitationRequestRole = "member" +) + // Defines values for PluginCategory. const ( PluginCategoryCloudFinops PluginCategory = "cloud-finops" @@ -186,14 +192,6 @@ const ( UsageSummaryMetadataAggregationPeriodMonth UsageSummaryMetadataAggregationPeriod = "month" ) -// Defines values for UsageSummaryMetadataMetrics. -const ( - UsageSummaryMetadataMetricsCloudEgressBytes UsageSummaryMetadataMetrics = "cloud_egress_bytes" - UsageSummaryMetadataMetricsCloudVcpuSeconds UsageSummaryMetadataMetrics = "cloud_vcpu_seconds" - UsageSummaryMetadataMetricsCloudVramByteSeconds UsageSummaryMetadataMetrics = "cloud_vram_byte_seconds" - UsageSummaryMetadataMetricsPaidRows UsageSummaryMetadataMetrics = "paid_rows" -) - // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -241,12 +239,6 @@ const ( ListPluginVersionsParamsSortByCreatedAt ListPluginVersionsParamsSortBy = "created_at" ) -// Defines values for EmailTeamInvitationJSONBodyRole. -const ( - EmailTeamInvitationJSONBodyRoleAdmin EmailTeamInvitationJSONBodyRole = "admin" - EmailTeamInvitationJSONBodyRoleMember EmailTeamInvitationJSONBodyRole = "member" -) - // Defines values for GetTeamUsageSummaryParamsMetrics. const ( GetTeamUsageSummaryParamsMetricsCloudVcpuSeconds GetTeamUsageSummaryParamsMetrics = "cloud_vcpu_seconds" @@ -315,6 +307,11 @@ type APIKeyName = string // APIKeyScope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins type APIKeyScope string +// AcceptTeamInvitationRequest defines model for AcceptTeamInvitation_request. +type AcceptTeamInvitationRequest struct { + Token openapi_types.UUID `json:"token"` +} + // Addon CloudQuery Addon type Addon struct { // AddonFormat Supported formats for addons @@ -550,6 +547,121 @@ type BasicError struct { Status int `json:"status"` } +// CreateAddonVersionRequest defines model for CreateAddonVersion_request. +type CreateAddonVersionRequest struct { + // AddonDeps addon dependencies in the format of ['team_name/type/addon_name@version'] + AddonDeps *[]string `json:"addon_deps,omitempty"` + + // Checksum SHA-256 checksum for the addon asset + Checksum string `json:"checksum"` + + // Doc Main README in MD format + Doc string `json:"doc"` + + // Message A message describing what's new or changed in this version. + // This message will be displayed to users in the addon's changelog. + // Supports limited markdown syntax. + Message string `json:"message"` + + // PluginDeps plugin dependencies in the format of ['team_name/kind/plugin_name@version'] + PluginDeps *[]string `json:"plugin_deps,omitempty"` +} + +// CreatePluginVersionDocs201Response defines model for CreatePluginVersionDocs_201_response. +type CreatePluginVersionDocs201Response struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` +} + +// CreatePluginVersionDocsRequest defines model for CreatePluginVersionDocs_request. +type CreatePluginVersionDocsRequest struct { + Pages []PluginDocsPageCreate `json:"pages"` +} + +// CreatePluginVersionTables201Response defines model for CreatePluginVersionTables_201_response. +type CreatePluginVersionTables201Response struct { + Names *[]PluginTableName `json:"names,omitempty"` +} + +// CreatePluginVersionTablesRequest defines model for CreatePluginVersionTables_request. +type CreatePluginVersionTablesRequest struct { + Tables []PluginTableCreate `json:"tables"` +} + +// CreatePluginVersionRequest defines model for CreatePluginVersion_request. +type CreatePluginVersionRequest struct { + // Checksums List of SHA-256 checksums for this plugin version, one for each supported target. + Checksums []string `json:"checksums"` + + // Message A message describing what's new or changed in this version. + // This message will be displayed to users in the plugin's changelog. + // Supports limited markdown syntax. + Message string `json:"message"` + + // PackageType The package type of the plugin assets + PackageType PluginPackageType `json:"package_type"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` + + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + + // SupportedTargets The targets supported by this plugin version, formatted as _ + SupportedTargets []string `json:"supported_targets"` +} + +// CreateSyncRunProgressRequest defines model for CreateSyncRunProgress_request. +type CreateSyncRunProgressRequest struct { + // Errors Number of errors encountered so far + Errors int64 `json:"errors"` + + // Rows Number of rows synced so far + Rows int64 `json:"rows"` + + // Status The status of the sync run + Status *SyncRunStatus `json:"status,omitempty"` + + // Warnings Number of warnings encountered so far + Warnings int64 `json:"warnings"` +} + +// CreateTeamAPIKeyRequest defines model for CreateTeamAPIKey_request. +type CreateTeamAPIKeyRequest struct { + ExpiresAt time.Time `json:"expires_at"` + + // Name Name of the API key + Name APIKeyName `json:"name"` +} + +// CreateTeamImages201Response defines model for CreateTeamImages_201_response. +type CreateTeamImages201Response struct { + Items []TeamImage `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// CreateTeamImagesRequest defines model for CreateTeamImages_request. +type CreateTeamImagesRequest struct { + Images []TeamImageCreate `json:"images"` +} + +// CreateTeamRequest defines model for CreateTeam_request. +type CreateTeamRequest struct { + DisplayName interface{} `json:"display_name"` + + // Name The unique name for the team. + Name TeamName `json:"name"` +} + +// DeletePluginVersionDocsRequest defines model for DeletePluginVersionDocs_request. +type DeletePluginVersionDocsRequest struct { + Names []PluginDocsPageName `json:"names"` +} + +// DeletePluginVersionTablesRequest defines model for DeletePluginVersionTables_request. +type DeletePluginVersionTablesRequest struct { + Names []PluginTableName `json:"names"` +} + // DockerError Error Returned from the Docker Authorization Handler to the Docker Registry type DockerError struct { Details string `json:"details"` @@ -558,6 +670,15 @@ type DockerError struct { // Email defines model for Email. type Email = openapi_types.Email +// EmailTeamInvitationRequest defines model for EmailTeamInvitation_request. +type EmailTeamInvitationRequest struct { + Email openapi_types.Email `json:"email"` + Role EmailTeamInvitationRequestRole `json:"role"` +} + +// EmailTeamInvitationRequestRole defines model for EmailTeamInvitationRequest.Role. +type EmailTeamInvitationRequestRole string + // FieldError defines model for FieldError. type FieldError struct { Errors *[]string `json:"errors,omitempty"` @@ -566,6 +687,18 @@ type FieldError struct { Status int `json:"status"` } +// GetCurrentUserMemberships200Response defines model for GetCurrentUserMemberships_200_response. +type GetCurrentUserMemberships200Response struct { + Items []MembershipWithTeam `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// GetTeamMemberships200Response defines model for GetTeamMemberships_200_response. +type GetTeamMemberships200Response struct { + Items []MembershipWithUser `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + // ImageURL defines model for ImageURL. type ImageURL struct { DownloadUrl string `json:"download_url"` @@ -651,12 +784,54 @@ type ListAddon struct { UpdatedAt time.Time `json:"updated_at"` } +// ListAddonOrdersByTeam200Response defines model for ListAddonOrdersByTeam_200_response. +type ListAddonOrdersByTeam200Response struct { + Items []AddonOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListAddonVersions200Response defines model for ListAddonVersions_200_response. +type ListAddonVersions200Response struct { + Items []AddonVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListAddonsByTeam200Response defines model for ListAddonsByTeam_200_response. +type ListAddonsByTeam200Response struct { + Items []Addon `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListAddons200Response defines model for ListAddons_200_response. +type ListAddons200Response struct { + Items []ListAddon `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListCurrentUserInvitations200Response defines model for ListCurrentUserInvitations_200_response. +type ListCurrentUserInvitations200Response struct { + Items []InvitationWithToken `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListInvoicesByTeam200Response defines model for ListInvoicesByTeam_200_response. +type ListInvoicesByTeam200Response struct { + Items []Invoice `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + // ListMetadata defines model for ListMetadata. type ListMetadata struct { LastPage *int `json:"last_page,omitempty"` TotalCount *int `json:"total_count,omitempty"` } +// ListMonthlyLimitsByTeam200Response defines model for ListMonthlyLimitsByTeam_200_response. +type ListMonthlyLimitsByTeam200Response struct { + Items []MonthlyLimit `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + // ListPlugin defines model for ListPlugin. type ListPlugin struct { // Category Supported categories for plugins @@ -719,6 +894,108 @@ type ListPlugin struct { USDPerRow string `json:"usd_per_row"` } +// ListPluginNotificationRequests200Response defines model for ListPluginNotificationRequests_200_response. +type ListPluginNotificationRequests200Response struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListPluginUpcomingPriceChanges200Response defines model for ListPluginUpcomingPriceChanges_200_response. +type ListPluginUpcomingPriceChanges200Response struct { + Items []PluginPrice `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListPluginVersionDocs200Response defines model for ListPluginVersionDocs_200_response. +type ListPluginVersionDocs200Response struct { + Items []PluginDocsPage `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListPluginVersionTables200Response defines model for ListPluginVersionTables_200_response. +type ListPluginVersionTables200Response struct { + Items []PluginTable `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListPluginVersions200Response defines model for ListPluginVersions_200_response. +type ListPluginVersions200Response struct { + Items []PluginVersionList `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListPluginsByTeam200Response defines model for ListPluginsByTeam_200_response. +type ListPluginsByTeam200Response struct { + Items []Plugin `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListPlugins200Response defines model for ListPlugins_200_response. +type ListPlugins200Response struct { + Items []ListPlugin `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListSubscriptionOrdersByTeam200Response defines model for ListSubscriptionOrdersByTeam_200_response. +type ListSubscriptionOrdersByTeam200Response struct { + Items []TeamSubscriptionOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListSyncDestinations200Response defines model for ListSyncDestinations_200_response. +type ListSyncDestinations200Response struct { + Items []SyncDestination `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListSyncRuns200Response defines model for ListSyncRuns_200_response. +type ListSyncRuns200Response struct { + Items []SyncRun `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListSyncSources200Response defines model for ListSyncSources_200_response. +type ListSyncSources200Response struct { + Items []SyncSource `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListSyncs200Response defines model for ListSyncs_200_response. +type ListSyncs200Response struct { + Items []Sync `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListTeamAPIKeys200Response defines model for ListTeamAPIKeys_200_response. +type ListTeamAPIKeys200Response struct { + Items []APIKey `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListTeamInvitations200Response defines model for ListTeamInvitations_200_response. +type ListTeamInvitations200Response struct { + Items []Invitation `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListTeamPluginUsage200Response defines model for ListTeamPluginUsage_200_response. +type ListTeamPluginUsage200Response struct { + Items []UsageCurrent `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListTeams200Response defines model for ListTeams_200_response. +type ListTeams200Response struct { + Items []Team `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// ListUsersByTeam200Response defines model for ListUsersByTeam_200_response. +type ListUsersByTeam200Response struct { + Items []User `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + // MembershipWithTeam defines model for MembershipWithTeam. type MembershipWithTeam struct { Role string `json:"role"` @@ -1314,13 +1591,6 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } -// PriceCategorySpend Spend by price category for a defined period. -type PriceCategorySpend struct { - // Category Supported price categories for billing - Category PluginPriceCategory `json:"category"` - Total string `json:"total"` -} - // RegistryAuthToken JWT token for the image registry type RegistryAuthToken struct { AccessToken string `json:"access_token"` @@ -1336,25 +1606,14 @@ type ReleaseURL struct { // Note that empty or all-zero values are not included in the response. type SpendSummary struct { // Metadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. - Metadata struct { - // End The exclusive end of the query time range. - End time.Time `json:"end"` - - // Start The inclusive start of the query time range. - Start time.Time `json:"start"` - } `json:"metadata"` - Values []SpendSummaryValue `json:"values"` + Metadata SpendSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` } -// SpendSummaryValue A spend summary value. -type SpendSummaryValue struct { - ByCategory []PriceCategorySpend `json:"by_category"` - - // Date The timestamp for the spend summary. - Date time.Time `json:"date"` - - // Total Total spend for the period in USD. - Total string `json:"total"` +// SpendSummaryMetadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. +type SpendSummaryMetadata struct { + End interface{} `json:"end"` + Start interface{} `json:"start"` } // SpendingLimit A configurable spending limit for the team. Empty values indicate no limit. @@ -1443,17 +1702,17 @@ type SyncDestination struct { Env []SyncEnv `json:"env"` // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource SyncLastUpdateSource `json:"last_update_source"` + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` // MigrateMode Migrate mode for the destination - MigrateMode SyncDestinationMigrateMode `json:"migrate_mode"` + MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - Spec map[string]interface{} `json:"spec"` + Path SyncPluginPath `json:"path"` + Spec *map[string]interface{} `json:"spec,omitempty"` // UpdatedAt Time when the source was last updated UpdatedAt time.Time `json:"updated_at"` @@ -1462,7 +1721,7 @@ type SyncDestination struct { Version string `json:"version"` // WriteMode Write mode for the destination - WriteMode SyncDestinationWriteMode `json:"write_mode"` + WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } // SyncDestinationCreate Sync Destination Definition @@ -1626,7 +1885,7 @@ type SyncSource struct { Env []SyncEnv `json:"env"` // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource SyncLastUpdateSource `json:"last_update_source"` + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` @@ -1635,8 +1894,8 @@ type SyncSource struct { Path SyncPluginPath `json:"path"` // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables []string `json:"skip_tables"` - Spec map[string]interface{} `json:"spec"` + SkipTables *[]string `json:"skip_tables,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. Tables []string `json:"tables"` @@ -1738,6 +1997,11 @@ type SyncUpdate struct { Source *string `json:"source,omitempty"` } +// SyncRunLogs defines model for Sync_Run_Logs. +type SyncRunLogs struct { + Location interface{} `json:"location"` +} + // Team CloudQuery Team type Team struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -1823,6 +2087,31 @@ type TeamSubscriptionOrderID = openapi_types.UUID // TeamSubscriptionOrderStatus defines model for TeamSubscriptionOrderStatus. type TeamSubscriptionOrderStatus string +// UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. +type UpdateCurrentUserRequest struct { + Name *interface{} `json:"name,omitempty"` +} + +// UpdateSyncRunRequest defines model for UpdateSyncRun_request. +type UpdateSyncRunRequest struct { + // Status The status of the sync run + Status *SyncRunStatus `json:"status,omitempty"` + + // StatusReason The reason for the status + StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` +} + +// UpdateSyncTestConnectionRequest defines model for UpdateSyncTestConnection_request. +type UpdateSyncTestConnectionRequest struct { + // Status The status of the sync run + Status SyncTestConnectionStatus `json:"status"` +} + +// UpdateTeamRequest defines model for UpdateTeam_request. +type UpdateTeamRequest struct { + DisplayName *interface{} `json:"display_name,omitempty"` +} + // UsageCurrent The usage of a plugin within the current calendar month. type UsageCurrent struct { // PluginKind The kind of plugin, ie. source or destination. @@ -1865,72 +2154,41 @@ type UsageIncrease struct { RequestId openapi_types.UUID `json:"request_id"` // Rows The total number of additional rows used by the plugin. - Rows int `json:"rows"` - Tables *[]struct { - // Name The name of the table. - Name string `json:"name"` + Rows int `json:"rows"` + Tables *[]UsageIncreaseTablesInner `json:"tables,omitempty"` +} - // Rows The additional rows used by the table. - Rows int `json:"rows"` - } `json:"tables,omitempty"` +// UsageIncreaseTablesInner defines model for UsageIncrease_tables_inner. +type UsageIncreaseTablesInner struct { + // Name The name of the table. + Name string `json:"name"` + + // Rows The additional rows used by the table. + Rows int `json:"rows"` } // UsageSummary A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range. // Note that empty or all-zero values are not included in the response. type UsageSummary struct { - // Groups The groups of the usage summary. Every group will have a corresponding value at the same index in the values array. - Groups []UsageSummaryGroup `json:"groups"` + Groups interface{} `json:"groups"` // Metadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. - Metadata struct { - // AggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. - AggregationPeriod UsageSummaryMetadataAggregationPeriod `json:"aggregation_period"` - - // End The exclusive end of the query time range. - End time.Time `json:"end"` - - // Metrics List of metrics included in the response. - Metrics []UsageSummaryMetadataMetrics `json:"metrics"` + Metadata UsageSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` +} - // Start The inclusive start of the query time range. - Start time.Time `json:"start"` - } `json:"metadata"` - Values []UsageSummaryValue `json:"values"` +// UsageSummaryMetadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. +type UsageSummaryMetadata struct { + // AggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. + AggregationPeriod UsageSummaryMetadataAggregationPeriod `json:"aggregation_period"` + End interface{} `json:"end"` + Metrics interface{} `json:"metrics"` + Start interface{} `json:"start"` } // UsageSummaryMetadataAggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. type UsageSummaryMetadataAggregationPeriod string -// UsageSummaryMetadataMetrics defines model for UsageSummary.Metadata.Metrics. -type UsageSummaryMetadataMetrics string - -// UsageSummaryGroup A usage summary group. -type UsageSummaryGroup struct { - // Name The name of the group. - Name string `json:"name"` - - // Value The value of the group at this index. - Value string `json:"value"` -} - -// UsageSummaryValue A usage summary value. -type UsageSummaryValue struct { - // CloudEgressBytes Egress bytes consumed in this period, one per group. - CloudEgressBytes *[]int64 `json:"cloud_egress_bytes,omitempty"` - - // CloudVcpuSeconds vCPU/seconds consumed in this period, one per group. - CloudVcpuSeconds *[]int64 `json:"cloud_vcpu_seconds,omitempty"` - - // CloudVramByteSeconds vRAM/byte-seconds consumed in this period, one per group. - CloudVramByteSeconds *[]int64 `json:"cloud_vram_byte_seconds,omitempty"` - - // PaidRows The paid rows that were synced in this period, one per group. - PaidRows *[]int64 `json:"paid_rows,omitempty"` - - // Timestamp The timestamp marking the start of a period. - Timestamp time.Time `json:"timestamp"` -} - // User CloudQuery User type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -2061,26 +2319,6 @@ type ListAddonVersionsParams struct { // ListAddonVersionsParamsSortBy defines parameters for ListAddonVersions. type ListAddonVersionsParamsSortBy string -// CreateAddonVersionJSONBody defines parameters for CreateAddonVersion. -type CreateAddonVersionJSONBody struct { - // AddonDeps addon dependencies in the format of ['team_name/type/addon_name@version'] - AddonDeps *[]string `json:"addon_deps,omitempty"` - - // Checksum SHA-256 checksum for the addon asset - Checksum string `json:"checksum"` - - // Doc Main README in MD format - Doc string `json:"doc"` - - // Message A message describing what's new or changed in this version. - // This message will be displayed to users in the addon's changelog. - // Supports limited markdown syntax. - Message string `json:"message"` - - // PluginDeps plugin dependencies in the format of ['team_name/kind/plugin_name@version'] - PluginDeps *[]string `json:"plugin_deps,omitempty"` -} - // DownloadAddonAssetParams defines parameters for DownloadAddonAsset. type DownloadAddonAssetParams struct { Accept *string `json:"Accept,omitempty"` @@ -2131,39 +2369,11 @@ type ListPluginVersionsParams struct { // ListPluginVersionsParamsSortBy defines parameters for ListPluginVersions. type ListPluginVersionsParamsSortBy string -// CreatePluginVersionJSONBody defines parameters for CreatePluginVersion. -type CreatePluginVersionJSONBody struct { - // Checksums List of SHA-256 checksums for this plugin version, one for each supported target. - Checksums []string `json:"checksums"` - - // Message A message describing what's new or changed in this version. - // This message will be displayed to users in the plugin's changelog. - // Supports limited markdown syntax. - Message string `json:"message"` - - // PackageType The package type of the plugin assets - PackageType PluginPackageType `json:"package_type"` - - // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). - Protocols PluginProtocols `json:"protocols"` - - // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. - SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` - - // SupportedTargets The targets supported by this plugin version, formatted as _ - SupportedTargets []string `json:"supported_targets"` -} - // DownloadPluginAssetParams defines parameters for DownloadPluginAsset. type DownloadPluginAssetParams struct { Accept *string `json:"Accept,omitempty"` } -// DeletePluginVersionDocsJSONBody defines parameters for DeletePluginVersionDocs. -type DeletePluginVersionDocsJSONBody struct { - Names []PluginDocsPageName `json:"names"` -} - // ListPluginVersionDocsParams defines parameters for ListPluginVersionDocs. type ListPluginVersionDocsParams struct { // Page Page number of the results to fetch @@ -2173,21 +2383,6 @@ type ListPluginVersionDocsParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } -// ReplacePluginVersionDocsJSONBody defines parameters for ReplacePluginVersionDocs. -type ReplacePluginVersionDocsJSONBody struct { - Pages []PluginDocsPageCreate `json:"pages"` -} - -// CreatePluginVersionDocsJSONBody defines parameters for CreatePluginVersionDocs. -type CreatePluginVersionDocsJSONBody struct { - Pages []PluginDocsPageCreate `json:"pages"` -} - -// DeletePluginVersionTablesJSONBody defines parameters for DeletePluginVersionTables. -type DeletePluginVersionTablesJSONBody struct { - Names []PluginTableName `json:"names"` -} - // ListPluginVersionTablesParams defines parameters for ListPluginVersionTables. type ListPluginVersionTablesParams struct { // Page Page number of the results to fetch @@ -2197,11 +2392,6 @@ type ListPluginVersionTablesParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } -// CreatePluginVersionTablesJSONBody defines parameters for CreatePluginVersionTables. -type CreatePluginVersionTablesJSONBody struct { - Tables []PluginTableCreate `json:"tables"` -} - // AuthRegistryRequestParams defines parameters for AuthRegistryRequest. type AuthRegistryRequestParams struct { // Account Username used for `docker login` @@ -2229,21 +2419,6 @@ type ListTeamsParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// CreateTeamJSONBody defines parameters for CreateTeam. -type CreateTeamJSONBody struct { - // DisplayName The team's display name - DisplayName string `json:"display_name"` - - // Name The unique name for the team. - Name TeamName `json:"name"` -} - -// UpdateTeamJSONBody defines parameters for UpdateTeam. -type UpdateTeamJSONBody struct { - // DisplayName The team's display name - DisplayName *string `json:"display_name,omitempty"` -} - // ListAddonOrdersByTeamParams defines parameters for ListAddonOrdersByTeam. type ListAddonOrdersByTeamParams struct { // Page Page number of the results to fetch @@ -2279,19 +2454,6 @@ type ListTeamAPIKeysParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// CreateTeamAPIKeyJSONBody defines parameters for CreateTeamAPIKey. -type CreateTeamAPIKeyJSONBody struct { - ExpiresAt time.Time `json:"expires_at"` - - // Name Name of the API key - Name APIKeyName `json:"name"` -} - -// CreateTeamImagesJSONBody defines parameters for CreateTeamImages. -type CreateTeamImagesJSONBody struct { - Images []TeamImageCreate `json:"images"` -} - // ListTeamInvitationsParams defines parameters for ListTeamInvitations. type ListTeamInvitationsParams struct { // Page Page number of the results to fetch @@ -2301,20 +2463,6 @@ type ListTeamInvitationsParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } -// EmailTeamInvitationJSONBody defines parameters for EmailTeamInvitation. -type EmailTeamInvitationJSONBody struct { - Email openapi_types.Email `json:"email"` - Role EmailTeamInvitationJSONBodyRole `json:"role"` -} - -// EmailTeamInvitationJSONBodyRole defines parameters for EmailTeamInvitation. -type EmailTeamInvitationJSONBodyRole string - -// AcceptTeamInvitationJSONBody defines parameters for AcceptTeamInvitation. -type AcceptTeamInvitationJSONBody struct { - Token openapi_types.UUID `json:"token"` -} - // ListInvoicesByTeamParams defines parameters for ListInvoicesByTeam. type ListInvoicesByTeamParams struct { // Page Page number of the results to fetch @@ -2404,12 +2552,6 @@ type ListSyncsParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// UpdateSyncTestConnectionJSONBody defines parameters for UpdateSyncTestConnection. -type UpdateSyncTestConnectionJSONBody struct { - // Status The status of the sync run - Status SyncTestConnectionStatus `json:"status"` -} - // ListSyncRunsParams defines parameters for ListSyncRuns. type ListSyncRunsParams struct { // PerPage The number of results per page (max 1000). @@ -2419,35 +2561,11 @@ type ListSyncRunsParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// UpdateSyncRunJSONBody defines parameters for UpdateSyncRun. -type UpdateSyncRunJSONBody struct { - // Status The status of the sync run - Status *SyncRunStatus `json:"status,omitempty"` - - // StatusReason The reason for the status - StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` -} - // GetSyncRunLogsParams defines parameters for GetSyncRunLogs. type GetSyncRunLogsParams struct { Accept *string `json:"Accept,omitempty"` } -// CreateSyncRunProgressJSONBody defines parameters for CreateSyncRunProgress. -type CreateSyncRunProgressJSONBody struct { - // Errors Number of errors encountered so far - Errors int64 `json:"errors"` - - // Rows Number of rows synced so far - Rows int64 `json:"rows"` - - // Status The status of the sync run - Status *SyncRunStatus `json:"status,omitempty"` - - // Warnings Number of warnings encountered so far - Warnings int64 `json:"warnings"` -} - // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. type ListTeamPluginUsageParams struct { // Page Page number of the results to fetch @@ -2501,12 +2619,6 @@ type ListUsersByTeamParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// UpdateCurrentUserJSONBody defines parameters for UpdateCurrentUser. -type UpdateCurrentUserJSONBody struct { - // Name The user's name - Name *string `json:"name,omitempty"` -} - // ListCurrentUserInvitationsParams defines parameters for ListCurrentUserInvitations. type ListCurrentUserInvitationsParams struct { // Page Page number of the results to fetch @@ -2535,7 +2647,7 @@ type UpdateAddonJSONRequestBody = AddonUpdate type UpdateAddonVersionJSONRequestBody = AddonVersionUpdate // CreateAddonVersionJSONRequestBody defines body for CreateAddonVersion for application/json ContentType. -type CreateAddonVersionJSONRequestBody CreateAddonVersionJSONBody +type CreateAddonVersionJSONRequestBody = CreateAddonVersionRequest // CreatePluginNotificationRequestJSONRequestBody defines body for CreatePluginNotificationRequest for application/json ContentType. type CreatePluginNotificationRequestJSONRequestBody = PluginNotificationRequestCreate @@ -2553,43 +2665,43 @@ type CreatePluginUpcomingPriceChangeJSONRequestBody = PluginPriceCreate type UpdatePluginVersionJSONRequestBody = PluginVersionUpdate // CreatePluginVersionJSONRequestBody defines body for CreatePluginVersion for application/json ContentType. -type CreatePluginVersionJSONRequestBody CreatePluginVersionJSONBody +type CreatePluginVersionJSONRequestBody = CreatePluginVersionRequest // DeletePluginVersionDocsJSONRequestBody defines body for DeletePluginVersionDocs for application/json ContentType. -type DeletePluginVersionDocsJSONRequestBody DeletePluginVersionDocsJSONBody +type DeletePluginVersionDocsJSONRequestBody = DeletePluginVersionDocsRequest // ReplacePluginVersionDocsJSONRequestBody defines body for ReplacePluginVersionDocs for application/json ContentType. -type ReplacePluginVersionDocsJSONRequestBody ReplacePluginVersionDocsJSONBody +type ReplacePluginVersionDocsJSONRequestBody = CreatePluginVersionDocsRequest // CreatePluginVersionDocsJSONRequestBody defines body for CreatePluginVersionDocs for application/json ContentType. -type CreatePluginVersionDocsJSONRequestBody CreatePluginVersionDocsJSONBody +type CreatePluginVersionDocsJSONRequestBody = CreatePluginVersionDocsRequest // DeletePluginVersionTablesJSONRequestBody defines body for DeletePluginVersionTables for application/json ContentType. -type DeletePluginVersionTablesJSONRequestBody DeletePluginVersionTablesJSONBody +type DeletePluginVersionTablesJSONRequestBody = DeletePluginVersionTablesRequest // CreatePluginVersionTablesJSONRequestBody defines body for CreatePluginVersionTables for application/json ContentType. -type CreatePluginVersionTablesJSONRequestBody CreatePluginVersionTablesJSONBody +type CreatePluginVersionTablesJSONRequestBody = CreatePluginVersionTablesRequest // CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType. -type CreateTeamJSONRequestBody CreateTeamJSONBody +type CreateTeamJSONRequestBody = CreateTeamRequest // UpdateTeamJSONRequestBody defines body for UpdateTeam for application/json ContentType. -type UpdateTeamJSONRequestBody UpdateTeamJSONBody +type UpdateTeamJSONRequestBody = UpdateTeamRequest // CreateAddonOrderForTeamJSONRequestBody defines body for CreateAddonOrderForTeam for application/json ContentType. type CreateAddonOrderForTeamJSONRequestBody = AddonOrderCreate // CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. -type CreateTeamAPIKeyJSONRequestBody CreateTeamAPIKeyJSONBody +type CreateTeamAPIKeyJSONRequestBody = CreateTeamAPIKeyRequest // CreateTeamImagesJSONRequestBody defines body for CreateTeamImages for application/json ContentType. -type CreateTeamImagesJSONRequestBody CreateTeamImagesJSONBody +type CreateTeamImagesJSONRequestBody = CreateTeamImagesRequest // EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. -type EmailTeamInvitationJSONRequestBody EmailTeamInvitationJSONBody +type EmailTeamInvitationJSONRequestBody = EmailTeamInvitationRequest // AcceptTeamInvitationJSONRequestBody defines body for AcceptTeamInvitation for application/json ContentType. -type AcceptTeamInvitationJSONRequestBody AcceptTeamInvitationJSONBody +type AcceptTeamInvitationJSONRequestBody = AcceptTeamInvitationRequest // CreateMonthlyLimitJSONRequestBody defines body for CreateMonthlyLimit for application/json ContentType. type CreateMonthlyLimitJSONRequestBody = MonthlyLimitCreate @@ -2628,19 +2740,19 @@ type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate type CreateSyncJSONRequestBody = SyncCreate // UpdateSyncTestConnectionJSONRequestBody defines body for UpdateSyncTestConnection for application/json ContentType. -type UpdateSyncTestConnectionJSONRequestBody UpdateSyncTestConnectionJSONBody +type UpdateSyncTestConnectionJSONRequestBody = UpdateSyncTestConnectionRequest // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. type UpdateSyncJSONRequestBody = SyncUpdate // UpdateSyncRunJSONRequestBody defines body for UpdateSyncRun for application/json ContentType. -type UpdateSyncRunJSONRequestBody UpdateSyncRunJSONBody +type UpdateSyncRunJSONRequestBody = UpdateSyncRunRequest // CreateSyncRunProgressJSONRequestBody defines body for CreateSyncRunProgress for application/json ContentType. -type CreateSyncRunProgressJSONRequestBody CreateSyncRunProgressJSONBody +type CreateSyncRunProgressJSONRequestBody = CreateSyncRunProgressRequest // IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. -type UpdateCurrentUserJSONRequestBody UpdateCurrentUserJSONBody +type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest diff --git a/spec.json b/spec.json index 699b77c..e169026 100644 --- a/spec.json +++ b/spec.json @@ -1,9822 +1,8556 @@ { - "openapi": "3.1.0", - "info": { - "contact": { - "email": "support@cloudquery.io", - "name": "CloudQuery Support Team", - "url": "https://cloudquery.io" + "openapi" : "3.1.0", + "info" : { + "contact" : { + "email" : "support@cloudquery.io", + "name" : "CloudQuery Support Team", + "url" : "https://cloudquery.io" }, - "description": "Welcome to the CloudQuery API documentation! This API can be used to interact with the CloudQuery platform. The API allows you to manage your teams, usage, spend limits, plugins, addons, cloud syncs, and much more.\n\nThe API is secured using bearer tokens. To get started, you can generate an API key from the CloudQuery dashboard. For a step-by-step guide, see: https://docs.cloudquery.io/docs/deployment/generate-api-key.\n\nThe base URL for the API is `https://api.cloudquery.io`.\n", - "license": { - "name": "MIT", - "url": "https://spdx.org/licenses/MIT" + "description" : "Welcome to the CloudQuery API documentation! This API can be used to interact with the CloudQuery platform. The API allows you to manage your teams, usage, spend limits, plugins, addons, cloud syncs, and much more.\n\nThe API is secured using bearer tokens. To get started, you can generate an API key from the CloudQuery dashboard. For a step-by-step guide, see: https://docs.cloudquery.io/docs/deployment/generate-api-key.\n\nThe base URL for the API is `https://api.cloudquery.io`.\n", + "license" : { + "name" : "MIT", + "url" : "https://spdx.org/licenses/MIT" }, - "termsOfService": "https://www.cloudquery.io/terms", - "title": "CloudQuery OpenAPI Spec", - "version": "1.0.0" + "termsOfService" : "https://www.cloudquery.io/terms", + "title" : "CloudQuery OpenAPI Spec", + "version" : "1.0.0" }, - "servers": [ - { - "url": "https://api.cloudquery.io" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "tags": [ - { - "name": "users" - }, - { - "name": "teams" - }, - { - "name": "plugins" - }, - { - "name": "images" - }, - { - "name": "healthcheck" - }, - { - "name": "addons" - }, - { - "name": "registry" - }, - { - "name": "syncs" - } - ], - "paths": { - "/": { - "get": { - "description": "Health check endpoint, returns 200", - "operationId": "HealthCheck", - "responses": { - "200": { - "description": "Response" - } - }, - "security": [], - "tags": [ - "healthcheck" - ] + "servers" : [ { + "url" : "https://api.cloudquery.io" + } ], + "security" : [ { + "bearerAuth" : [ ] + } ], + "tags" : [ { + "name" : "users" + }, { + "name" : "teams" + }, { + "name" : "plugins" + }, { + "name" : "images" + }, { + "name" : "healthcheck" + }, { + "name" : "addons" + }, { + "name" : "registry" + }, { + "name" : "syncs" + } ], + "paths" : { + "/" : { + "get" : { + "description" : "Health check endpoint, returns 200", + "operationId" : "HealthCheck", + "responses" : { + "200" : { + "description" : "Response" + } + }, + "security" : [ ], + "tags" : [ "healthcheck" ] } }, - "/upload/image": { - "post": { - "description": "Get a URL to upload image that will be publicly accessible", - "operationId": "UploadImage", - "parameters": [], - "tags": [ - "images" - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageURL" + "/upload/image" : { + "post" : { + "description" : "Get a URL to upload image that will be publicly accessible", + "operationId" : "UploadImage", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageURL" } } - } + }, + "description" : "Response" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "images" ] } }, - "/plugin-notification-requests": { - "get": { - "description": "List all plugin notification requests", - "operationId": "ListPluginNotificationRequests", - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginNotificationRequest" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugin-notification-requests" : { + "get" : { + "description" : "List all plugin notification requests", + "operationId" : "ListPluginNotificationRequests", + "parameters" : [ { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginNotificationRequests_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] }, - "post": { - "description": "Create a new plugin notification request.", - "operationId": "CreatePluginNotificationRequest", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginNotificationRequestCreate" + "post" : { + "description" : "Create a new plugin notification request.", + "operationId" : "CreatePluginNotificationRequest", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginNotificationRequestCreate" } } - } + }, + "required" : true }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginNotificationRequest" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginNotificationRequest" } } }, - "description": "Created" + "description" : "Created" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugin-notification-requests/{plugin_team}/{plugin_kind}/{plugin_name}": { - "get": { - "description": "Query plugin notification request for a given plugin.", - "operationId": "GetPluginNotificationRequest", - "parameters": [ - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginNotificationRequest" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugin-notification-requests/{plugin_team}/{plugin_kind}/{plugin_name}" : { + "delete" : { + "description" : "Remove plugin notification request for a given plugin.", + "operationId" : "DeletePluginNotificationRequest", + "parameters" : [ { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "get" : { + "description" : "Query plugin notification request for a given plugin.", + "operationId" : "GetPluginNotificationRequest", + "parameters" : [ { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginNotificationRequests_200_response" } } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "plugins" - ] - }, - "delete": { - "description": "Remove plugin notification request for a given plugin.", - "operationId": "DeletePluginNotificationRequest", - "parameters": [ - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "204": { - "description": "Response" + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins": { - "get": { - "description": "List all plugins", - "operationId": "ListPlugins", - "parameters": [ - { - "$ref": "#/components/parameters/plugin_sort_by" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ListPlugin" - }, - "type": "array", - "example": [ - { - "name": "aws", - "kind": "source", - "team_name": "cloudquery", - "display_name": "AWS Source Plugin", - "category": "cloud-infrastructure", - "created_at": "2017-07-14T16:53:42Z", - "updated_at": "2017-07-14T16:53:42Z", - "homepage": "https://cloudquery.io", - "logo": "https://images.cloudquery.io/logos/aws.png", - "official": true, - "short_description": "Sync data from AWS to any destination", - "repository": "https://github.com/cloudquery/cloudquery", - "tier": "paid", - "usd_per_row": "0.00123", - "free_rows_per_month": 10000, - "release_stage": "preview" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugins" : { + "get" : { + "description" : "List all plugins", + "operationId" : "ListPlugins", + "parameters" : [ { + "$ref" : "#/components/parameters/plugin_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPlugins_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] }, - "post": { - "description": "Create a plugin owned by the specified team. User must be part of that team.", - "operationId": "CreatePlugin", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginCreate" + "post" : { + "description" : "Create a plugin owned by the specified team. User must be part of that team.", + "operationId" : "CreatePlugin", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginCreate" } } - } + }, + "required" : true }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plugin" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Plugin" } } }, - "description": "Created" + "description" : "Created" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}": { - "get": { - "description": "Get details about a given plugin.", - "operationId": "GetPlugin", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListPlugin" + "/plugins/{team_name}/{plugin_kind}/{plugin_name}" : { + "delete" : { + "description" : "Delete plugin by team and plugin name", + "operationId" : "DeletePluginByTeamAndPluginName", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "get" : { + "description" : "Get details about a given plugin.", + "operationId" : "GetPlugin", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPlugin" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] }, - "patch": { - "description": "Update a plugin", - "operationId": "UpdatePlugin", - "tags": [ - "plugins" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginUpdate" + "patch" : { + "description" : "Update a plugin", + "operationId" : "UpdatePlugin", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginUpdate" } } } }, - "responses": { - "200": { - "description": "Updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plugin" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Plugin" } } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - }, - "delete": { - "description": "Delete plugin by team and plugin name", - "operationId": "DeletePluginByTeamAndPluginName", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "204": { - "description": "Response" + }, + "description" : "Updated" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "404": { - "$ref": "#/components/responses/NotFound" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}/upcoming-price-changes": { - "get": { - "deprecated": true, - "description": "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", - "operationId": "ListPluginUpcomingPriceChanges", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PluginPrice" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/upcoming-price-changes" : { + "delete" : { + "deprecated" : true, + "description" : "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", + "operationId" : "DeletePluginUpcomingPriceChanges", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "get" : { + "deprecated" : true, + "description" : "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", + "operationId" : "ListPluginUpcomingPriceChanges", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginUpcomingPriceChanges_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] }, - "post": { - "deprecated": true, - "description": "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", - "operationId": "CreatePluginUpcomingPriceChange", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginPriceCreate" + "post" : { + "deprecated" : true, + "description" : "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", + "operationId" : "CreatePluginUpcomingPriceChange", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginPriceCreate" } } } }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginPrice" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginPrice" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] - }, - "delete": { - "deprecated": true, - "description": "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", - "operationId": "DeletePluginUpcomingPriceChanges", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "204": { - "description": "Deleted" + "tags" : [ "plugins" ] + } + }, + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions" : { + "get" : { + "description" : "List all versions for a given plugin", + "operationId" : "ListPluginVersions", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_drafts" + }, { + "$ref" : "#/components/parameters/include_prereleases" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginVersions_200_response" + } + } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions": { - "get": { - "description": "List all versions for a given plugin", - "operationId": "ListPluginVersions", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_sort_by" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include_drafts" - }, - { - "$ref": "#/components/parameters/include_prereleases" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PluginVersionList" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}" : { + "get" : { + "description" : "Get details about a given plugin version.", + "operationId" : "GetPluginVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersionDetails" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] - } - }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}": { - "get": { - "description": "Get details about a given plugin version.", - "operationId": "GetPluginVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersionDetails" - } - } - }, - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - }, - "put": { - "description": "Create a new plugin version, or update a draft version", - "operationId": "CreatePluginVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message", - "protocols", - "supported_targets", - "package_type", - "checksums" - ], - "properties": { - "message": { - "type": "string", - "minLength": 1, - "maxLength": 30000, - "description": "A message describing what's new or changed in this version.\nThis message will be displayed to users in the plugin's changelog.\nSupports limited markdown syntax.\n" - }, - "protocols": { - "$ref": "#/components/schemas/PluginProtocols" - }, - "supported_targets": { - "type": "array", - "description": "The targets supported by this plugin version, formatted as _", - "example": [ - "linux_arm64", - "darwin_amd64", - "windows_amd64" - ], - "items": { - "type": "string" - } - }, - "checksums": { - "type": "array", - "description": "List of SHA-256 checksums for this plugin version, one for each supported target.", - "items": { - "type": "string" - } - }, - "package_type": { - "$ref": "#/components/schemas/PluginPackageType" - }, - "spec_json_schema": { - "$ref": "#/components/schemas/PluginSpecJSONSchema" - } - } + "security" : [ ], + "tags" : [ "plugins" ] + }, + "patch" : { + "description" : "Update a given plugin version", + "operationId" : "UpdatePluginVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersionUpdate" } } } }, - "responses": { - "200": { - "description": "Success (the plugin version was updated)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersion" - } - } - } - }, - "201": { - "description": "Success (the plugin version was created)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersion" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersion" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] }, - "patch": { - "description": "Update a given plugin version", - "operationId": "UpdatePluginVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersionUpdate" + "put" : { + "description" : "Create a new plugin version, or update a draft version", + "operationId" : "CreatePluginVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersion_request" } } } }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersion" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersion" } } - } + }, + "description" : "Success (the plugin version was updated)" + }, + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersion" + } + } + }, + "description" : "Success (the plugin version was created)" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/docs": { - "get": { - "description": "List all documentation pages for a given plugin version", - "operationId": "ListPluginVersionDocs", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PluginDocsPage" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/docs" : { + "delete" : { + "description" : "Delete one or more plugin version docs pages.", + "operationId" : "DeletePluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeletePluginVersionDocs_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "The resource was deleted successfully." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "get" : { + "description" : "List all documentation pages for a given plugin version", + "operationId" : "ListPluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginVersionDocs_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] }, - "put": { - "description": "Create or update one or more plugin version docs pages", - "operationId": "CreatePluginVersionDocs", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "pages" - ], - "properties": { - "pages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginDocsPageCreate" - } - } - } + "post" : { + "description" : "Replace (override) multiple plugin version docs pages", + "operationId" : "ReplacePluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_request" } } } }, - "responses": { - "201": { - "description": "Successfully created or updated", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginDocsPageName" - } - } - } + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_201_response" } } - } + }, + "description" : "Successfully created or updated" }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "plugins" - ] - }, - "post": { - "description": "Replace (override) multiple plugin version docs pages", - "operationId": "ReplacePluginVersionDocs", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "pages" - ], - "properties": { - "pages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginDocsPageCreate" - } - } - } - } - } + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "responses": { - "201": { - "description": "Successfully created or updated", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginDocsPageName" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "plugins" - ] - }, - "delete": { - "description": "Delete one or more plugin version docs pages.", - "operationId": "DeletePluginVersionDocs", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "names" - ], - "properties": { - "names": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginDocsPageName" - } - } - } + "tags" : [ "plugins" ] + }, + "put" : { + "description" : "Create or update one or more plugin version docs pages", + "operationId" : "CreatePluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_request" } } } }, - "responses": { - "204": { - "description": "The resource was deleted successfully." + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_201_response" + } + } + }, + "description" : "Successfully created or updated" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables": { - "get": { - "description": "List tables for a given plugin version. This only applies to source plugins.", - "operationId": "ListPluginVersionTables", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PluginTable" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables" : { + "delete" : { + "description" : "Delete one or more plugin version tables.", + "operationId" : "DeletePluginVersionTables", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeletePluginVersionTables_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "The resource was deleted successfully." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "get" : { + "description" : "List tables for a given plugin version. This only applies to source plugins.", + "operationId" : "ListPluginVersionTables", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginVersionTables_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] }, - "put": { - "description": "Create or update one or more plugin version tables. This only applies to source plugins, and can only be done if the plugin version is in draft.", - "operationId": "CreatePluginVersionTables", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "tables" - ], - "properties": { - "tables": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginTableCreate" - } - } - } + "put" : { + "description" : "Create or update one or more plugin version tables. This only applies to source plugins, and can only be done if the plugin version is in draft.", + "operationId" : "CreatePluginVersionTables", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionTables_request" } } } }, - "responses": { - "201": { - "description": "Successfully created or updated", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginTableName" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "plugins" - ] - }, - "delete": { - "description": "Delete one or more plugin version tables.", - "operationId": "DeletePluginVersionTables", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "names" - ], - "properties": { - "names": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginTableName" - } - } + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionTables_201_response" } } - } - } - }, - "responses": { - "204": { - "description": "The resource was deleted successfully." + }, + "description" : "Successfully created or updated" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables/{table_name}": { - "get": { - "description": "Get schema for a given table and plugin version. This only applies to source plugins.", - "operationId": "GetPluginVersionTable", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - }, - { - "in": "path", - "name": "table_name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginTableDetails" + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables/{table_name}" : { + "get" : { + "description" : "Get schema for a given table and plugin version. This only applies to source plugins.", + "operationId" : "GetPluginVersionTable", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "explode" : false, + "in" : "path", + "name" : "table_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginTableDetails" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { - "get": { - "description": "Download an asset for a given plugin version and target", - "operationId": "DownloadPluginAsset", - "parameters": [ - { - "in": "header", - "name": "Accept", - "required": false, - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - }, - { - "$ref": "#/components/parameters/target_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginAsset" + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}" : { + "get" : { + "description" : "Download an asset for a given plugin version and target", + "operationId" : "DownloadPluginAsset", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/target_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginAsset" } } - } - }, - "302": { - "description": "Response", - "headers": { - "Location": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - }, - "post": { - "description": "Get a URL to upload an asset for a given plugin version and target", - "operationId": "UploadPluginAsset", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - }, - { - "$ref": "#/components/parameters/target_name" - } - ], - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReleaseURL" + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } + } + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "plugins" ] + }, + "post" : { + "description" : "Get a URL to upload an asset for a given plugin version and target", + "operationId" : "UploadPluginAsset", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/target_name" + } ], + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReleaseURL" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/addons": { - "get": { - "description": "List all addons", - "operationId": "ListAddons", - "parameters": [ - { - "$ref": "#/components/parameters/addon_sort_by" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ListAddon" - }, - "type": "array", - "example": [ - { - "name": "aws-policies", - "team_name": "cloudquery", - "display_name": "AWS Policies", - "category": "cloud-infrastructure", - "created_at": "2017-07-14T16:53:42Z", - "updated_at": "2017-07-14T16:53:42Z", - "homepage": "https://cloudquery.io", - "logo": "https://images.cloudquery.io/logos/aws.png", - "official": true, - "short_description": "Sync data from AWS to any destination", - "repository": "https://github.com/cloudquery/cloudquery", - "tier": "free", - "price_usd": "50", - "addon_type": "visualization", - "addon_format": "zip" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/addons" : { + "get" : { + "description" : "List all addons", + "operationId" : "ListAddons", + "parameters" : [ { + "$ref" : "#/components/parameters/addon_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddons_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "addons" - ] + "security" : [ ], + "tags" : [ "addons" ] }, - "post": { - "description": "Create an addon owned by the specified team. User must be part of that team.", - "operationId": "CreateAddon", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonCreate" + "post" : { + "description" : "Create an addon owned by the specified team. User must be part of that team.", + "operationId" : "CreateAddon", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonCreate" } } - } + }, + "required" : true }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Addon" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Addon" } } }, - "description": "Created" + "description" : "Created" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] } }, - "/addons/{team_name}/{addon_type}/{addon_name}": { - "get": { - "description": "Get details about a given addon.", - "operationId": "GetAddon", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListAddon" + "/addons/{team_name}/{addon_type}/{addon_name}" : { + "delete" : { + "description" : "Delete addon by team and addon name", + "operationId" : "DeleteAddonByTeamAndName", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ], + "x-internal" : true + }, + "get" : { + "description" : "Get details about a given addon.", + "operationId" : "GetAddon", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddon" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "addons" - ] + "security" : [ ], + "tags" : [ "addons" ] }, - "patch": { - "description": "Update an Addon", - "operationId": "UpdateAddon", - "tags": [ - "addons" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonUpdate" + "patch" : { + "description" : "Update an Addon", + "operationId" : "UpdateAddon", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonUpdate" } } } }, - "responses": { - "200": { - "description": "Updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Addon" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Addon" } } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - }, - "delete": { - "description": "Delete addon by team and addon name", - "operationId": "DeleteAddonByTeamAndName", - "x-internal": true, - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - } - ], - "responses": { - "204": { - "description": "Response" + }, + "description" : "Updated" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "404": { - "$ref": "#/components/responses/NotFound" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] } }, - "/addons/{team_name}/{addon_type}/{addon_name}/versions": { - "get": { - "description": "List all versions for a given addon", - "operationId": "ListAddonVersions", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - }, - { - "$ref": "#/components/parameters/version_sort_by" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include_drafts" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AddonVersion" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/addons/{team_name}/{addon_type}/{addon_name}/versions" : { + "get" : { + "description" : "List all versions for a given addon", + "operationId" : "ListAddonVersions", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_drafts" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddonVersions_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "addons" - ] + "security" : [ ], + "tags" : [ "addons" ] } }, - "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}": { - "get": { - "description": "Get details about a given addon version.", - "operationId": "GetAddonVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonVersion" + "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}" : { + "get" : { + "description" : "Get details about a given addon version.", + "operationId" : "GetAddonVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" } } }, - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "addons" - ] - }, - "put": { - "description": "Create a new addon version, or update a draft version", - "operationId": "CreateAddonVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message", - "doc", - "checksum" - ], - "properties": { - "message": { - "type": "string", - "minLength": 1, - "maxLength": 30000, - "description": "A message describing what's new or changed in this version.\nThis message will be displayed to users in the addon's changelog.\nSupports limited markdown syntax.\n" - }, - "doc": { - "type": "string", - "description": "Main README in MD format" - }, - "plugin_deps": { - "type": "array", - "items": { - "type": "string" - }, - "description": "plugin dependencies in the format of ['team_name/kind/plugin_name@version']" - }, - "addon_deps": { - "type": "array", - "items": { - "type": "string" - }, - "description": "addon dependencies in the format of ['team_name/type/addon_name@version']" - }, - "checksum": { - "type": "string", - "description": "SHA-256 checksum for the addon asset" - } - } - } - } + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonVersion" - } + "security" : [ ], + "tags" : [ "addons" ] + }, + "patch" : { + "description" : "Update a given addon version", + "operationId" : "UpdateAddonVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersionUpdate" } } - }, - "201": { - "description": "Success (the addon version was created)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonVersion" + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] }, - "patch": { - "description": "Update a given addon version", - "operationId": "UpdateAddonVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonVersionUpdate" + "put" : { + "description" : "Create a new addon version, or update a draft version", + "operationId" : "CreateAddonVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateAddonVersion_request" } } } }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonVersion" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" } } - } + }, + "description" : "Response" + }, + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" + } + } + }, + "description" : "Success (the addon version was created)" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] } }, - "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}/assets": { - "get": { - "description": "Download an asset for a given version", - "operationId": "DownloadAddonAsset", - "parameters": [ - { - "in": "header", - "name": "Accept", - "required": false, - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonAsset" + "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}/assets" : { + "get" : { + "description" : "Download an asset for a given version", + "operationId" : "DownloadAddonAsset", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonAsset" } } - } - }, - "302": { - "description": "Response", - "headers": { - "Location": { - "schema": { - "type": "string" - } + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" } } }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "429" : { + "$ref" : "#/components/responses/TooManyRequests" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] }, - "post": { - "description": "Get a URL to upload an asset for a given addon version", - "operationId": "UploadAddonAsset", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReleaseURL" + "post" : { + "description" : "Get a URL to upload an asset for a given addon version", + "operationId" : "UploadAddonAsset", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReleaseURL" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] } }, - "/teams": { - "get": { - "description": "List all teams", - "operationId": "ListTeams", - "parameters": [ - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Team" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams" : { + "get" : { + "description" : "List all teams", + "operationId" : "ListTeams", + "parameters" : [ { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeams_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams" - ] - }, - "post": { - "description": "Create a team owned by the current user.", - "operationId": "CreateTeam", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "required": [ - "name", - "display_name" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/TeamName" - }, - "display_name": { - "type": "string", - "description": "The team's display name", - "minLength": 1, - "maxLength": 255 - } - } + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "post" : { + "description" : "Create a team owned by the current user.", + "operationId" : "CreateTeam", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeam_request" } } } }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Team" } } }, - "description": "Created" + "description" : "Created" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}": { - "get": { - "description": "Get a team by name", - "operationId": "GetTeamByName", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams" - ] - }, - "patch": { - "description": "Update team attributes", - "operationId": "UpdateTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "type": "string", - "description": "The team's display name" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" + "/teams/{team_name}" : { + "delete" : { + "description" : "Delete team", + "operationId" : "DeleteTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ], + "x-internal" : true + }, + "get" : { + "description" : "Get a team by name", + "operationId" : "GetTeamByName", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Team" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] }, - "delete": { - "description": "Delete team", - "operationId": "DeleteTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "patch" : { + "description" : "Update team attributes", + "operationId" : "UpdateTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateTeam_request" + } + } } - ], - "x-internal": true, - "responses": { - "204": { - "description": "Response" - }, - "400": { - "$ref": "#/components/responses/BadRequest" + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Team" + } + } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/images": { - "post": { - "description": "Get URLs to upload images for a given team", - "operationId": "CreateTeamImages", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "images" - ], - "properties": { - "images": { - "items": { - "$ref": "#/components/schemas/TeamImageCreate" - }, - "type": "array", - "minItems": 1 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/TeamImage" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/images" : { + "post" : { + "description" : "Get URLs to upload images for a given team", + "operationId" : "CreateTeamImages", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeamImages_request" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeamImages_201_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/plugins": { - "get": { - "description": "List all plugins for the team.", - "operationId": "ListPluginsByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include_private" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Plugin" - }, - "type": "array", - "example": [ - { - "name": "aws-source", - "kind": "source", - "team_name": "cloudquery", - "display_name": "AWS Source Plugin", - "category": "cloud-infrastructure", - "created_at": "2017-07-14T16:53:42Z", - "updated_at": "2017-07-14T16:53:42Z", - "homepage": "https://cloudquery.io", - "logo": "https://images.cloudquery.io/logos/aws.png", - "official": true, - "short_description": "Sync data from AWS to any destination", - "repository": "https://github.com/cloudquery/cloudquery", - "tier": "paid", - "usd_per_row": "0.00123", - "free_rows_per_month": 10000, - "release_stage": "preview" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/plugins" : { + "delete" : { + "description" : "Delete plugins by team", + "operationId" : "DeletePluginsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ], + "x-internal" : true + }, + "get" : { + "description" : "List all plugins for the team.", + "operationId" : "ListPluginsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_private" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginsByTeam_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] - }, - "delete": { - "description": "Delete plugins by team", - "operationId": "DeletePluginsByTeam", - "x-internal": true, - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "204": { - "description": "Response" - }, - "400": { - "$ref": "#/components/responses/BadRequest" + "tags" : [ "plugins" ] + } + }, + "/teams/{team_name}/addons" : { + "delete" : { + "description" : "Delete addons by team", + "operationId" : "DeleteAddonsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ], + "x-internal" : true + }, + "get" : { + "description" : "List all addons for the team.", + "operationId" : "ListAddonsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_private" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddonsByTeam_200_response" + } + } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "addons" ] } }, - "/teams/{team_name}/addons": { - "get": { - "description": "List all addons for the team.", - "operationId": "ListAddonsByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/include_private" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Addon" - }, - "type": "array", - "example": [ - { - "name": "aws-policies", - "team_name": "cloudquery", - "display_name": "AWS Policies", - "category": "cloud-infrastructure", - "created_at": "2017-07-14T16:53:42Z", - "updated_at": "2017-07-14T16:53:42Z", - "homepage": "https://cloudquery.io", - "logo": "https://images.cloudquery.io/logos/aws.png", - "official": true, - "short_description": "AWS policies", - "repository": "https://github.com/cloudquery/cloudquery", - "tier": "paid", - "price_usd": "50", - "addon_type": "visualization", - "addon_format": "zip" - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/addon-orders" : { + "get" : { + "description" : "List all addon orders for the team.", + "operationId" : "ListAddonOrdersByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddonOrdersByTeam_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] }, - "delete": { - "description": "Delete addons by team", - "operationId": "DeleteAddonsByTeam", - "x-internal": true, - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "204": { - "description": "Response" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "addons" - ] - } - }, - "/teams/{team_name}/addon-orders": { - "get": { - "description": "List all addon orders for the team.", - "operationId": "ListAddonOrdersByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AddonOrder" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } + "post" : { + "description" : "Start the checkout process for an addon order.", + "operationId" : "CreateAddonOrderForTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonOrderCreate" } } }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "addons" - ] - }, - "post": { - "description": "Start the checkout process for an addon order.", - "operationId": "CreateAddonOrderForTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonOrderCreate" - } - } - } + "required" : true }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonOrder" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonOrder" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] } }, - "/teams/{team_name}/addon-orders/{addon_order_id}": { - "get": { - "description": "Get an addon order for the team.", - "operationId": "GetAddonOrderByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_order_id" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonOrder" + "/teams/{team_name}/addon-orders/{addon_order_id}" : { + "get" : { + "description" : "Get an addon order for the team.", + "operationId" : "GetAddonOrderByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_order_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonOrder" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] } }, - "/teams/{team_name}/memberships": { - "get": { - "description": "Get memberships to the team.", - "operationId": "GetTeamMemberships", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/MembershipWithUser" - }, - "type": "array", - "example": [ - { - "role": "admin", - "user": { - "created_at": "2017-07-14T16:53:42Z", - "email": "user@clouduery.io", - "id": "12345678-1234-1234-1234-1234567890ab", - "name": "user", - "updated_at": "2017-07-14T16:53:42Z" - } - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/memberships" : { + "get" : { + "description" : "Get memberships to the team.", + "operationId" : "GetTeamMemberships", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetTeamMemberships_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/memberships/{email}": { - "delete": { - "description": "Remove a user from the team", - "operationId": "DeleteTeamMembership", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/email" - } - ], - "responses": { - "204": { - "description": "Response" + "/teams/{team_name}/memberships/{email}" : { + "delete" : { + "description" : "Remove a user from the team", + "operationId" : "DeleteTeamMembership", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/email" + } ], + "responses" : { + "204" : { + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/monthly-limits": { - "get": { - "deprecated": true, - "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nList all monthly limits for the team.\n", - "operationId": "ListMonthlyLimitsByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "List of monthly limits for the team.", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/MonthlyLimit" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/monthly-limits" : { + "get" : { + "deprecated" : true, + "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nList all monthly limits for the team.\n", + "operationId" : "ListMonthlyLimitsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListMonthlyLimitsByTeam_200_response" } } - } + }, + "description" : "List of monthly limits for the team." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] }, - "post": { - "deprecated": true, - "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nCreate a monthly limit for a plugin\n", - "operationId": "CreateMonthlyLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MonthlyLimitCreate" + "post" : { + "deprecated" : true, + "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nCreate a monthly limit for a plugin\n", + "operationId" : "CreateMonthlyLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MonthlyLimitCreate" } } } }, - "responses": { - "201": { - "description": "New monthly limit created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MonthlyLimit" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MonthlyLimit" } } - } + }, + "description" : "New monthly limit created." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/spending-limits": { - "get": { - "description": "Get monthly spending limit for team.", - "operationId": "GetSpendingLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "200": { - "description": "Spending limit retrieved.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpendingLimit" + "/teams/{team_name}/spending-limits" : { + "delete" : { + "description" : "Delete a spending limit for a team", + "operationId" : "DeleteSpendingLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "204" : { + "description" : "Spending limit deleted." + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "get" : { + "description" : "Get monthly spending limit for team.", + "operationId" : "GetSpendingLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SpendingLimit" } } - } + }, + "description" : "Spending limit retrieved." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] }, - "post": { - "description": "Create a spending limit for a team", - "operationId": "CreateSpendingLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpendingLimitCreate" + "post" : { + "description" : "Create a spending limit for a team", + "operationId" : "CreateSpendingLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SpendingLimitCreate" } } } }, - "responses": { - "201": { - "description": "New spending limit created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpendingLimit" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SpendingLimit" } } - } + }, + "description" : "New spending limit created." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] }, - "put": { - "description": "Update a spending limit for a team", - "operationId": "UpdateSpendingLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpendingLimitUpdate" + "put" : { + "description" : "Update a spending limit for a team", + "operationId" : "UpdateSpendingLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SpendingLimitUpdate" } } } }, - "responses": { - "200": { - "description": "Spending limit updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpendingLimit" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SpendingLimit" } } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" + }, + "description" : "Spending limit updated." }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams" - ] - }, - "delete": { - "description": "Delete a spending limit for a team", - "operationId": "DeleteSpendingLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "204": { - "description": "Spending limit deleted." + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}": { - "get": { - "deprecated": true, - "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nGet a monthly limit for a plugin\n", - "operationId": "GetMonthlyLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "200": { - "description": "Monthly limit retrieved.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MonthlyLimit" + "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}" : { + "delete" : { + "description" : "Delete a monthly limit for a plugin", + "operationId" : "DeleteMonthlyLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "204" : { + "description" : "Monthly limit deleted." + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "get" : { + "deprecated" : true, + "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nGet a monthly limit for a plugin\n", + "operationId" : "GetMonthlyLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MonthlyLimit" } } - } + }, + "description" : "Monthly limit retrieved." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] }, - "put": { - "deprecated": true, - "description": "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nUpdate a monthly limit for a plugin\n", - "operationId": "UpdateMonthlyLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MonthlyLimitUpdate" + "put" : { + "deprecated" : true, + "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nUpdate a monthly limit for a plugin\n", + "operationId" : "UpdateMonthlyLimit", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MonthlyLimitUpdate" } } } }, - "responses": { - "200": { - "description": "Monthly limit updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MonthlyLimit" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MonthlyLimit" } } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams" - ] - }, - "delete": { - "description": "Delete a monthly limit for a plugin", - "operationId": "DeleteMonthlyLimit", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" + }, + "description" : "Monthly limit updated." }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "204": { - "description": "Monthly limit deleted." + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/invoices": { - "get": { - "description": "List all past invoices for the team.", - "operationId": "ListInvoicesByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Invoice" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/invoices" : { + "get" : { + "description" : "List all past invoices for the team.", + "operationId" : "ListInvoicesByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListInvoicesByTeam_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/usage": { - "get": { - "description": "List plugin usage for the current calendar month.", - "operationId": "ListTeamPluginUsage", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "List plugin usage for the current calendar month.", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/UsageCurrent" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/usage" : { + "get" : { + "description" : "List plugin usage for the current calendar month.", + "operationId" : "ListTeamPluginUsage", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeamPluginUsage_200_response" } } - } + }, + "description" : "List plugin usage for the current calendar month." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] }, - "post": { - "description": "Increase the usage of a plugin. This can incur billing costs and should be used only by plugin SDKs.", - "operationId": "IncreaseTeamPluginUsage", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UsageIncrease" + "post" : { + "description" : "Increase the usage of a plugin. This can incur billing costs and should be used only by plugin SDKs.", + "operationId" : "IncreaseTeamPluginUsage", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageIncrease" } } } }, - "responses": { - "204": { - "description": "Success (the plugin usage was increased). It may take some time to reflect in the usage list." + "responses" : { + "204" : { + "description" : "Success (the plugin usage was increased). It may take some time to reflect in the usage list." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" + "503" : { + "$ref" : "#/components/responses/ServiceUnavailable" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/usage/{plugin_team}/{plugin_kind}/{plugin_name}": { - "get": { - "description": "Get plugin usage for the current calendar month.", - "operationId": "GetTeamPluginUsage", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "200": { - "description": "Plugin usage for the current calendar month.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UsageCurrent" + "/teams/{team_name}/usage/{plugin_team}/{plugin_kind}/{plugin_name}" : { + "get" : { + "description" : "Get plugin usage for the current calendar month.", + "operationId" : "GetTeamPluginUsage", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageCurrent" } } - } + }, + "description" : "Plugin usage for the current calendar month." }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/usage-summary": { - "get": { - "description": "Get a summary of usage for the specified time range.", - "operationId": "GetTeamUsageSummary", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "in": "query", - "name": "metrics", - "required": false, - "schema": { - "type": "array", - "description": "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", - "items": { - "type": "string", - "enum": [ - "paid_rows", - "cloud_vcpu_seconds", - "cloud_vram_byte_seconds", - "network_egress_bytes" - ] - }, - "default": [ - "paid_rows" - ] - } - }, - { - "in": "query", - "name": "start", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "description": "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago." - } - }, - { - "in": "query", - "name": "end", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "description": "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time." - } - }, - { - "in": "query", - "name": "aggregation_period", - "description": "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", - "required": false, - "schema": { - "type": "string", - "default": "day", - "enum": [ - "day", - "month" - ] - } - } - ], - "responses": { - "200": { - "description": "A summary of usage for the specified time range.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UsageSummary" + "/teams/{team_name}/usage-summary" : { + "get" : { + "description" : "Get a summary of usage for the specified time range.", + "operationId" : "GetTeamUsageSummary", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "explode" : true, + "in" : "query", + "name" : "metrics", + "required" : false, + "schema" : { + "default" : [ "paid_rows" ], + "description" : "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", + "items" : { + "enum" : [ "paid_rows", "cloud_vcpu_seconds", "cloud_vram_byte_seconds", "network_egress_bytes" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "start", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "end", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "description" : "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", + "explode" : true, + "in" : "query", + "name" : "aggregation_period", + "required" : false, + "schema" : { + "default" : "day", + "enum" : [ "day", "month" ], + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageSummary" } } - } + }, + "description" : "A summary of usage for the specified time range." }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/usage-summary/{group_by}": { - "get": { - "description": "Get a grouped summary of usage for the specified time range.", - "operationId": "GetGroupedTeamUsageSummary", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "in": "path", - "name": "group_by", - "required": true, - "schema": { - "type": "string", - "enum": [ - "price_category", - "plugin", - "sync_id" - ], - "description": "Group by usage summary. `plugin` and `price_category` groupings are only available for `paid-rows`." - } - }, - { - "in": "query", - "name": "metrics", - "required": false, - "schema": { - "type": "array", - "description": "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", - "items": { - "type": "string", - "enum": [ - "paid_rows", - "cloud_vcpu_seconds", - "cloud_vram_byte_seconds", - "network_egress_bytes" - ] - }, - "default": [ - "paid_rows" - ] - } - }, - { - "in": "query", - "name": "start", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "description": "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago." - } - }, - { - "in": "query", - "name": "end", - "required": false, - "schema": { - "type": "string", - "format": "date-time", - "description": "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time." - } - }, - { - "in": "query", - "name": "aggregation_period", - "description": "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", - "required": false, - "schema": { - "type": "string", - "default": "day", - "enum": [ - "day", - "month" - ] - } - } - ], - "responses": { - "200": { - "description": "A summary of usage for the specified time range.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UsageSummary" + "/teams/{team_name}/usage-summary/{group_by}" : { + "get" : { + "description" : "Get a grouped summary of usage for the specified time range.", + "operationId" : "GetGroupedTeamUsageSummary", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "explode" : false, + "in" : "path", + "name" : "group_by", + "required" : true, + "schema" : { + "description" : "Group by usage summary. `plugin` and `price_category` groupings are only available for `paid-rows`.", + "enum" : [ "price_category", "plugin", "sync_id" ], + "type" : "string" + }, + "style" : "simple" + }, { + "explode" : true, + "in" : "query", + "name" : "metrics", + "required" : false, + "schema" : { + "default" : [ "paid_rows" ], + "description" : "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", + "items" : { + "enum" : [ "paid_rows", "cloud_vcpu_seconds", "cloud_vram_byte_seconds", "network_egress_bytes" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "start", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "end", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "description" : "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", + "explode" : true, + "in" : "query", + "name" : "aggregation_period", + "required" : false, + "schema" : { + "default" : "day", + "enum" : [ "day", "month" ], + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageSummary" } } - } + }, + "description" : "A summary of usage for the specified time range." }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/spend": { - "get": { - "description": "Get team spend for defined period.", - "operationId": "GetTeamSpend", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "in": "query", - "name": "start", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "A valid ISO 8601 date string representing the inclusive start of the period." - }, - { - "in": "query", - "name": "end", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "A valid ISO 8601 date string representing the exclusive end of the period." - } - ], - "responses": { - "200": { - "description": "Team spend for defined period.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpendSummary" + "/teams/{team_name}/spend" : { + "get" : { + "description" : "Get team spend for defined period.", + "operationId" : "GetTeamSpend", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "description" : "A valid ISO 8601 date string representing the inclusive start of the period.", + "explode" : true, + "in" : "query", + "name" : "start", + "required" : false, + "schema" : { + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "description" : "A valid ISO 8601 date string representing the exclusive end of the period.", + "explode" : true, + "in" : "query", + "name" : "end", + "required" : false, + "schema" : { + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SpendSummary" } } - } + }, + "description" : "Team spend for defined period." }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}": { - "get": { - "description": "Download an asset for a given plugin version as the current team.", - "operationId": "DownloadPluginAssetByTeam", - "parameters": [ - { - "in": "header", - "name": "Accept", - "required": false, - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_team" - }, - { - "$ref": "#/components/parameters/plugin_kind" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - }, - { - "$ref": "#/components/parameters/target_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginAsset" + "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}" : { + "get" : { + "description" : "Download an asset for a given plugin version as the current team.", + "operationId" : "DownloadPluginAssetByTeam", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/target_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginAsset" } } - } - }, - "302": { - "description": "Response", - "headers": { - "Location": { - "schema": { - "type": "string" - } + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" } } }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "429" : { + "$ref" : "#/components/responses/TooManyRequests" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/teams/{team_name}/addons/{addon_team}/{addon_type}/{addon_name}/versions/{version_name}/assets": { - "get": { - "description": "Download an asset for a given addon version as the current team.", - "operationId": "DownloadAddonAssetByTeam", - "parameters": [ - { - "in": "header", - "name": "Accept", - "required": false, - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/addon_team" - }, - { - "$ref": "#/components/parameters/addon_type" - }, - { - "$ref": "#/components/parameters/addon_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonAsset" + "/teams/{team_name}/addons/{addon_team}/{addon_type}/{addon_name}/versions/{version_name}/assets" : { + "get" : { + "description" : "Download an asset for a given addon version as the current team.", + "operationId" : "DownloadAddonAssetByTeam", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_team" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonAsset" } } - } - }, - "302": { - "description": "Response", - "headers": { - "Location": { - "schema": { - "type": "string" - } + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" } } }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "429": { - "$ref": "#/components/responses/TooManyRequests" + "429" : { + "$ref" : "#/components/responses/TooManyRequests" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "addons" - ] + "tags" : [ "addons" ] } }, - "/teams/{team_name}/invitations": { - "get": { - "operationId": "ListTeamInvitations", - "description": "List of open invitations to the team", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invitation" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/invitations" : { + "get" : { + "description" : "List of open invitations to the team", + "operationId" : "ListTeamInvitations", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeamInvitations_200_response" } } - } + }, + "description" : "Response" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "teams" ] }, - "post": { - "operationId": "EmailTeamInvitation", - "description": "Invite a user to join a team with their email address", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "email", - "role" - ], - "properties": { - "email": { - "type": "string", - "format": "email" - }, - "role": { - "type": "string", - "enum": [ - "admin", - "member" - ] - } - } + "post" : { + "description" : "Invite a user to join a team with their email address", + "operationId" : "EmailTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EmailTeamInvitation_request" } } } }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Invitation" } } - } + }, + "description" : "Response" }, - "202": { - "description": "Response, email failed to send", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" + "202" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Invitation" } } - } + }, + "description" : "Response, email failed to send" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "teams" ] } }, - "/teams/{team_name}/invitations/accept": { - "post": { - "operationId": "AcceptTeamInvitation", - "description": "Accept an invitation to the team, creating a user membership", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "token" - ], - "properties": { - "token": { - "type": "string", - "format": "uuid" - } + "/teams/{team_name}/invitations/accept" : { + "post" : { + "description" : "Accept an invitation to the team, creating a user membership", + "operationId" : "AcceptTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AcceptTeamInvitation_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MembershipWithTeam" } } - } - } - }, - "responses": { - "201": { - "description": "The invitation has been accepted and the authenticated user is now a member of the team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MembershipWithTeam" - } - } - } + }, + "description" : "The invitation has been accepted and the authenticated user is now a member of the team." }, - "303": { - "description": "The authenticated user is already a member of this team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MembershipWithTeam" + "303" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MembershipWithTeam" } } - } + }, + "description" : "The authenticated user is already a member of this team." }, - "403": { - "description": "You do not have an invitation to join this team.", - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden", + "description" : "You do not have an invitation to join this team." }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "teams" ] } }, - "/teams/{team_name}/invitations/{email}": { - "delete": { - "operationId": "CancelTeamInvitation", - "description": "Cancel an invitation to the team, preventing the user becoming a team member", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/email" - } - ], - "responses": { - "204": { - "description": "Response" + "/teams/{team_name}/invitations/{email}" : { + "delete" : { + "description" : "Cancel an invitation to the team, preventing the user becoming a team member", + "operationId" : "CancelTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/email" + } ], + "responses" : { + "204" : { + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "teams" ] } }, - "/teams/{team_name}/subscription-orders": { - "get": { - "description": "List all subscription orders for the team.", - "operationId": "ListSubscriptionOrdersByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/TeamSubscriptionOrder" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/subscription-orders" : { + "get" : { + "description" : "List all subscription orders for the team.", + "operationId" : "ListSubscriptionOrdersByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSubscriptionOrdersByTeam_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] }, - "post": { - "description": "Start the checkout process for a subscription order.", - "operationId": "CreateSubscriptionOrderForTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamSubscriptionOrderCreate" + "post" : { + "description" : "Start the checkout process for a subscription order.", + "operationId" : "CreateSubscriptionOrderForTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderCreate" } } - } + }, + "required" : true }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamSubscriptionOrder" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrder" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/subscription-orders/{subscription_order_id}": { - "get": { - "description": "Get a subscription order for the team.", - "operationId": "GetSubscriptionOrderByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/team_subscription_order_id" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamSubscriptionOrder" + "/teams/{team_name}/subscription-orders/{subscription_order_id}" : { + "get" : { + "description" : "Get a subscription order for the team.", + "operationId" : "GetSubscriptionOrderByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/team_subscription_order_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrder" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/teams/{team_name}/users": { - "get": { - "description": "List all users in the current team.", - "operationId": "ListUsersByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/users" : { + "get" : { + "description" : "List all users in the current team.", + "operationId" : "ListUsersByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListUsersByTeam_200_response" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams" - ] + "tags" : [ "teams" ] } }, - "/user": { - "get": { - "description": "Get the current authenticated user from the OAuth token\n", - "operationId": "GetCurrentUser", - "parameters": [], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" + "/user" : { + "get" : { + "description" : "Get the current authenticated user from the OAuth token\n", + "operationId" : "GetCurrentUser", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "users" - ] + "tags" : [ "users" ] }, - "patch": { - "description": "Update attributes for the current authenticated user from the OAuth token", - "operationId": "UpdateCurrentUser", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The user's name", - "minLength": 1, - "maxLength": 255 - } - } + "patch" : { + "description" : "Update attributes for the current authenticated user from the OAuth token", + "operationId" : "UpdateCurrentUser", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateCurrentUser_request" } } } }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "405": { - "$ref": "#/components/responses/MethodNotAllowed" + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "users" - ] + "tags" : [ "users" ] } }, - "/user/invitations": { - "get": { - "operationId": "ListCurrentUserInvitations", - "description": "List of the current user's unaccepted invitations", - "tags": [ - "users" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InvitationWithToken" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/user/invitations" : { + "get" : { + "description" : "List of the current user's unaccepted invitations", + "operationId" : "ListCurrentUserInvitations", + "parameters" : [ { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListCurrentUserInvitations_200_response" } } - } + }, + "description" : "Response" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "users" ] } }, - "/user/memberships": { - "get": { - "description": "Get memberships that the user has accepted.", - "operationId": "GetCurrentUserMemberships", - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "metadata", - "items" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/MembershipWithTeam" - }, - "type": "array", - "example": [ - { - "role": "admin", - "team": { - "created_at": "2017-07-14T16:53:42Z", - "name": "cloudquery", - "display_name": "CloudQuery", - "plan": "free", - "is_trial_active": false - } - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/user/memberships" : { + "get" : { + "description" : "Get memberships that the user has accepted.", + "operationId" : "GetCurrentUserMemberships", + "parameters" : [ { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetCurrentUserMemberships_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "users" - ] + "tags" : [ "users" ] } }, - "/users/{user_id}": { - "delete": { - "description": "Delete user", - "operationId": "DeleteUser", - "parameters": [ - { - "$ref": "#/components/parameters/user_id" - } - ], - "x-internal": true, - "responses": { - "204": { - "description": "Response" + "/users/{user_id}" : { + "delete" : { + "description" : "Delete user", + "operationId" : "DeleteUser", + "parameters" : [ { + "$ref" : "#/components/parameters/user_id" + } ], + "responses" : { + "204" : { + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "users" - ] + "tags" : [ "users" ], + "x-internal" : true } }, - "/teams/{team_name}/apikeys": { - "get": { - "description": "List all team API Keys", - "operationId": "ListTeamAPIKeys", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/APIKey" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/apikeys" : { + "get" : { + "description" : "List all team API Keys", + "operationId" : "ListTeamAPIKeys", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeamAPIKeys_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "teams" ] }, - "post": { - "description": "Create new team API Key.", - "operationId": "CreateTeamAPIKey", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "expires_at", - "name" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/APIKeyName" - }, - "expires_at": { - "type": "string", - "format": "date-time" - } - } + "post" : { + "description" : "Create new team API Key.", + "operationId" : "CreateTeamAPIKey", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeamAPIKey_request" } } } }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIKey" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/APIKey" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "teams" ] } }, - "/teams/{team_name}/apikeys/{apikey_id}": { - "delete": { - "description": "Delete API Key. This will remove any future access by this API Key.", - "operationId": "DeleteTeamAPIKey", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/apikey_id" - } - ], - "responses": { - "204": { - "description": "Deleted" + "/teams/{team_name}/apikeys/{apikey_id}" : { + "delete" : { + "description" : "Delete API Key. This will remove any future access by this API Key.", + "operationId" : "DeleteTeamAPIKey", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/apikey_id" + } ], + "responses" : { + "204" : { + "description" : "Deleted" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "teams" ] } }, - "/registry/auth": { - "get": { - "description": "Performs authentication and authorization for our image registry.", - "operationId": "AuthRegistryRequest", - "parameters": [ - { - "in": "header", - "name": "X-Meta-Plugin-Version", - "schema": { - "type": "string" - }, - "description": "Plugin version name", - "example": "v1.0.0" - }, - { - "in": "header", - "name": "X-Meta-User-Team-Name", - "schema": { - "type": "string" - }, - "description": "User's team name" - }, - { - "in": "query", - "name": "account", - "schema": { - "type": "string" - }, - "description": "Username used for `docker login`" - }, - { - "in": "query", - "name": "service", - "schema": { - "type": "string" - }, - "description": "Service requesting the JTW token" - }, - { - "in": "query", - "name": "scope", - "schema": { - "type": "string" - }, - "description": "Multi-value string containing the repository being access and the operation type (push/pull)" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistryAuthToken" + "/registry/auth" : { + "get" : { + "description" : "Performs authentication and authorization for our image registry.", + "operationId" : "AuthRegistryRequest", + "parameters" : [ { + "description" : "Plugin version name", + "example" : "v1.0.0", + "explode" : false, + "in" : "header", + "name" : "X-Meta-Plugin-Version", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "description" : "User's team name", + "explode" : false, + "in" : "header", + "name" : "X-Meta-User-Team-Name", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "description" : "Username used for `docker login`", + "explode" : true, + "in" : "query", + "name" : "account", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Service requesting the JTW token", + "explode" : true, + "in" : "query", + "name" : "service", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Multi-value string containing the repository being access and the operation type (push/pull)", + "explode" : true, + "in" : "query", + "name" : "scope", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegistryAuthToken" } } }, - "description": "Response" + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/DockerError" + "400" : { + "$ref" : "#/components/responses/DockerError" }, - "401": { - "$ref": "#/components/responses/DockerError" + "401" : { + "$ref" : "#/components/responses/DockerError" }, - "404": { - "$ref": "#/components/responses/DockerError" + "404" : { + "$ref" : "#/components/responses/DockerError" }, - "422": { - "$ref": "#/components/responses/DockerError" + "422" : { + "$ref" : "#/components/responses/DockerError" }, - "500": { - "$ref": "#/components/responses/DockerError" + "500" : { + "$ref" : "#/components/responses/DockerError" } }, - "tags": [ - "registry" - ], - "security": [ - { - "basicAuth": [] - } - ] + "security" : [ { + "basicAuth" : [ ] + } ], + "tags" : [ "registry" ] } }, - "/teams/{team_name}/sync-sources": { - "get": { - "description": "List all sync source definitions.", - "operationId": "ListSyncSources", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/SyncSource" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/sync-sources" : { + "get" : { + "description" : "List all sync source definitions.", + "operationId" : "ListSyncSources", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSyncSources_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "post": { - "description": "Create new Sync Source definition.", - "operationId": "CreateSyncSource", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncSourceCreate" + "post" : { + "description" : "Create new Sync Source definition.", + "operationId" : "CreateSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSourceCreate" } } - } + }, + "required" : true }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncSource" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSource" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/test": { - "post": { - "description": "Test a Sync Source definition.", - "operationId": "TestSyncSource", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncSourceCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncTestConnection" + "/teams/{team_name}/sync-sources/test" : { + "post" : { + "description" : "Test a Sync Source definition.", + "operationId" : "TestSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSourceCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/{sync_source_name}": { - "get": { - "description": "Get a single sync source definition.", - "operationId": "GetSyncSource", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_source_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncSource" + "/teams/{team_name}/sync-sources/{sync_source_name}" : { + "delete" : { + "description" : "Delete a Sync Source definition. Any syncs relying on this source must be deleted first.", + "operationId" : "DeleteSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_name" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "get" : { + "description" : "Get a single sync source definition.", + "operationId" : "GetSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSource" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "patch": { - "description": "Update a Sync Source definition.", - "operationId": "UpdateSyncSource", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_source_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncSourceUpdate" + "patch" : { + "description" : "Update a Sync Source definition.", + "operationId" : "UpdateSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSourceUpdate" } } - } + }, + "required" : true }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncSource" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSource" } } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - }, - "delete": { - "description": "Delete a Sync Source definition. Any syncs relying on this source must be deleted first.", - "operationId": "DeleteSyncSource", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + }, + "description" : "Response" }, - { - "$ref": "#/components/parameters/sync_source_name" - } - ], - "responses": { - "204": { - "description": "Deleted" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations": { - "get": { - "description": "List all sync destination definitions.", - "operationId": "ListSyncDestinations", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/SyncDestination" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/sync-destinations" : { + "get" : { + "description" : "List all sync destination definitions.", + "operationId" : "ListSyncDestinations", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSyncDestinations_200_response" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "post": { - "description": "Create new Sync Destination definition.", - "operationId": "CreateSyncDestination", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncDestinationCreate" + "post" : { + "description" : "Create new Sync Destination definition.", + "operationId" : "CreateSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationCreate" } } - } + }, + "required" : true }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncDestination" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/test": { - "post": { - "description": "Test a Sync Destination definition.", - "operationId": "TestSyncDestination", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncDestinationCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncTestConnection" + "/teams/{team_name}/sync-destinations/test" : { + "post" : { + "description" : "Test a Sync Destination definition.", + "operationId" : "TestSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}": { - "get": { - "description": "Get a single sync destination definition.", - "operationId": "GetSyncDestination", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_destination_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncDestination" + "/teams/{team_name}/sync-destinations/{sync_destination_name}" : { + "delete" : { + "description" : "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", + "operationId" : "DeleteSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "get" : { + "description" : "Get a single sync destination definition.", + "operationId" : "GetSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "patch": { - "description": "Update a Sync Destination definition.", - "operationId": "UpdateSyncDestination", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_destination_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncDestinationUpdate" + "patch" : { + "description" : "Update a Sync Destination definition.", + "operationId" : "UpdateSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationUpdate" } } - } + }, + "required" : true }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncDestination" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } - }, - "delete": { - "description": "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", - "operationId": "DeleteSyncDestination", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/syncs" : { + "get" : { + "description" : "List all Syncs.", + "operationId" : "ListSyncs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSyncs_200_response" + } + } + }, + "description" : "Response" }, - { - "$ref": "#/components/parameters/sync_destination_name" - } - ], - "responses": { - "204": { - "description": "Deleted" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - } - }, - "/teams/{team_name}/syncs": { - "get": { - "description": "List all Syncs.", - "operationId": "ListSyncs", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Sync" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "post": { - "description": "Create new Sync definition. Sync runs can be scheduled automatically, or triggered manually after sync is created.", - "operationId": "CreateSync", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncCreate" + "post" : { + "description" : "Create new Sync definition. Sync runs can be scheduled automatically, or triggered manually after sync is created.", + "operationId" : "CreateSync", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncCreate" } } - } + }, + "required" : true }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Sync" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Sync" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}": { - "get": { - "description": "Get a Sync", - "operationId": "GetSync", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Sync" + "/teams/{team_name}/syncs/{sync_name}" : { + "delete" : { + "description" : "Delete Sync. This will delete Sync configuration and all associated sync runs, but will not delete the associated source and destination(s). These will need to be deleted separately.", + "operationId" : "DeleteSync", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "get" : { + "description" : "Get a Sync", + "operationId" : "GetSync", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Sync" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "patch": { - "description": "Update a Sync", - "operationId": "UpdateSync", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncUpdate" + "patch" : { + "description" : "Update a Sync", + "operationId" : "UpdateSync", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncUpdate" } } } }, - "responses": { - "200": { - "description": "Updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Sync" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Sync" } } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - }, - "delete": { - "description": "Delete Sync. This will delete Sync configuration and all associated sync runs, but will not delete the associated source and destination(s). These will need to be deleted separately.", - "operationId": "DeleteSync", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + }, + "description" : "Updated" }, - { - "$ref": "#/components/parameters/sync_name" - } - ], - "responses": { - "204": { - "description": "Deleted" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "404": { - "$ref": "#/components/responses/NotFound" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}/runs": { - "get": { - "description": "List all Sync Runs.", - "operationId": "ListSyncRuns", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/SyncRun" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/teams/{team_name}/syncs/{sync_name}/runs" : { + "get" : { + "description" : "List all Sync Runs.", + "operationId" : "ListSyncRuns", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSyncRuns_200_response" } } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - }, - "post": { - "description": "Create new SyncRun. This will trigger a manual job run.", - "operationId": "CreateSyncRun", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - } - ], - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncRun" + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "post" : { + "description" : "Create new SyncRun. This will trigger a manual job run.", + "operationId" : "CreateSyncRun", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + } ], + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncRun" } } - } + }, + "description" : "Response" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}": { - "get": { - "description": "Get a Sync Run.", - "operationId": "GetSyncRun", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - }, - { - "$ref": "#/components/parameters/sync_run_id" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncRunDetails" + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}" : { + "get" : { + "description" : "Get a Sync Run.", + "operationId" : "GetSyncRun", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncRunDetails" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "patch": { - "description": "Update a SyncRun", - "operationId": "UpdateSyncRun", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - }, - { - "$ref": "#/components/parameters/sync_run_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/SyncRunStatus" - }, - "status_reason": { - "$ref": "#/components/schemas/SyncRunStatusReason" - } - } + "patch" : { + "description" : "Update a SyncRun", + "operationId" : "UpdateSyncRun", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSyncRun_request" } } } }, - "responses": { - "200": { - "description": "Updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncRun" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncRun" } } - } + }, + "description" : "Updated" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/progress": { - "post": { - "description": "Create a new sync run progress update.", - "operationId": "CreateSyncRunProgress", - "x-internal": true, - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - }, - { - "$ref": "#/components/parameters/sync_run_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "rows", - "warnings", - "errors" - ], - "properties": { - "rows": { - "type": "integer", - "format": "int64", - "description": "Number of rows synced so far" - }, - "warnings": { - "type": "integer", - "format": "int64", - "description": "Number of warnings encountered so far" - }, - "errors": { - "type": "integer", - "format": "int64", - "description": "Number of errors encountered so far" - }, - "status": { - "$ref": "#/components/schemas/SyncRunStatus" - } - } + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/progress" : { + "post" : { + "description" : "Create a new sync run progress update.", + "operationId" : "CreateSyncRunProgress", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateSyncRunProgress_request" } } - } + }, + "required" : true }, - "responses": { - "204": { - "description": "Progress was reported successfully" + "responses" : { + "204" : { + "description" : "Progress was reported successfully" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ], + "x-internal" : true } }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/logs": { - "get": { - "description": "Get logs for a sync run.", - "operationId": "GetSyncRunLogs", - "tags": [ - "syncs" - ], - "parameters": [ - { - "in": "header", - "name": "Accept", - "required": false, - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_name" - }, - { - "$ref": "#/components/parameters/sync_run_id" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "additionalProperties": false, - "required": [ - "location" - ], - "properties": { - "location": { - "type": "string", - "format": "uri", - "description": "The location to download the sync run logs from" - } - }, - "title": "Sync Run Logs", - "type": "object" + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/logs" : { + "get" : { + "description" : "Get logs for a sync run.", + "operationId" : "GetSyncRunLogs", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Sync_Run_Logs" } }, - "text/plain": { - "schema": { - "type": "string", - "description": "Chunked response logs for a sync run that is in progress." + "text/plain" : { + "schema" : { + "description" : "Chunked response logs for a sync run that is in progress.", + "type" : "string" } } - } - }, - "302": { - "description": "Redirect to the logs download URL for a sync run that has completed.", - "headers": { - "Location": { - "schema": { - "type": "string", - "description": "URL to download logs" - } + }, + "description" : "Response" + }, + "302" : { + "description" : "Redirect to the logs download URL for a sync run that has completed.", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "description" : "URL to download logs", + "type" : "string" + }, + "style" : "simple" } } }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}": { - "get": { - "description": "Get a Sync Test Connection", - "operationId": "GetSyncTestConnection", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_test_connection_id" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncTestConnection" + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { + "get" : { + "description" : "Get a Sync Test Connection", + "operationId" : "GetSyncTestConnection", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" } } - } + }, + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] }, - "patch": { - "description": "Update a Sync Test Connection", - "operationId": "UpdateSyncTestConnection", - "tags": [ - "syncs" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/sync_test_connection_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "status" - ], - "properties": { - "status": { - "$ref": "#/components/schemas/SyncTestConnectionStatus" - } - } + "patch" : { + "description" : "Update a Sync Test Connection", + "operationId" : "UpdateSyncTestConnection", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSyncTestConnection_request" } } } }, - "responses": { - "200": { - "description": "Updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SyncTestConnection" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" } } - } + }, + "description" : "Updated" }, - "400": { - "$ref": "#/components/responses/BadRequest" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "syncs" ] } } }, - "components": { - "securitySchemes": { - "bearerAuth": { - "scheme": "bearer", - "type": "http" - }, - "basicAuth": { - "scheme": "basic", - "type": "http" + "components" : { + "parameters" : { + "page" : { + "description" : "Page number of the results to fetch", + "explode" : true, + "in" : "query", + "name" : "page", + "required" : false, + "schema" : { + "default" : 1, + "format" : "int64", + "minimum" : 1, + "type" : "integer" + }, + "style" : "form" + }, + "per_page" : { + "description" : "The number of results per page (max 1000).", + "explode" : true, + "in" : "query", + "name" : "per_page", + "required" : false, + "schema" : { + "default" : 100, + "format" : "int64", + "maximum" : 1000, + "minimum" : 1, + "type" : "integer" + }, + "style" : "form" + }, + "plugin_team" : { + "explode" : false, + "in" : "path", + "name" : "plugin_team", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" + }, + "style" : "simple" + }, + "plugin_kind" : { + "explode" : false, + "in" : "path", + "name" : "plugin_kind", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "style" : "simple" + }, + "plugin_name" : { + "explode" : false, + "in" : "path", + "name" : "plugin_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/PluginName" + }, + "style" : "simple" + }, + "plugin_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at", "updated_at", "name", "downloads" ], + "type" : "string" + }, + "style" : "form" + }, + "team_name" : { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" + }, + "style" : "simple" + }, + "version_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at" ], + "type" : "string" + }, + "style" : "form" + }, + "include_drafts" : { + "description" : "Whether to include draft versions", + "explode" : true, + "in" : "query", + "name" : "include_drafts", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + "include_prereleases" : { + "description" : "Whether to include prerelease versions", + "explode" : true, + "in" : "query", + "name" : "include_prereleases", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + "version_name" : { + "explode" : false, + "in" : "path", + "name" : "version_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/VersionName" + }, + "style" : "simple" + }, + "target_name" : { + "explode" : false, + "in" : "path", + "name" : "target_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, + "addon_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at", "updated_at", "name", "downloads" ], + "type" : "string" + }, + "style" : "form" + }, + "addon_type" : { + "explode" : false, + "in" : "path", + "name" : "addon_type", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonType" + }, + "style" : "simple" + }, + "addon_name" : { + "explode" : false, + "in" : "path", + "name" : "addon_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonName" + }, + "style" : "simple" + }, + "include_private" : { + "description" : "Whether to include private plugins", + "explode" : true, + "in" : "query", + "name" : "include_private", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + "addon_order_id" : { + "explode" : false, + "in" : "path", + "name" : "addon_order_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonOrderID" + }, + "style" : "simple", + "x-go-name" : "AddonOrderID" + }, + "email" : { + "explode" : false, + "in" : "path", + "name" : "email", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/Email" + }, + "style" : "simple" + }, + "addon_team" : { + "explode" : false, + "in" : "path", + "name" : "addon_team", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" + }, + "style" : "simple" + }, + "team_subscription_order_id" : { + "explode" : false, + "in" : "path", + "name" : "subscription_order_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + }, + "style" : "simple", + "x-go-name" : "TeamSubscriptionOrderID" + }, + "user_id" : { + "explode" : false, + "in" : "path", + "name" : "user_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/UserID" + }, + "style" : "simple", + "x-go-name" : "UserID" + }, + "apikey_id" : { + "explode" : false, + "in" : "path", + "name" : "apikey_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/APIKeyID" + }, + "style" : "simple", + "x-go-name" : "APIKeyID" + }, + "sync_source_name" : { + "explode" : false, + "in" : "path", + "name" : "sync_source_name", + "required" : true, + "schema" : { + "description" : "Unique name of the sync source", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string", + "x-go-name" : "SyncSourceName" + }, + "style" : "simple" + }, + "sync_destination_name" : { + "explode" : false, + "in" : "path", + "name" : "sync_destination_name", + "required" : true, + "schema" : { + "description" : "Unique name of the sync destination", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string", + "x-go-name" : "SyncDestinationName" + }, + "style" : "simple" + }, + "sync_name" : { + "explode" : false, + "in" : "path", + "name" : "sync_name", + "required" : true, + "schema" : { + "description" : "Unique name of the sync", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string", + "x-go-name" : "SyncName" + }, + "style" : "simple" + }, + "sync_run_id" : { + "explode" : false, + "in" : "path", + "name" : "sync_run_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/SyncRunID" + }, + "style" : "simple" + }, + "sync_test_connection_id" : { + "explode" : false, + "in" : "path", + "name" : "sync_test_connection_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnectionID" + }, + "style" : "simple" } }, - "schemas": { - "ImageURL": { - "properties": { - "upload_url": { - "type": "string", - "example": "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef" - }, - "download_url": { - "type": "string", - "example": "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef" - } - }, - "required": [ - "upload_url", - "download_url" - ] - }, - "BasicError": { - "additionalProperties": false, - "description": "Basic Error", - "required": [ - "message", - "status" - ], - "properties": { - "message": { - "type": "string" - }, - "status": { - "type": "integer" - } - }, - "title": "Basic Error", - "type": "object" - }, - "TeamName": { - "description": "The unique name for the team.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "cloudquery" - }, - "PluginKind": { - "description": "The kind of plugin, ie. source or destination.", - "type": "string", - "example": "source", - "enum": [ - "source", - "destination" - ] - }, - "PluginName": { - "description": "The unique name for the plugin.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "aws-source" - }, - "PluginNotificationRequestStatus": { - "description": "Status of a plugin notification request", - "type": "string", - "enum": [ - "pending", - "sent" - ], - "default": "pending" - }, - "PluginNotificationRequest": { - "type": "object", - "additionalProperties": false, - "description": "Plugin Notification Request", - "required": [ - "plugin_team", - "plugin_kind", - "plugin_name", - "created_at" - ], - "properties": { - "plugin_team": { - "$ref": "#/components/schemas/TeamName" - }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "sent_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/PluginNotificationRequestStatus" + "responses" : { + "InternalError" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } } - } + }, + "description" : "Internal Error" }, - "ListMetadata": { - "properties": { - "total_count": { - "type": "integer" - }, - "last_page": { - "type": "integer" + "RequiresAuthentication" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } } - } + }, + "description" : "Requires authentication" }, - "PluginNotificationRequestCreate": { - "type": "object", - "additionalProperties": false, - "description": "Create a Plugin Notification Request", - "required": [ - "plugin_team", - "plugin_kind", - "plugin_name" - ], - "properties": { - "plugin_team": { - "$ref": "#/components/schemas/TeamName" - }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" + "BadRequest" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" + } } - } + }, + "description" : "Bad request" }, - "FieldError": { - "allOf": [ - { - "$ref": "#/components/schemas/BasicError" - }, - { - "properties": { - "errors": { - "items": { - "type": "string" - }, - "type": "array" - }, - "field_errors": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - } - ] - }, - "PluginCategory": { - "description": "Supported categories for plugins", - "type": "string", - "enum": [ - "cloud-infrastructure", - "databases", - "sales-marketing", - "engineering-analytics", - "marketing-analytics", - "shipment-tracking", - "product-analytics", - "cloud-finops", - "project-management", - "fleet-management", - "security", - "data-warehouses", - "human-resources", - "other" - ] - }, - "PluginPriceCategory": { - "description": "Supported price categories for billing", - "type": "string", - "enum": [ - "api", - "database", - "free" - ] - }, - "PluginReleaseStage": { - "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "type": "string", - "enum": [ - "coming-soon", - "preview", - "ga" - ] - }, - "PluginTier": { - "description": "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", - "type": "string", - "deprecated": true, - "enum": [ - "free", - "paid", - "open-core" - ] - }, - "Plugin": { - "additionalProperties": false, - "description": "CloudQuery Plugin", - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "name": { - "$ref": "#/components/schemas/PluginName" - }, - "kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "category": { - "$ref": "#/components/schemas/PluginCategory" - }, - "price_category": { - "$ref": "#/components/schemas/PluginPriceCategory" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "updated_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "logo": { - "type": "string", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "display_name": { - "description": "The plugin's display name", - "type": "string", - "minLength": 1, - "maxLength": 50, - "example": "AWS Source Plugin" - }, - "official": { - "description": "True if the plugin is maintained by CloudQuery, false otherwise", - "type": "boolean" - }, - "release_stage": { - "$ref": "#/components/schemas/PluginReleaseStage" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "short_description": { - "type": "string", - "minLength": 1, - "maxLength": 512, - "example": "Sync data from AWS to any destination" - }, - "tier": { - "$ref": "#/components/schemas/PluginTier" - }, - "public": { - "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type": "boolean" - }, - "usd_per_row": { - "deprecated": true, - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "Deprecated. Refer to `price_category` instead.", - "example": "0.0001", - "x-go-name": "USDPerRow" - }, - "free_rows_per_month": { - "deprecated": true, - "type": "integer", - "format": "int64", - "description": "Deprecated. Refer to `price_category` instead.", - "example": 1000 - }, - "minimum_cloud_version": { - "type": "string", - "description": "Minimum plugin version that is supported in CloudQuery managed syncs.", - "maxLength": 64, - "example": "v1.2.3" - } - }, - "required": [ - "team_name", - "name", - "kind", - "category", - "release_stage", - "created_at", - "updated_at", - "logo", - "display_name", - "official", - "short_description", - "tier", - "usd_per_row", - "free_rows_per_month" - ], - "title": "CloudQuery Plugin", - "type": "object" - }, - "VersionName": { - "type": "string", - "description": "The version in semantic version format.", - "pattern": "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, - "ListPlugin": { - "allOf": [ - { - "$ref": "#/components/schemas/Plugin" - }, - { - "type": "object", - "properties": { - "latest_version": { - "$ref": "#/components/schemas/VersionName" - } + "Forbidden" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" } } - ] - }, - "PluginReleaseStageCreate": { - "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "type": "string", - "enum": [ - "coming-soon", - "preview", - "ga" - ], - "default": "coming-soon" - }, - "PluginCreate": { - "type": "object", - "required": [ - "team_name", - "kind", - "name", - "category", - "display_name", - "short_description", - "logo", - "public" - ], - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "name": { - "$ref": "#/components/schemas/PluginName" - }, - "category": { - "$ref": "#/components/schemas/PluginCategory" - }, - "price_category": { - "$ref": "#/components/schemas/PluginPriceCategory" - }, - "tier": { - "$ref": "#/components/schemas/PluginTier" - }, - "display_name": { - "type": "string", - "minLength": 1, - "maxLength": 50, - "description": "The plugin's display name, as shown in the CloudQuery Hub.", - "example": "AWS Source Plugin" - }, - "short_description": { - "type": "string", - "minLength": 1, - "maxLength": 512, - "description": "Short description of the plugin. This will be shown in the CloudQuery Hub.", - "example": "Sync data from AWS to any destination" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "public": { - "type": "boolean", - "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.", - "example": true - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "release_stage": { - "$ref": "#/components/schemas/PluginReleaseStageCreate" - }, - "logo": { - "type": "string", - "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "usd_per_row": { - "deprecated": true, - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "Deprecated. Use `price_category` instead.", - "example": "0.00001", - "x-go-name": "USDPerRow" - }, - "free_rows_per_month": { - "deprecated": true, - "type": "integer", - "format": "int64", - "description": "Deprecated. Use `price_category` instead.", - "example": 10000 - } - } + }, + "description" : "Forbidden" }, - "PluginReleaseStageUpdate": { - "description": "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "type": "string", - "enum": [ - "coming-soon", - "preview", - "ga" - ] - }, - "PluginUpdate": { - "type": "object", - "properties": { - "category": { - "$ref": "#/components/schemas/PluginCategory" - }, - "price_category": { - "$ref": "#/components/schemas/PluginPriceCategory" - }, - "tier": { - "$ref": "#/components/schemas/PluginTier" - }, - "display_name": { - "type": "string", - "minLength": 1, - "maxLength": 50, - "description": "The plugin's display name, as shown in the CloudQuery Hub.", - "example": "AWS Source Plugin" - }, - "short_description": { - "type": "string", - "minLength": 1, - "maxLength": 512, - "description": "Short description of the plugin. This will be shown in the CloudQuery Hub.", - "example": "Sync data from AWS to any destination" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "logo": { - "type": "string", - "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "public": { - "type": "boolean", - "description": "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub." - }, - "release_stage": { - "$ref": "#/components/schemas/PluginReleaseStageUpdate" - }, - "usd_per_row": { - "deprecated": true, - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "Deprecated. Update `price_category` instead.", - "example": "0.0001", - "x-go-name": "USDPerRow" - }, - "free_rows_per_month": { - "deprecated": true, - "type": "integer", - "format": "int64", - "description": "Deprecated. Update `price_category` instead.", - "example": 1000 + "NotFound" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } } - } - }, - "PluginPrice": { - "additionalProperties": false, - "description": "CloudQuery Plugin Price", - "properties": { - "id": { - "description": "ID of the price change", - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "ID" - }, - "usd_per_row": { - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price per row in USD. This is used to calculate the price of a sync.", - "example": "0.0001", - "x-go-name": "USDPerRow" - }, - "free_rows_per_month": { - "type": "integer", - "format": "int64", - "description": "The number of rows that can be synced for free each month.", - "example": 1000 - }, - "effective_from": { - "type": "string", - "format": "date-time", - "description": "The date and time the price came (or will come) into effect.", - "example": "2024-01-02T00:00:00Z" - } - }, - "required": [ - "id", - "usd_per_row", - "free_rows_per_month", - "effective_from" - ], - "title": "CloudQuery Plugin Price", - "type": "object" - }, - "PluginPriceCreate": { - "additionalProperties": false, - "description": "CloudQuery Plugin Price Create", - "properties": { - "usd_per_row": { - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price per row in USD. This is used to calculate the price of a sync.", - "example": "0.0001", - "x-go-name": "USDPerRow" - }, - "free_rows_per_month": { - "type": "integer", - "format": "int64", - "description": "The number of rows that can be synced for free each month.", - "example": 1000 - }, - "effective_from": { - "type": "string", - "format": "date-time", - "description": "The date and time the price came (or will come) into effect.", - "example": "2024-01-02T00:00:00Z" - } - }, - "required": [ - "usd_per_row", - "free_rows_per_month", - "effective_from" - ], - "title": "CloudQuery Plugin Price Create", - "type": "object" - }, - "PluginProtocols": { - "description": "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", - "type": "array", - "items": { - "type": "integer", - "enum": [ - 3 - ] - } + }, + "description" : "Resource not found" }, - "PluginPackageType": { - "description": "The package type of the plugin assets", - "type": "string", - "enum": [ - "native", - "docker" - ] - }, - "PluginVersionBase": { - "additionalProperties": false, - "description": "CloudQuery Plugin Version", - "required": [ - "created_at", - "name", - "message", - "draft", - "retracted", - "protocols", - "supported_targets", - "checksums", - "package_type" - ], - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the plugin version was created." - }, - "published_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the plugin version was set to non-draft (published)." - }, - "name": { - "$ref": "#/components/schemas/VersionName" - }, - "message": { - "type": "string", - "description": "Description of what's new or changed in this version (supports markdown)", - "example": "- Added support for AWS S3 - Added support for AWS EC2" - }, - "draft": { - "type": "boolean", - "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version." - }, - "retracted": { - "type": "boolean", - "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." - }, - "protocols": { - "$ref": "#/components/schemas/PluginProtocols" - }, - "supported_targets": { - "type": "array", - "description": "The targets supported by this plugin version, formatted as _", - "example": [ - "linux_arm64", - "darwin_amd64", - "windows_amd64" - ], - "items": { - "type": "string" + "UnprocessableEntity" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" } - }, - "checksums": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The checksums of the plugin assets" - }, - "package_type": { - "$ref": "#/components/schemas/PluginPackageType" } }, - "title": "CloudQuery Plugin Version", - "type": "object" + "description" : "UnprocessableEntity" }, - "PluginVersionList": { - "allOf": [ - { - "$ref": "#/components/schemas/PluginVersionBase" + "TooManyRequests" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } } - ] - }, - "PluginSpecJSONSchema": { - "description": "The specification of the plugin. This is a JSON schema that describes the configuration of the plugin.", - "type": "string" + }, + "description" : "Too Many Requests" }, - "PluginVersion": { - "allOf": [ - { - "$ref": "#/components/schemas/PluginVersionBase" - }, - { - "type": "object", - "properties": { - "spec_json_schema": { - "$ref": "#/components/schemas/PluginSpecJSONSchema" - } + "ServiceUnavailable" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" } } - ] + }, + "description" : "Service unavailable" }, - "PluginVersionDetails": { - "allOf": [ - { - "$ref": "#/components/schemas/PluginVersion" - }, - { - "type": "object", - "required": [ - "example_config" - ], - "properties": { - "example_config": { - "type": "string", - "description": "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format." - } + "MethodNotAllowed" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" } } - ] + }, + "description" : "Method not allowed" }, - "PluginVersionUpdate": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Description of what's new or changed in this version (supports markdown)", - "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" + "DockerError" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DockerError" + } + } + }, + "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry" + } + }, + "schemas" : { + "ImageURL" : { + "properties" : { + "upload_url" : { + "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", + "type" : "string" }, - "draft": { - "type": "boolean", - "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated." + "download_url" : { + "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", + "type" : "string" + } + }, + "required" : [ "download_url", "upload_url" ] + }, + "BasicError" : { + "additionalProperties" : false, + "description" : "Basic Error", + "properties" : { + "message" : { + "type" : "string" }, - "retracted": { - "type": "boolean", - "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." + "status" : { + "type" : "integer" + } + }, + "required" : [ "message", "status" ], + "title" : "Basic Error" + }, + "TeamName" : { + "description" : "The unique name for the team.", + "example" : "cloudquery", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginKind" : { + "description" : "The kind of plugin, ie. source or destination.", + "enum" : [ "source", "destination" ], + "example" : "source", + "type" : "string" + }, + "PluginName" : { + "description" : "The unique name for the plugin.", + "example" : "aws-source", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginNotificationRequestStatus" : { + "default" : "pending", + "description" : "Status of a plugin notification request", + "enum" : [ "pending", "sent" ], + "type" : "string" + }, + "PluginNotificationRequest" : { + "additionalProperties" : false, + "description" : "Plugin Notification Request", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" }, - "protocols": { - "$ref": "#/components/schemas/PluginProtocols" + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" }, - "supported_targets": { - "type": "array", - "items": { - "type": "string" - } + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" }, - "checksums": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The SHA-256 checksums of the plugin binaries, one per supported target." + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "package_type": { - "type": "string", - "description": "The package type of the plugin binaries" + "sent_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "spec_json_schema": { - "$ref": "#/components/schemas/PluginSpecJSONSchema" - } - } - }, - "PluginDocsPageName": { - "description": "The unique name for the plugin documentation page.", - "maxLength": 255, - "pattern": "^[\\w,\\s-]+$", - "type": "string", - "example": "overview" - }, - "PluginDocsPage": { - "additionalProperties": false, - "description": "CloudQuery Plugin Documentation Page", - "required": [ - "name", - "content" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/PluginDocsPageName" - }, - "content": { - "type": "string", - "description": "The content of the documentation page. Supports markdown.", - "example": "# Getting Started\n\nThis is the getting started page." - } - }, - "title": "CloudQuery Plugin Documentation Page", - "type": "object" - }, - "PluginDocsPageCreate": { - "additionalProperties": false, - "description": "CloudQuery Plugin Documentation Page", - "required": [ - "name", - "content" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/PluginDocsPageName" - }, - "content": { - "type": "string", - "minLength": 1, - "description": "The content of the documentation page. Supports markdown.", - "example": "# Getting Started\n\nThis is the getting started page." - } - }, - "title": "CloudQuery Plugin Documentation Page", - "type": "object" - }, - "PluginTableName": { - "description": "Name of the table", - "maxLength": 255, - "pattern": "^[a-z](_?[a-z0-9]+)+$", - "type": "string", - "example": "aws_ec2_instances" - }, - "PluginTable": { - "additionalProperties": false, - "description": "CloudQuery Plugin Table", - "required": [ - "description", - "is_incremental", - "name", - "relations", - "title" - ], - "properties": { - "description": { - "description": "Description of the table", - "type": "string", - "example": "AWS S3 Buckets" - }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" - }, - "name": { - "$ref": "#/components/schemas/PluginTableName" - }, - "parent": { - "description": "Name of the parent table, if any", - "type": "string", - "example": "nil" - }, - "relations": { - "description": "Names of the tables that depend on this table", - "items": { - "type": "string" - }, - "type": "array", - "example": [ - "aws_s3_bucket_cors_rules" - ] - }, - "title": { - "description": "Title of the table", - "type": "string", - "example": "AWS S3 Buckets" - }, - "is_paid": { - "description": "Whether the table is paid", - "type": "boolean" - } - }, - "title": "CloudQuery Plugin Table", - "type": "object" - }, - "PluginTableColumn": { - "additionalProperties": false, - "description": "CloudQuery Plugin Column", - "required": [ - "description", - "incremental_key", - "name", - "not_null", - "primary_key", - "type", - "unique" - ], - "properties": { - "description": { - "description": "Description of the column", - "type": "string" - }, - "incremental_key": { - "description": "Whether the column is used as an incremental key", - "type": "boolean" - }, - "name": { - "description": "Name of the column", - "type": "string" - }, - "not_null": { - "description": "Whether the column is nullable", - "type": "boolean" - }, - "primary_key": { - "description": "Whether the column is part of the primary key", - "type": "boolean" - }, - "type": { - "description": "Arrow Type of the column", - "type": "string" - }, - "unique": { - "description": "Whether the column has a unique constraint", - "type": "boolean" - } - }, - "title": "CloudQuery Plugin Table Column", - "type": "object" - }, - "PluginTableCreate": { - "additionalProperties": false, - "description": "CloudQuery Plugin Table", - "required": [ - "name" - ], - "properties": { - "description": { - "description": "Description of the table", - "type": "string", - "example": "AWS S3 Buckets" - }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" - }, - "name": { - "$ref": "#/components/schemas/PluginTableName" - }, - "parent": { - "description": "Name of the parent table, if any", - "type": "string", - "example": "nil" - }, - "relations": { - "description": "Names of the tables that depend on this table", - "items": { - "type": "string" - }, - "type": "array", - "example": [ - "aws_s3_bucket_cors_rules" - ] - }, - "title": { - "description": "Title of the table", - "type": "string", - "example": "AWS S3 Buckets" - }, - "is_paid": { - "description": "Whether the table is paid", - "type": "boolean" - }, - "columns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginTableColumn" - } + "status" : { + "$ref" : "#/components/schemas/PluginNotificationRequestStatus" } }, - "title": "CloudQuery Plugin Table", - "type": "object" - }, - "PluginTableDetails": { - "additionalProperties": false, - "required": [ - "columns", - "description", - "is_incremental", - "name", - "relations", - "title" - ], - "properties": { - "columns": { - "description": "List of columns", - "items": { - "$ref": "#/components/schemas/PluginTableColumn" - }, - "type": "array" - }, - "description": { - "description": "Description of the table", - "type": "string" - }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" - }, - "name": { - "description": "Name of the table", - "type": "string" - }, - "parent": { - "description": "Name of the parent table, if any", - "type": "string" - }, - "relations": { - "description": "Names of the tables that depend on this table", - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "description": "Title of the table", - "type": "string" - }, - "is_paid": { - "description": "Whether the table is paid", - "type": "boolean" - } - }, - "type": "object" - }, - "PluginAsset": { - "additionalProperties": false, - "description": "CloudQuery Plugin Asset", - "required": [ - "checksum", - "location" - ], - "properties": { - "checksum": { - "type": "string", - "description": "The checksum of the plugin asset" - }, - "location": { - "type": "string", - "format": "uri", - "description": "The location to download the plugin asset from" - } - }, - "title": "CloudQuery Plugin Asset", - "type": "object" - }, - "ReleaseURL": { - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" - } - } + "required" : [ "created_at", "plugin_kind", "plugin_name", "plugin_team" ] }, - "AddonName": { - "description": "The unique name for the addon.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "aws-policy" - }, - "AddonCategory": { - "description": "Supported categories for addons", - "type": "string", - "enum": [ - "cloud-infrastructure", - "databases", - "sales-marketing", - "engineering-analytics", - "other" - ] - }, - "AddonType": { - "description": "Supported types for addons", - "type": "string", - "enum": [ - "transformation", - "visualization" - ] - }, - "AddonFormat": { - "description": "Supported formats for addons", - "type": "string", - "enum": [ - "zip" - ] - }, - "AddonTier": { - "description": "Supported tiers for addons", - "type": "string", - "enum": [ - "free", - "paid" - ] - }, - "Addon": { - "additionalProperties": false, - "description": "CloudQuery Addon", - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "name": { - "$ref": "#/components/schemas/AddonName" - }, - "official": { - "description": "True if the addon is maintained by CloudQuery, false otherwise", - "type": "boolean" - }, - "category": { - "$ref": "#/components/schemas/AddonCategory" - }, - "addon_type": { - "$ref": "#/components/schemas/AddonType" - }, - "addon_format": { - "$ref": "#/components/schemas/AddonFormat" - }, - "tier": { - "$ref": "#/components/schemas/AddonTier" - }, - "price_usd": { - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price for 6 months", - "example": "50", - "x-go-name": "PriceUSD" - }, - "short_description": { - "type": "string", - "minLength": 1, - "maxLength": 512, - "example": "AWS Asset inventory dashboard for grafana" - }, - "display_name": { - "description": "The addon's display name", - "type": "string", - "minLength": 1, - "maxLength": 50, - "example": "AWS Asset inventory" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "logo": { - "type": "string", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "public": { - "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type": "boolean" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "updated_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "team_name", - "name", - "display_name", - "official", - "category", - "addon_type", - "addon_format", - "tier", - "price_usd", - "short_description", - "logo", - "created_at", - "updated_at" - ], - "title": "CloudQuery Addon", - "type": "object" - }, - "ListAddon": { - "allOf": [ - { - "$ref": "#/components/schemas/Addon" - }, - { - "type": "object", - "properties": { - "latest_version": { - "$ref": "#/components/schemas/VersionName" - } - } - } - ] - }, - "AddonCreate": { - "additionalProperties": false, - "description": "CloudQuery AddonCreate", - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "name": { - "$ref": "#/components/schemas/AddonName" - }, - "category": { - "$ref": "#/components/schemas/AddonCategory" - }, - "addon_type": { - "$ref": "#/components/schemas/AddonType" - }, - "addon_format": { - "$ref": "#/components/schemas/AddonFormat" - }, - "tier": { - "$ref": "#/components/schemas/AddonTier" - }, - "price_usd": { - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price for 6 months", - "example": "50", - "x-go-name": "PriceUSD" - }, - "short_description": { - "type": "string", - "minLength": 1, - "maxLength": 512, - "example": "AWS Asset inventory dashboard for grafana" - }, - "display_name": { - "description": "The addon's display name", - "type": "string", - "minLength": 1, - "maxLength": 50, - "example": "AWS Asset inventory" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "logo": { - "type": "string", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "public": { - "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type": "boolean" - } - }, - "required": [ - "team_name", - "name", - "category", - "addon_type", - "addon_format", - "tier", - "display_name", - "short_description", - "logo", - "public" - ], - "title": "CloudQuery Addon", - "type": "object" - }, - "AddonUpdate": { - "additionalProperties": false, - "description": "CloudQuery AddonUpdate", - "properties": { - "category": { - "$ref": "#/components/schemas/AddonCategory" - }, - "addon_format": { - "$ref": "#/components/schemas/AddonFormat" - }, - "tier": { - "$ref": "#/components/schemas/AddonTier" - }, - "price_usd": { - "type": "string", - "pattern": "^\\d+(?:\\.\\d{1,10})?$", - "description": "The price for 6 months in USD", - "example": "50", - "x-go-name": "PriceUSD" - }, - "short_description": { - "type": "string", - "minLength": 1, - "maxLength": 512, - "example": "AWS Asset inventory dashboard for grafana" - }, - "display_name": { - "description": "The addon's display name", - "type": "string", - "minLength": 1, - "maxLength": 50, - "example": "AWS Asset inventory" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "logo": { - "type": "string", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "public": { - "description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type": "boolean" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - } - }, - "title": "CloudQuery Addon", - "type": "object" - }, - "AddonVersion": { - "additionalProperties": false, - "description": "CloudQuery Addon Version", - "required": [ - "created_at", - "name", - "message", - "doc", - "draft", - "retracted", - "checksum" - ], - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the plugin version was created." - }, - "published_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the plugin version was set to non-draft (published)." - }, - "name": { - "$ref": "#/components/schemas/VersionName" - }, - "message": { - "type": "string", - "description": "Description of what's new or changed in this version (supports markdown)", - "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" - }, - "doc": { - "type": "string", - "description": "Main README in MD format" - }, - "draft": { - "type": "boolean", - "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version." - }, - "plugin_deps": { - "type": "array", - "items": { - "type": "string" - }, - "description": "list of plugins the addon depends on in the format of team_name/kind/name@version" - }, - "addon_deps": { - "type": "array", - "items": { - "type": "string" - }, - "description": "list of other addons this addon depends on in the format of team_name/type/name@version" - }, - "retracted": { - "type": "boolean", - "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." - }, - "checksum": { - "type": "string", - "description": "The checksum of the addon asset" - } - }, - "title": "CloudQuery Addon Version", - "type": "object" - }, - "AddonVersionUpdate": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Description of what's new or changed in this version (supports markdown)", - "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" - }, - "doc": { - "type": "string", - "description": "Main README in MD format" - }, - "draft": { - "type": "boolean", - "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version." - }, - "plugin_deps": { - "type": "array", - "items": { - "type": "string" - }, - "description": "list of plugins the addon depends on in the format of team_name/kind/name@version" - }, - "addon_deps": { - "type": "array", - "items": { - "type": "string" - }, - "description": "list of other addons this addon depends on in the format of team_name/type/name@version" - }, - "retracted": { - "type": "boolean", - "description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use." - }, - "checksum": { - "type": "string", - "description": "The checksum of the addon asset" + "ListMetadata" : { + "properties" : { + "total_count" : { + "type" : "integer" + }, + "last_page" : { + "type" : "integer" } } }, - "AddonAsset": { - "additionalProperties": false, - "description": "CloudQuery Addon Asset", - "required": [ - "checksum", - "location" - ], - "properties": { - "checksum": { - "type": "string", - "description": "The checksum of the addon asset" - }, - "location": { - "type": "string", - "format": "uri", - "description": "The location to download the addon asset from" - } - }, - "title": "CloudQuery Addon Asset", - "type": "object" - }, - "TeamPlan": { - "description": "The plan the team is on", - "type": "string", - "enum": [ - "free", - "paid", - "enterprise", - "trial" - ] - }, - "Team": { - "additionalProperties": false, - "description": "CloudQuery Team", - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/TeamName" - }, - "plan": { - "$ref": "#/components/schemas/TeamPlan" - }, - "plan_end_time": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "is_trial_active": { - "type": "boolean", - "example": false - }, - "trial_end_time": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "display_name": { - "description": "The team's display name", - "maxLength": 255, - "type": "string", - "example": "CloudQuery" - } - }, - "required": [ - "name", - "display_name", - "plan", - "is_trial_active" - ], - "title": "Team", - "type": "object" - }, - "TeamImageCreate": { - "type": "object", - "title": "Create Team Image Request", - "additionalProperties": false, - "required": [ - "name", - "checksum" - ], - "properties": { - "name": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "Name of image" - }, - "checksum": { - "type": "string", - "length": 40, - "pattern": "^[a-f0-9]+$", - "description": "SHA1 checksum of image" + "PluginNotificationRequestCreate" : { + "additionalProperties" : false, + "description" : "Create a Plugin Notification Request", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" } - } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] }, - "TeamImage": { - "required": [ - "url", - "name", - "checksum" - ], - "properties": { - "name": { - "type": "string", - "description": "Name of image" - }, - "checksum": { - "type": "string", - "description": "SHA1 checksum of image" - }, - "url": { - "type": "string", - "description": "URL to download image", - "x-go-name": "URL" - }, - "upload_url": { - "type": "string", - "description": "URL to upload image", - "x-go-name": "UploadURL" + "FieldError" : { + "allOf" : [ { + "$ref" : "#/components/schemas/BasicError" + }, { + "properties" : { + "errors" : { + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "field_errors" : { + "additionalProperties" : { + "type" : "string" + } + } + } + } ] + }, + "PluginCategory" : { + "description" : "Supported categories for plugins", + "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "other" ], + "type" : "string" + }, + "PluginPriceCategory" : { + "description" : "Supported price categories for billing", + "enum" : [ "api", "database", "free" ], + "type" : "string" + }, + "PluginReleaseStage" : { + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga" ], + "type" : "string" + }, + "PluginTier" : { + "deprecated" : true, + "description" : "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", + "enum" : [ "free", "paid", "open-core" ], + "type" : "string" + }, + "Plugin" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin", + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "category" : { + "$ref" : "#/components/schemas/PluginCategory" + }, + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "logo" : { + "example" : "https://images.cloudquery.io/logos/aws.png", + "type" : "string" + }, + "display_name" : { + "description" : "The plugin's display name", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "official" : { + "description" : "True if the plugin is maintained by CloudQuery, false otherwise", + "type" : "boolean" + }, + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStage" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "short_description" : { + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "tier" : { + "$ref" : "#/components/schemas/PluginTier" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Refer to `price_category` instead.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Refer to `price_category` instead.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "minimum_cloud_version" : { + "description" : "Minimum plugin version that is supported in CloudQuery managed syncs.", + "example" : "v1.2.3", + "maxLength" : 64, + "type" : "string" + } + }, + "required" : [ "category", "created_at", "display_name", "free_rows_per_month", "kind", "logo", "name", "official", "release_stage", "short_description", "team_name", "tier", "updated_at", "usd_per_row" ], + "title" : "CloudQuery Plugin" + }, + "VersionName" : { + "description" : "The version in semantic version format.", + "pattern" : "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", + "type" : "string" + }, + "ListPlugin" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Plugin" + }, { + "properties" : { + "latest_version" : { + "$ref" : "#/components/schemas/VersionName" + } + } + } ] + }, + "PluginReleaseStageCreate" : { + "default" : "coming-soon", + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga" ], + "type" : "string" + }, + "PluginCreate" : { + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "category" : { + "$ref" : "#/components/schemas/PluginCategory" + }, + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" + }, + "tier" : { + "$ref" : "#/components/schemas/PluginTier" + }, + "display_name" : { + "description" : "The plugin's display name, as shown in the CloudQuery Hub.", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "short_description" : { + "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.", + "example" : true, + "type" : "boolean" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStageCreate" + }, + "logo" : { + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", + "example" : "https://images.cloudquery.io/logos/aws.png", + "type" : "string" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Use `price_category` instead.", + "example" : "0.00001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Use `price_category` instead.", + "example" : 10000, + "format" : "int64", + "type" : "integer" + } + }, + "required" : [ "category", "display_name", "kind", "logo", "name", "public", "short_description", "team_name" ] + }, + "PluginReleaseStageUpdate" : { + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga" ], + "type" : "string" + }, + "PluginUpdate" : { + "properties" : { + "category" : { + "$ref" : "#/components/schemas/PluginCategory" + }, + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" + }, + "tier" : { + "$ref" : "#/components/schemas/PluginTier" + }, + "display_name" : { + "description" : "The plugin's display name, as shown in the CloudQuery Hub.", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "short_description" : { + "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", + "example" : "https://images.cloudquery.io/logos/aws.png", + "type" : "string" + }, + "public" : { + "description" : "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub.", + "type" : "boolean" + }, + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStageUpdate" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Update `price_category` instead.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Update `price_category` instead.", + "example" : 1000, + "format" : "int64", + "type" : "integer" } } }, - "AddonOrderID": { - "description": "ID of the addon order", - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "AddonOrderID" - }, - "AddonOrderStatus": { - "type": "string", - "enum": [ - "pending", - "completed", - "cancelled" - ] - }, - "AddonOrder": { - "additionalProperties": false, - "description": "CloudQuery Addon Order", - "properties": { - "id": { - "$ref": "#/components/schemas/AddonOrderID" - }, - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "addon_team": { - "$ref": "#/components/schemas/TeamName" - }, - "addon_type": { - "$ref": "#/components/schemas/AddonType" - }, - "addon_name": { - "$ref": "#/components/schemas/AddonName" - }, - "status": { - "$ref": "#/components/schemas/AddonOrderStatus" - }, - "created_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "completion_url": { - "type": "string", - "format": "uri", - "description": "Stripe URL for completing purchase. Only shown in response to POST request.", - "x-go-name": "CompletionURL" - } - }, - "required": [ - "id", - "team_name", - "addon_team", - "addon_type", - "addon_name", - "status", - "created_at", - "updated_at" - ], - "title": "CloudQuery Addon", - "type": "object" - }, - "AddonOrderCreate": { - "additionalProperties": false, - "description": "Create CloudQuery Addon Order", - "properties": { - "addon_team": { - "$ref": "#/components/schemas/TeamName" - }, - "addon_type": { - "$ref": "#/components/schemas/AddonType" - }, - "addon_name": { - "$ref": "#/components/schemas/AddonName" - }, - "success_url": { - "type": "string", - "description": "URL to redirect to after successful order completion", - "example": "https://cloud.cloudquery.io/order-completion" - }, - "cancel_url": { - "type": "string", - "description": "URL to redirect to after order cancellation", - "example": "https://cloud.cloudquery.io/order-cancelled" - } - }, - "required": [ - "addon_team", - "addon_type", - "addon_name", - "success_url", - "cancel_url" - ], - "title": "Create CloudQuery Addon Order", - "type": "object" - }, - "Email": { - "type": "string", - "example": "user@cloudquery.io", - "format": "email" - }, - "UserName": { - "description": "The unique name for the user.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "user" - }, - "User": { - "additionalProperties": false, - "description": "CloudQuery User", - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "ID of the User", - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "ID" - }, - "email": { - "$ref": "#/components/schemas/Email" - }, - "name": { - "$ref": "#/components/schemas/UserName" - }, - "updated_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "email" - ], - "title": "CloudQuery User", - "type": "object" - }, - "MembershipWithUser": { - "additionalProperties": false, - "properties": { - "role": { - "type": "string", - "example": "admin" - }, - "user": { - "$ref": "#/components/schemas/User" - } - }, - "required": [ - "role" - ], - "title": "CloudQuery User Membership", - "type": "object" - }, - "MonthlyLimit": { - "title": "CloudQuery Plugin Monthly Limit", - "description": "A configurable monthly limit for plugin usage.", - "type": "object", - "additionalProperties": false, - "required": [ - "created_at", - "updated_at", - "plugin_team", - "plugin_kind", - "plugin_name", - "usd" - ], - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the plugin limit was created." - }, - "updated_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the plugin limit was last updated." - }, - "plugin_team": { - "$ref": "#/components/schemas/TeamName" - }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" - }, - "usd": { - "example": 1000, - "type": "integer", - "minimum": 0, - "maximum": 1000000000, - "description": "The maximum USD amount the plugin is allowed to use within a calendar month.", - "x-go-name": "USD" + "PluginPrice" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Price", + "properties" : { + "id" : { + "description" : "ID of the price change", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" + }, + "usd_per_row" : { + "description" : "The price per row in USD. This is used to calculate the price of a sync.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "description" : "The number of rows that can be synced for free each month.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "effective_from" : { + "description" : "The date and time the price came (or will come) into effect.", + "example" : "2024-01-02T00:00:00Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "effective_from", "free_rows_per_month", "id", "usd_per_row" ], + "title" : "CloudQuery Plugin Price" + }, + "PluginPriceCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Price Create", + "properties" : { + "usd_per_row" : { + "description" : "The price per row in USD. This is used to calculate the price of a sync.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "description" : "The number of rows that can be synced for free each month.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "effective_from" : { + "description" : "The date and time the price came (or will come) into effect.", + "example" : "2024-01-02T00:00:00Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "effective_from", "free_rows_per_month", "usd_per_row" ], + "title" : "CloudQuery Plugin Price Create" + }, + "PluginProtocols" : { + "description" : "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", + "items" : { + "enum" : [ 3 ], + "type" : "integer" + }, + "type" : "array" + }, + "PluginPackageType" : { + "description" : "The package type of the plugin assets", + "enum" : [ "native", "docker" ], + "type" : "string" + }, + "PluginVersionBase" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Version", + "properties" : { + "created_at" : { + "description" : "The date and time the plugin version was created.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "published_at" : { + "description" : "The date and time the plugin version was set to non-draft (published).", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "name" : { + "$ref" : "#/components/schemas/VersionName" + }, + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for AWS S3 - Added support for AWS EC2", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" + }, + "supported_targets" : { + "description" : "The targets supported by this plugin version, formatted as _", + "example" : [ "linux_arm64", "darwin_amd64", "windows_amd64" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "checksums" : { + "description" : "The checksums of the plugin assets", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "package_type" : { + "$ref" : "#/components/schemas/PluginPackageType" } - } + }, + "required" : [ "checksums", "created_at", "draft", "message", "name", "package_type", "protocols", "retracted", "supported_targets" ], + "title" : "CloudQuery Plugin Version" }, - "MonthlyLimitCreate": { - "title": "CloudQuery Plugin Monthly Limit", - "description": "A configurable monthly limit for plugin usage.", - "type": "object", - "additionalProperties": false, - "required": [ - "plugin_team", - "plugin_kind", - "plugin_name", - "usd" - ], - "properties": { - "plugin_team": { - "$ref": "#/components/schemas/TeamName" - }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" - }, - "usd": { - "example": 1000, - "type": "integer", - "minimum": 0, - "maximum": 1000000000, - "description": "The maximum USD amount the plugin is allowed to use within a calendar month.", - "x-go-name": "USD" - } - } + "PluginVersionList" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersionBase" + } ] }, - "SpendingLimit": { - "title": "Team Spending Limit", - "description": "A configurable spending limit for the team. Empty values indicate no limit.", - "type": "object", - "additionalProperties": false, - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the team limit was created." - }, - "updated_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the team limit was last updated." - }, - "usd": { - "example": 1000, - "type": "integer", - "minimum": 0, - "maximum": 1000000000, - "description": "The maximum USD amount the team is allowed to use within a calendar month.", - "x-go-name": "USD" - } - } + "PluginSpecJSONSchema" : { + "description" : "The specification of the plugin. This is a JSON schema that describes the configuration of the plugin.", + "type" : "string" }, - "SpendingLimitUpdate": { - "title": "Team Spending Limit", - "description": "A configurable spending limit for the team.", - "type": "object", - "additionalProperties": false, - "required": [ - "usd" - ], - "properties": { - "usd": { - "example": 1000, - "type": "integer", - "minimum": 0, - "maximum": 1000000000, - "description": "The maximum USD amount the team is allowed to use within a calendar month.", - "x-go-name": "USD" + "PluginVersion" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersionBase" + }, { + "properties" : { + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" + } } - } + } ] }, - "SpendingLimitCreate": { - "title": "Team Spending Limit", - "description": "A configurable monthly limit for team usage.", - "type": "object", - "additionalProperties": false, - "required": [ - "usd" - ], - "properties": { - "usd": { - "example": 1000, - "type": "integer", - "minimum": 0, - "maximum": 1000000000, - "description": "The maximum USD amount the team is allowed to use within a calendar month.", - "x-go-name": "USD" - } - } + "PluginVersionDetails" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersion" + }, { + "properties" : { + "example_config" : { + "description" : "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format.", + "type" : "string" + } + }, + "required" : [ "example_config" ] + } ] }, - "MonthlyLimitUpdate": { - "title": "CloudQuery Plugin Monthly Limit", - "description": "A configurable monthly limit for plugin usage.", - "type": "object", - "additionalProperties": false, - "required": [ - "usd" - ], - "properties": { - "usd": { - "example": 1000, - "type": "integer", - "minimum": 0, - "maximum": 1000000000, - "description": "The maximum USD amount the plugin is allowed to use within a calendar month.", - "x-go-name": "USD" + "PluginVersionUpdate" : { + "properties" : { + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated.", + "type" : "boolean" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" + }, + "supported_targets" : { + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "checksums" : { + "description" : "The SHA-256 checksums of the plugin binaries, one per supported target.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "package_type" : { + "description" : "The package type of the plugin binaries", + "type" : "string" + }, + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" } } }, - "Invoice": { - "additionalProperties": false, - "title": "Invoice", - "description": "Invoice details", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "amount_due": { - "type": "integer", - "format": "int64", - "example": 1000, - "description": "Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due." - }, - "currency": { - "type": "string", - "example": "usd" - }, - "invoice_pdf": { - "type": "string", - "format": "uri", - "description": "The link to download the PDF for the invoice.", - "x-go-name": "InvoicePDF" - }, - "paid": { - "type": "boolean", - "example": true, - "description": "Whether or not payment was successfully collected for this invoice." - } - }, - "required": [ - "created_at", - "amount_due", - "currency", - "invoice_pdf", - "paid" - ], - "type": "object" - }, - "UsageCurrent": { - "title": "CloudQuery Plugin Usage", - "description": "The usage of a plugin within the current calendar month.", - "type": "object", - "additionalProperties": false, - "required": [ - "plugin_team", - "plugin_kind", - "plugin_name", - "usd", - "rows" - ], - "properties": { - "plugin_team": { - "$ref": "#/components/schemas/TeamName" - }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" - }, - "rows": { - "example": 1000000, - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "The number of rows used by the plugin in the calendar month." - }, - "usd": { - "deprecated": true, - "type": "string", - "example": "43.95", - "description": "The USD amount used by the plugin in the calendar month, rounded to two decimal places.", - "x-go-name": "USD" - }, - "remaining_usd": { - "deprecated": true, - "type": "string", - "example": "56.05", - "description": "The remaining USD amount in the plugin's quota for the calendar month.", - "x-go-name": "RemainingUSD" - }, - "remaining_rows": { - "deprecated": true, - "example": 1, - "type": "integer", - "format": "int64", - "minimum": 0, - "description": "Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows." + "PluginDocsPageName" : { + "description" : "The unique name for the plugin documentation page.", + "example" : "overview", + "maxLength" : 255, + "pattern" : "^[\\w,\\s-]+$", + "type" : "string" + }, + "PluginDocsPage" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Documentation Page", + "properties" : { + "name" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "content" : { + "description" : "The content of the documentation page. Supports markdown.", + "example" : "# Getting Started\n\nThis is the getting started page.", + "type" : "string" + } + }, + "required" : [ "content", "name" ], + "title" : "CloudQuery Plugin Documentation Page" + }, + "PluginDocsPageCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Documentation Page", + "properties" : { + "name" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "content" : { + "description" : "The content of the documentation page. Supports markdown.", + "example" : "# Getting Started\n\nThis is the getting started page.", + "minLength" : 1, + "type" : "string" + } + }, + "required" : [ "content", "name" ], + "title" : "CloudQuery Plugin Documentation Page" + }, + "PluginTableName" : { + "description" : "Name of the table", + "example" : "aws_ec2_instances", + "maxLength" : 255, + "pattern" : "^[a-z](_?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginTable" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Table", + "properties" : { + "description" : { + "description" : "Description of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" + }, + "name" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "example" : "nil", + "type" : "string" + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "example" : [ "aws_s3_bucket_cors_rules" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + } + }, + "required" : [ "description", "is_incremental", "name", "relations", "title" ], + "title" : "CloudQuery Plugin Table" + }, + "PluginTableColumn" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Column", + "properties" : { + "description" : { + "description" : "Description of the column", + "type" : "string" + }, + "incremental_key" : { + "description" : "Whether the column is used as an incremental key", + "type" : "boolean" + }, + "name" : { + "description" : "Name of the column", + "type" : "string" + }, + "not_null" : { + "description" : "Whether the column is nullable", + "type" : "boolean" + }, + "primary_key" : { + "description" : "Whether the column is part of the primary key", + "type" : "boolean" + }, + "type" : { + "description" : "Arrow Type of the column", + "type" : "string" + }, + "unique" : { + "description" : "Whether the column has a unique constraint", + "type" : "boolean" + } + }, + "required" : [ "description", "incremental_key", "name", "not_null", "primary_key", "type", "unique" ], + "title" : "CloudQuery Plugin Table Column" + }, + "PluginTableCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Table", + "properties" : { + "description" : { + "description" : "Description of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" + }, + "name" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "example" : "nil", + "type" : "string" + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "example" : [ "aws_s3_bucket_cors_rules" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + }, + "columns" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableColumn" + }, + "type" : "array" } - } + }, + "required" : [ "name" ], + "title" : "CloudQuery Plugin Table" }, - "UsageIncrease": { - "title": "CloudQuery Plugin Usage Increase", - "description": "Increase the usage of a plugin. This can incur billing costs and should be used only by plugins.", - "type": "object", - "additionalProperties": false, - "required": [ - "plugin_team", - "plugin_kind", - "plugin_name", - "rows", - "request_id" - ], - "properties": { - "plugin_team": { - "$ref": "#/components/schemas/TeamName" - }, - "plugin_kind": { - "$ref": "#/components/schemas/PluginKind" - }, - "plugin_name": { - "$ref": "#/components/schemas/PluginName" - }, - "tables": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "rows" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the table.", - "example": "my_table" - }, - "rows": { - "type": "integer", - "minimum": 0, - "description": "The additional rows used by the table.", - "example": 100 - } - } - } + "PluginTableDetails" : { + "additionalProperties" : false, + "properties" : { + "columns" : { + "description" : "List of columns", + "items" : { + "$ref" : "#/components/schemas/PluginTableColumn" + }, + "type" : "array" }, - "rows": { - "example": 1000000, - "type": "integer", - "minimum": 0, - "description": "The total number of additional rows used by the plugin." + "description" : { + "description" : "Description of the table", + "type" : "string" }, - "request_id": { - "type": "string", - "format": "uuid", - "description": "A unique ID associated with the usage increase.", - "example": "123e4567-e89b-12d3-a456-426614174000" - } - } + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" + }, + "name" : { + "description" : "Name of the table", + "type" : "string" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "type" : "string" + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + } + }, + "required" : [ "columns", "description", "is_incremental", "name", "relations", "title" ] + }, + "PluginAsset" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Asset", + "properties" : { + "checksum" : { + "description" : "The checksum of the plugin asset", + "type" : "string" + }, + "location" : { + "description" : "The location to download the plugin asset from", + "format" : "uri", + "type" : "string" + } + }, + "required" : [ "checksum", "location" ], + "title" : "CloudQuery Plugin Asset" + }, + "ReleaseURL" : { + "properties" : { + "url" : { + "type" : "string" + } + }, + "required" : [ "url" ] }, - "UsageSummaryGroup": { - "title": "CloudQuery Usage Summary Group", - "description": "A usage summary group.", - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the group.", - "example": "plugin" - }, - "value": { - "type": "string", - "description": "The value of the group at this index.", - "example": "cloudquery/source/aws" - } - } + "AddonName" : { + "description" : "The unique name for the addon.", + "example" : "aws-policy", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "AddonCategory" : { + "description" : "Supported categories for addons", + "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "other" ], + "type" : "string" }, - "UsageSummaryValue": { - "title": "CloudQuery Usage Summary Value", - "description": "A usage summary value.", - "type": "object", - "required": [ - "timestamp" - ], - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "description": "The timestamp marking the start of a period." - }, - "paid_rows": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "The paid rows that were synced in this period, one per group." - }, - "cloud_vcpu_seconds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "vCPU/seconds consumed in this period, one per group." - }, - "cloud_vram_byte_seconds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "vRAM/byte-seconds consumed in this period, one per group." - }, - "cloud_egress_bytes": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "Egress bytes consumed in this period, one per group." - } - } + "AddonType" : { + "description" : "Supported types for addons", + "enum" : [ "transformation", "visualization" ], + "type" : "string" }, - "UsageSummary": { - "title": "CloudQuery Usage Summary", - "description": "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", - "type": "object", - "additionalProperties": false, - "required": [ - "groups", - "values", - "metadata" - ], - "properties": { - "groups": { - "type": "array", - "description": "The groups of the usage summary. Every group will have a corresponding value at the same index in the values array.", - "items": { - "$ref": "#/components/schemas/UsageSummaryGroup" - }, - "example": [ - { - "name": "plugin", - "value": "cloudquery/source/aws" - }, - { - "name": "plugin", - "value": "cloudquery/source/gcp" - } - ] - }, - "values": { - "items": { - "$ref": "#/components/schemas/UsageSummaryValue" - }, - "type": "array", - "example": [ - { - "timestamp": "2021-01-01T00:00:00Z", - "paid_rows": [ - 100, - 200 - ] - }, - { - "timestamp": "2021-01-02T00:00:00Z", - "paid_rows": [ - 150, - 300 - ] - } - ] - }, - "metadata": { - "type": "object", - "description": "Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details.", - "required": [ - "start", - "end", - "aggregation_period", - "metrics" - ], - "additionalProperties": false, - "properties": { - "start": { - "type": "string", - "format": "date-time", - "description": "The inclusive start of the query time range." - }, - "end": { - "type": "string", - "format": "date-time", - "description": "The exclusive end of the query time range." - }, - "aggregation_period": { - "type": "string", - "description": "The aggregation period to sum data over. In other words, data will be returned at this granularity.", - "enum": [ - "day", - "month" - ] - }, - "metrics": { - "type": "array", - "description": "List of metrics included in the response.", - "items": { - "type": "string", - "enum": [ - "paid_rows", - "cloud_egress_bytes", - "cloud_vcpu_seconds", - "cloud_vram_byte_seconds" - ] - }, - "default": [ - "paid_rows" - ] - } - } + "AddonFormat" : { + "description" : "Supported formats for addons", + "enum" : [ "zip" ], + "type" : "string" + }, + "AddonTier" : { + "description" : "Supported tiers for addons", + "enum" : [ "free", "paid" ], + "type" : "string" + }, + "Addon" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon", + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "official" : { + "description" : "True if the addon is maintained by CloudQuery, false otherwise", + "type" : "boolean" + }, + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "example" : "https://images.cloudquery.io/logos/aws.png", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "addon_format", "addon_type", "category", "created_at", "display_name", "logo", "name", "official", "price_usd", "short_description", "team_name", "tier", "updated_at" ], + "title" : "CloudQuery Addon" + }, + "ListAddon" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Addon" + }, { + "properties" : { + "latest_version" : { + "$ref" : "#/components/schemas/VersionName" + } + } + } ] + }, + "AddonCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery AddonCreate", + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "example" : "https://images.cloudquery.io/logos/aws.png", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + } + }, + "required" : [ "addon_format", "addon_type", "category", "display_name", "logo", "name", "public", "short_description", "team_name", "tier" ], + "title" : "CloudQuery Addon" + }, + "AddonUpdate" : { + "additionalProperties" : false, + "description" : "CloudQuery AddonUpdate", + "properties" : { + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months in USD", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "example" : "https://images.cloudquery.io/logos/aws.png", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "title" : "CloudQuery Addon" + }, + "AddonVersion" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Version", + "properties" : { + "created_at" : { + "description" : "The date and time the plugin version was created.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "published_at" : { + "description" : "The date and time the plugin version was set to non-draft (published).", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "name" : { + "$ref" : "#/components/schemas/VersionName" + }, + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", + "type" : "string" + }, + "doc" : { + "description" : "Main README in MD format", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "plugin_deps" : { + "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "addon_deps" : { + "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" } - } + }, + "required" : [ "checksum", "created_at", "doc", "draft", "message", "name", "retracted" ], + "title" : "CloudQuery Addon Version" }, - "PriceCategorySpend": { - "title": "Spend by price category", - "description": "Spend by price category for a defined period.", - "type": "object", - "additionalProperties": false, - "required": [ - "category", - "total" - ], - "properties": { - "category": { - "$ref": "#/components/schemas/PluginPriceCategory" - }, - "total": { - "type": "string" + "AddonVersionUpdate" : { + "properties" : { + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", + "type" : "string" + }, + "doc" : { + "description" : "Main README in MD format", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "plugin_deps" : { + "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "addon_deps" : { + "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" } } }, - "SpendSummaryValue": { - "title": "CloudQuery Spend Summary Value", - "description": "A spend summary value.", - "type": "object", - "additionalProperties": false, - "required": [ - "date", - "by_category", - "total" - ], - "properties": { - "date": { - "type": "string", - "format": "date-time", - "description": "The timestamp for the spend summary." - }, - "by_category": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PriceCategorySpend" - } + "AddonAsset" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Asset", + "properties" : { + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" + }, + "location" : { + "description" : "The location to download the addon asset from", + "format" : "uri", + "type" : "string" + } + }, + "required" : [ "checksum", "location" ], + "title" : "CloudQuery Addon Asset" + }, + "TeamPlan" : { + "description" : "The plan the team is on", + "enum" : [ "free", "paid", "enterprise", "trial" ], + "type" : "string" + }, + "Team" : { + "additionalProperties" : false, + "description" : "CloudQuery Team", + "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "plan_end_time" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "is_trial_active" : { + "example" : false, + "type" : "boolean" + }, + "trial_end_time" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "display_name" : { + "description" : "The team's display name", + "example" : "CloudQuery", + "maxLength" : 255, + "type" : "string" + } + }, + "required" : [ "display_name", "is_trial_active", "name", "plan" ], + "title" : "Team" + }, + "TeamImageCreate" : { + "additionalProperties" : false, + "properties" : { + "name" : { + "description" : "Name of image", + "maxLength" : 64, + "minLength" : 1, + "type" : "string" + }, + "checksum" : { + "description" : "SHA1 checksum of image", + "pattern" : "^[a-f0-9]+$", + "type" : "string", + "length" : 40 + } + }, + "required" : [ "checksum", "name" ], + "title" : "Create Team Image Request" + }, + "TeamImage" : { + "properties" : { + "name" : { + "description" : "Name of image", + "type" : "string" + }, + "checksum" : { + "description" : "SHA1 checksum of image", + "type" : "string" + }, + "url" : { + "description" : "URL to download image", + "type" : "string", + "x-go-name" : "URL" + }, + "upload_url" : { + "description" : "URL to upload image", + "type" : "string", + "x-go-name" : "UploadURL" + } + }, + "required" : [ "checksum", "name", "url" ] + }, + "AddonOrderID" : { + "description" : "ID of the addon order", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "AddonOrderID" + }, + "AddonOrderStatus" : { + "enum" : [ "pending", "completed", "cancelled" ], + "type" : "string" + }, + "AddonOrder" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Order", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/AddonOrderID" + }, + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "addon_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "status" : { + "$ref" : "#/components/schemas/AddonOrderStatus" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completed_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completion_url" : { + "description" : "Stripe URL for completing purchase. Only shown in response to POST request.", + "format" : "uri", + "type" : "string", + "x-go-name" : "CompletionURL" + } + }, + "required" : [ "addon_name", "addon_team", "addon_type", "created_at", "id", "status", "team_name", "updated_at" ], + "title" : "CloudQuery Addon" + }, + "AddonOrderCreate" : { + "additionalProperties" : false, + "description" : "Create CloudQuery Addon Order", + "properties" : { + "addon_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "success_url" : { + "description" : "URL to redirect to after successful order completion", + "example" : "https://cloud.cloudquery.io/order-completion", + "type" : "string" + }, + "cancel_url" : { + "description" : "URL to redirect to after order cancellation", + "example" : "https://cloud.cloudquery.io/order-cancelled", + "type" : "string" + } + }, + "required" : [ "addon_name", "addon_team", "addon_type", "cancel_url", "success_url" ], + "title" : "Create CloudQuery Addon Order" + }, + "Email" : { + "example" : "user@cloudquery.io", + "format" : "email", + "type" : "string" + }, + "UserName" : { + "description" : "The unique name for the user.", + "example" : "user", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "User" : { + "additionalProperties" : false, + "description" : "CloudQuery User", + "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "id" : { + "description" : "ID of the User", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" + }, + "email" : { + "$ref" : "#/components/schemas/Email" + }, + "name" : { + "$ref" : "#/components/schemas/UserName" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "email", "id" ], + "title" : "CloudQuery User" + }, + "MembershipWithUser" : { + "additionalProperties" : false, + "properties" : { + "role" : { + "example" : "admin", + "type" : "string" + }, + "user" : { + "$ref" : "#/components/schemas/User" + } + }, + "required" : [ "role" ], + "title" : "CloudQuery User Membership" + }, + "MonthlyLimit" : { + "additionalProperties" : false, + "description" : "A configurable monthly limit for plugin usage.", + "properties" : { + "created_at" : { + "description" : "The date and time the plugin limit was created.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "description" : "The date and time the plugin limit was last updated.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "usd" : { + "description" : "The maximum USD amount the plugin is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" + } + }, + "required" : [ "created_at", "plugin_kind", "plugin_name", "plugin_team", "updated_at", "usd" ], + "title" : "CloudQuery Plugin Monthly Limit" + }, + "MonthlyLimitCreate" : { + "additionalProperties" : false, + "description" : "A configurable monthly limit for plugin usage.", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "usd" : { + "description" : "The maximum USD amount the plugin is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team", "usd" ], + "title" : "CloudQuery Plugin Monthly Limit" + }, + "SpendingLimit" : { + "additionalProperties" : false, + "description" : "A configurable spending limit for the team. Empty values indicate no limit.", + "properties" : { + "created_at" : { + "description" : "The date and time the team limit was created.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "description" : "The date and time the team limit was last updated.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "usd" : { + "description" : "The maximum USD amount the team is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" + } + }, + "title" : "Team Spending Limit" + }, + "SpendingLimitUpdate" : { + "additionalProperties" : false, + "description" : "A configurable spending limit for the team.", + "properties" : { + "usd" : { + "description" : "The maximum USD amount the team is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" + } + }, + "required" : [ "usd" ], + "title" : "Team Spending Limit" + }, + "SpendingLimitCreate" : { + "additionalProperties" : false, + "description" : "A configurable monthly limit for team usage.", + "properties" : { + "usd" : { + "description" : "The maximum USD amount the team is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" + } + }, + "required" : [ "usd" ], + "title" : "Team Spending Limit" + }, + "MonthlyLimitUpdate" : { + "additionalProperties" : false, + "description" : "A configurable monthly limit for plugin usage.", + "properties" : { + "usd" : { + "description" : "The maximum USD amount the plugin is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" + } + }, + "required" : [ "usd" ], + "title" : "CloudQuery Plugin Monthly Limit" + }, + "Invoice" : { + "additionalProperties" : false, + "description" : "Invoice details", + "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "amount_due" : { + "description" : "Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "currency" : { + "example" : "usd", + "type" : "string" + }, + "invoice_pdf" : { + "description" : "The link to download the PDF for the invoice.", + "format" : "uri", + "type" : "string", + "x-go-name" : "InvoicePDF" + }, + "paid" : { + "description" : "Whether or not payment was successfully collected for this invoice.", + "example" : true, + "type" : "boolean" + } + }, + "required" : [ "amount_due", "created_at", "currency", "invoice_pdf", "paid" ], + "title" : "Invoice" + }, + "UsageCurrent" : { + "additionalProperties" : false, + "description" : "The usage of a plugin within the current calendar month.", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "rows" : { + "description" : "The number of rows used by the plugin in the calendar month.", + "example" : 1000000, + "format" : "int64", + "minimum" : 0, + "type" : "integer" + }, + "usd" : { + "deprecated" : true, + "description" : "The USD amount used by the plugin in the calendar month, rounded to two decimal places.", + "example" : "43.95", + "type" : "string", + "x-go-name" : "USD" + }, + "remaining_usd" : { + "deprecated" : true, + "description" : "The remaining USD amount in the plugin's quota for the calendar month.", + "example" : "56.05", + "type" : "string", + "x-go-name" : "RemainingUSD" + }, + "remaining_rows" : { + "deprecated" : true, + "description" : "Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows.", + "example" : 1, + "format" : "int64", + "minimum" : 0, + "type" : "integer" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team", "rows", "usd" ], + "title" : "CloudQuery Plugin Usage" + }, + "UsageIncrease" : { + "additionalProperties" : false, + "description" : "Increase the usage of a plugin. This can incur billing costs and should be used only by plugins.", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "tables" : { + "items" : { + "$ref" : "#/components/schemas/UsageIncrease_tables_inner" + }, + "type" : "array" + }, + "rows" : { + "description" : "The total number of additional rows used by the plugin.", + "example" : 1000000, + "minimum" : 0, + "type" : "integer" + }, + "request_id" : { + "description" : "A unique ID associated with the usage increase.", + "example" : "123e4567-e89b-12d3-a456-426614174000", + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team", "request_id", "rows" ], + "title" : "CloudQuery Plugin Usage Increase" + }, + "UsageSummaryGroup" : { + "description" : "A usage summary group.", + "properties" : { + "name" : { + "description" : "The name of the group.", + "example" : "plugin", + "type" : "string" + }, + "value" : { + "description" : "The value of the group at this index.", + "example" : "cloudquery/source/aws", + "type" : "string" + } + }, + "required" : [ "name", "value" ], + "title" : "CloudQuery Usage Summary Group" + }, + "UsageSummaryValue" : { + "description" : "A usage summary value.", + "properties" : { + "timestamp" : { + "description" : "The timestamp marking the start of a period.", + "format" : "date-time", + "type" : "string" + }, + "paid_rows" : { + "description" : "The paid rows that were synced in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" + }, + "cloud_vcpu_seconds" : { + "description" : "vCPU/seconds consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" + }, + "cloud_vram_byte_seconds" : { + "description" : "vRAM/byte-seconds consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" }, - "total": { - "type": "string", - "description": "Total spend for the period in USD." + "cloud_egress_bytes" : { + "description" : "Egress bytes consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" } - } + }, + "required" : [ "timestamp" ], + "title" : "CloudQuery Usage Summary Value" }, - "SpendSummary": { - "title": "CloudQuery Spend Summary", - "description": "A spend summary for a team, summarizing the spend by each price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", - "type": "object", - "additionalProperties": false, - "required": [ - "values", - "metadata" - ], - "properties": { - "values": { - "items": { - "$ref": "#/components/schemas/SpendSummaryValue" - }, - "type": "array" - }, - "metadata": { - "type": "object", - "description": "Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details.", - "required": [ - "start", - "end" - ], - "additionalProperties": false, - "properties": { - "start": { - "type": "string", - "format": "date-time", - "description": "The inclusive start of the query time range." - }, - "end": { - "type": "string", - "format": "date-time", - "description": "The exclusive end of the query time range." - } - } + "UsageSummary" : { + "additionalProperties" : false, + "description" : "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "properties" : { + "groups" : { }, + "values" : { }, + "metadata" : { + "$ref" : "#/components/schemas/UsageSummary_metadata" } - } + }, + "required" : [ "groups", "metadata", "values" ], + "title" : "CloudQuery Usage Summary" }, - "Invitation": { - "additionalProperties": false, - "required": [ - "role", - "email", - "team_name", - "created_at" - ], - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "email": { - "$ref": "#/components/schemas/Email" - }, - "role": { - "type": "string", - "example": "admin" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" + "PriceCategorySpend" : { + "additionalProperties" : false, + "description" : "Spend by price category for a defined period.", + "properties" : { + "category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" + }, + "total" : { + "type" : "string" } - } + }, + "required" : [ "category", "total" ], + "title" : "Spend by price category" }, - "MembershipWithTeam": { - "additionalProperties": false, - "properties": { - "role": { - "type": "string", - "example": "admin" - }, - "team": { - "$ref": "#/components/schemas/Team" - } - }, - "required": [ - "role" - ], - "title": "CloudQuery Team Membership", - "type": "object" - }, - "TeamSubscriptionOrderID": { - "description": "ID of the team subscription order", - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "TeamSubscriptionOrderID" - }, - "TeamSubscriptionOrderStatus": { - "type": "string", - "enum": [ - "pending", - "completed", - "cancelled" - ] - }, - "TeamSubscriptionOrder": { - "additionalProperties": false, - "title": "Team subscription order", - "description": "Team subscription order", - "properties": { - "id": { - "$ref": "#/components/schemas/TeamSubscriptionOrderID" - }, - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "plan": { - "$ref": "#/components/schemas/TeamPlan" - }, - "status": { - "$ref": "#/components/schemas/TeamSubscriptionOrderStatus" - }, - "created_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "completed_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "completion_url": { - "type": "string", - "format": "uri", - "description": "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", - "x-go-name": "CompletionURL" - } - }, - "required": [ - "id", - "team_name", - "plan", - "status", - "created_at", - "updated_at" - ], - "type": "object" - }, - "TeamSubscriptionOrderCreate": { - "additionalProperties": false, - "description": "Create team subscription order", - "properties": { - "plan": { - "$ref": "#/components/schemas/TeamPlan" - }, - "success_url": { - "type": "string", - "description": "URL to redirect to after successful order completion", - "example": "https://cloud.cloudquery.io/order-completion" - }, - "cancel_url": { - "type": "string", - "description": "URL to redirect to after order cancellation", - "example": "https://cloud.cloudquery.io/order-cancelled" - } - }, - "required": [ - "plan", - "success_url", - "cancel_url" - ], - "title": "Create team subscription order", - "type": "object" - }, - "InvitationWithToken": { - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/components/schemas/Invitation" - }, - { - "type": "object", - "properties": { - "token": { - "type": "string", - "format": "uuid", - "description": "The token used to accept the invitation" - } - }, - "required": [ - "token" - ] - } - ] - }, - "UserID": { - "description": "ID of the User", - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "UserID" - }, - "APIKeyName": { - "description": "Name of the API key", - "type": "string", - "example": "cli-api-key", - "maxLength": 255, - "minLength": 1, - "pattern": "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$" - }, - "APIKeyID": { - "description": "ID of the API key", - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "APIKeyID" - }, - "APIKeyScope": { - "description": "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", - "type": "string", - "enum": [ - "read-and-write" - ] - }, - "APIKey": { - "description": "API Key to interact with CloudQuery Cloud under specific team", - "type": "object", - "required": [ - "id", - "name", - "scope", - "expires_at", - "expired" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/APIKeyName" - }, - "created_by": { - "$ref": "#/components/schemas/Email", - "description": "email of the user that created the API key" - }, - "id": { - "$ref": "#/components/schemas/APIKeyID" - }, - "key": { - "type": "string", - "description": "API key. Will be shown only in the response when creating the key.", - "example": "1234567890abcdef1234567890abcdef" - }, - "created_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "expires_at": { - "type": "string", - "description": "Timestamp at which API key will stop working", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" - }, - "expired": { - "type": "boolean", - "description": "Whether the API key has expired or not", - "example": false - }, - "scope": { - "$ref": "#/components/schemas/APIKeyScope" + "SpendSummaryValue" : { + "additionalProperties" : false, + "description" : "A spend summary value.", + "properties" : { + "date" : { + "description" : "The timestamp for the spend summary.", + "format" : "date-time", + "type" : "string" + }, + "by_category" : { + "items" : { + "$ref" : "#/components/schemas/PriceCategorySpend" + }, + "type" : "array" + }, + "total" : { + "description" : "Total spend for the period in USD.", + "type" : "string" } - } + }, + "required" : [ "by_category", "date", "total" ], + "title" : "CloudQuery Spend Summary Value" }, - "RegistryAuthToken": { - "type": "object", - "description": "JWT token for the image registry", - "additionalProperties": false, - "properties": { - "access_token": { - "type": "string" - }, - "token": { - "type": "string" - } - }, - "required": [ - "access_token", - "token" - ] - }, - "DockerError": { - "additionalProperties": false, - "description": "Error Returned from the Docker Authorization Handler to the Docker Registry", - "required": [ - "details" - ], - "properties": { - "details": { - "type": "string" - } - }, - "title": "Docker Error", - "type": "object" - }, - "SyncPluginPath": { - "type": "string", - "description": "Plugin path in CloudQuery registry", - "pattern": "^cloudquery/[^/]+" - }, - "SyncEnvCreate": { - "type": "object", - "description": "Environment variable. Environment variables are assumed to be secret.", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the environment variable" - }, - "value": { - "type": "string", - "description": "Value of the environment variable" + "SpendSummary" : { + "additionalProperties" : false, + "description" : "A spend summary for a team, summarizing the spend by each price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "properties" : { + "values" : { }, + "metadata" : { + "$ref" : "#/components/schemas/SpendSummary_metadata" } - } + }, + "required" : [ "metadata", "values" ], + "title" : "CloudQuery Spend Summary" }, - "SyncLastUpdateSource": { - "description": "How was the source or destination been created or updated last", - "type": "string", - "enum": [ - "yaml", - "ui" - ] - }, - "SyncSourceCreate": { - "title": "Sync Source definition for creating a new source", - "description": "Sync Source Definition", - "type": "object", - "required": [ - "name", - "path", - "version", - "tables" - ], - "properties": { - "name": { - "type": "string", - "example": "my-source-definition", - "description": "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "path": { - "$ref": "#/components/schemas/SyncPluginPath", - "example": "cloudquery/aws" - }, - "version": { - "type": "string", - "description": "Version of the plugin", - "example": "v1.2.3" - }, - "tables": { - "type": "array", - "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", - "items": { - "type": "string" - } + "Invitation" : { + "additionalProperties" : false, + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" }, - "skip_tables": { - "type": "array", - "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", - "items": { - "type": "string" - } + "email" : { + "$ref" : "#/components/schemas/Email" }, - "spec": { - "type": "object", - "additionalProperties": true, - "format": "Plugin parameters, specific to each plugin" + "role" : { + "example" : "admin", + "type" : "string" }, - "env": { - "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SyncEnvCreate" - } + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "created_at", "email", "role", "team_name" ] + }, + "MembershipWithTeam" : { + "additionalProperties" : false, + "properties" : { + "role" : { + "example" : "admin", + "type" : "string" }, - "last_update_source": { - "$ref": "#/components/schemas/SyncLastUpdateSource" + "team" : { + "$ref" : "#/components/schemas/Team" } - } + }, + "required" : [ "role" ], + "title" : "CloudQuery Team Membership" + }, + "TeamSubscriptionOrderID" : { + "description" : "ID of the team subscription order", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "TeamSubscriptionOrderID" + }, + "TeamSubscriptionOrderStatus" : { + "enum" : [ "pending", "completed", "cancelled" ], + "type" : "string" + }, + "TeamSubscriptionOrder" : { + "additionalProperties" : false, + "description" : "Team subscription order", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + }, + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "status" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderStatus" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completed_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completion_url" : { + "description" : "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", + "format" : "uri", + "type" : "string", + "x-go-name" : "CompletionURL" + } + }, + "required" : [ "created_at", "id", "plan", "status", "team_name", "updated_at" ], + "title" : "Team subscription order" + }, + "TeamSubscriptionOrderCreate" : { + "additionalProperties" : false, + "description" : "Create team subscription order", + "properties" : { + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "success_url" : { + "description" : "URL to redirect to after successful order completion", + "example" : "https://cloud.cloudquery.io/order-completion", + "type" : "string" + }, + "cancel_url" : { + "description" : "URL to redirect to after order cancellation", + "example" : "https://cloud.cloudquery.io/order-cancelled", + "type" : "string" + } + }, + "required" : [ "cancel_url", "plan", "success_url" ], + "title" : "Create team subscription order" + }, + "InvitationWithToken" : { + "additionalProperties" : false, + "allOf" : [ { + "$ref" : "#/components/schemas/Invitation" + }, { + "properties" : { + "token" : { + "description" : "The token used to accept the invitation", + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "token" ] + } ] + }, + "UserID" : { + "description" : "ID of the User", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "UserID" + }, + "APIKeyName" : { + "description" : "Name of the API key", + "example" : "cli-api-key", + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$", + "type" : "string" + }, + "APIKeyID" : { + "description" : "ID of the API key", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "APIKeyID" + }, + "APIKeyScope" : { + "description" : "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", + "enum" : [ "read-and-write" ], + "type" : "string" + }, + "APIKey" : { + "description" : "API Key to interact with CloudQuery Cloud under specific team", + "properties" : { + "name" : { + "$ref" : "#/components/schemas/APIKeyName" + }, + "created_by" : { + "$ref" : "#/components/schemas/Email" + }, + "id" : { + "$ref" : "#/components/schemas/APIKeyID" + }, + "key" : { + "description" : "API key. Will be shown only in the response when creating the key.", + "example" : "1234567890abcdef1234567890abcdef", + "type" : "string" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "expires_at" : { + "description" : "Timestamp at which API key will stop working", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "expired" : { + "description" : "Whether the API key has expired or not", + "example" : false, + "type" : "boolean" + }, + "scope" : { + "$ref" : "#/components/schemas/APIKeyScope" + } + }, + "required" : [ "expired", "expires_at", "id", "name", "scope" ] + }, + "RegistryAuthToken" : { + "additionalProperties" : false, + "description" : "JWT token for the image registry", + "properties" : { + "access_token" : { + "type" : "string" + }, + "token" : { + "type" : "string" + } + }, + "required" : [ "access_token", "token" ] + }, + "DockerError" : { + "additionalProperties" : false, + "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry", + "properties" : { + "details" : { + "type" : "string" + } + }, + "required" : [ "details" ], + "title" : "Docker Error" + }, + "SyncPluginPath" : { + "description" : "Plugin path in CloudQuery registry", + "pattern" : "^cloudquery/[^/]+", + "type" : "string" + }, + "SyncEnvCreate" : { + "description" : "Environment variable. Environment variables are assumed to be secret.", + "properties" : { + "name" : { + "description" : "Name of the environment variable", + "type" : "string" + }, + "value" : { + "description" : "Value of the environment variable", + "type" : "string" + } + }, + "required" : [ "name", "value" ] + }, + "SyncLastUpdateSource" : { + "description" : "How was the source or destination been created or updated last", + "enum" : [ "yaml", "ui" ], + "type" : "string" + }, + "SyncSourceCreate" : { + "description" : "Sync Source Definition", + "properties" : { + "name" : { + "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-source-definition", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", + "type" : "string" + }, + "tables" : { + "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "skip_tables" : { + "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "required" : [ "name", "path", "tables", "version" ], + "title" : "Sync Source definition for creating a new source" }, - "SyncEnv": { - "type": "object", - "description": "Environment variable. Environment variables are assumed to be secret.", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the environment variable" + "SyncEnv" : { + "description" : "Environment variable. Environment variables are assumed to be secret.", + "properties" : { + "name" : { + "description" : "Name of the environment variable", + "type" : "string" } - } + }, + "required" : [ "name" ] }, - "SyncSource": { - "allOf": [ - { - "$ref": "#/components/schemas/SyncSourceCreate" - }, - { - "type": "object", - "required": [ - "name", - "path", - "version", - "tables", - "skip_tables", - "spec", - "env", - "created_at", - "updated_at", - "last_update_source" - ], - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "example": "2023-07-14T16:53:42Z", - "description": "Time when the source was created" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "example": "2023-07-14T16:53:42Z", - "description": "Time when the source was last updated" + "SyncSource" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SyncSourceCreate" + }, { + "properties" : { + "created_at" : { + "description" : "Time when the source was created", + "example" : "2023-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "description" : "Time when the source was last updated", + "example" : "2023-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "env" : { + "description" : "Environment variables for the plugin.", + "items" : { + "$ref" : "#/components/schemas/SyncEnv" }, - "env": { - "description": "Environment variables for the plugin.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SyncEnv" - } - } - } - } - ] - }, - "SyncTestConnectionID": { - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "description": "unique ID of the test connection", - "x-go-name": "ID" - }, - "SyncTestConnectionStatus": { - "description": "The status of the sync run", - "type": "string", - "enum": [ - "completed", - "failed", - "started", - "created" - ] - }, - "SyncTestConnection": { - "type": "object", - "required": [ - "id", - "created_at", - "status" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/SyncTestConnectionID" - }, - "status": { - "$ref": "#/components/schemas/SyncTestConnectionStatus", - "description": "Status of the sync test connection" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "Whether the sync is disabled" - }, - "completed_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "Cron schedule for the sync" + "type" : "array" + } + }, + "required" : [ "created_at", "env", "updated_at" ] + } ] + }, + "SyncTestConnectionID" : { + "description" : "unique ID of the test connection", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" + }, + "SyncTestConnectionStatus" : { + "description" : "The status of the sync run", + "enum" : [ "completed", "failed", "started", "created" ], + "type" : "string" + }, + "SyncTestConnection" : { + "properties" : { + "id" : { + "$ref" : "#/components/schemas/SyncTestConnectionID" + }, + "status" : { + "$ref" : "#/components/schemas/SyncTestConnectionStatus" + }, + "created_at" : { + "description" : "Whether the sync is disabled", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completed_at" : { + "description" : "Cron schedule for the sync", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "created_at", "id", "status" ] + }, + "SyncSourceUpdate" : { + "description" : "Sync Source Update Definition", + "properties" : { + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", + "type" : "string" + }, + "tables" : { + "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "skip_tables" : { + "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "title" : "Sync Source definition for creating a new source" + }, + "SyncDestinationWriteMode" : { + "default" : "overwrite-delete-stale", + "description" : "Write mode for the destination", + "enum" : [ "append", "overwrite", "overwrite-delete-stale" ], + "type" : "string" + }, + "SyncDestinationMigrateMode" : { + "default" : "safe", + "description" : "Migrate mode for the destination", + "enum" : [ "safe", "forced" ], + "type" : "string" + }, + "SyncDestinationCreate" : { + "description" : "Sync Destination Definition", + "properties" : { + "name" : { + "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-destination-definition", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", + "type" : "string" + }, + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" + }, + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" } - } + }, + "required" : [ "name", "path", "version" ], + "title" : "Sync Destination definition for creating a new destination" }, - "SyncSourceUpdate": { - "title": "Sync Source definition for creating a new source", - "description": "Sync Source Update Definition", - "type": "object", - "properties": { - "path": { - "$ref": "#/components/schemas/SyncPluginPath", - "example": "cloudquery/aws" - }, - "version": { - "type": "string", - "description": "Version of the plugin", - "example": "v1.2.3" - }, - "tables": { - "type": "array", - "description": "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", - "items": { - "type": "string" + "SyncDestination" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SyncDestinationCreate" + }, { + "properties" : { + "created_at" : { + "description" : "Time when the source was created", + "example" : "2023-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "description" : "Time when the source was last updated", + "example" : "2023-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "env" : { + "description" : "Environment variables for the plugin.", + "items" : { + "$ref" : "#/components/schemas/SyncEnv" + }, + "type" : "array" } }, - "skip_tables": { - "type": "array", - "description": "Tables matched by `tables` that should be skipped. Wildcards are supported.", - "items": { - "type": "string" - } + "required" : [ "created_at", "env", "updated_at" ] + } ] + }, + "SyncDestinationUpdate" : { + "description" : "Sync Destination Definition", + "properties" : { + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" }, - "spec": { - "type": "object", - "additionalProperties": true, - "format": "Plugin parameters, specific to each plugin" + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", + "type" : "string" }, - "env": { - "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SyncEnvCreate" - } + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" + }, + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" }, - "last_update_source": { - "$ref": "#/components/schemas/SyncLastUpdateSource" + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" } - } + }, + "title" : "Sync Destination definition for creating a new destination" }, - "SyncDestinationWriteMode": { - "type": "string", - "description": "Write mode for the destination", - "enum": [ - "append", - "overwrite", - "overwrite-delete-stale" - ], - "default": "overwrite-delete-stale" - }, - "SyncDestinationMigrateMode": { - "type": "string", - "description": "Migrate mode for the destination", - "enum": [ - "safe", - "forced" - ], - "default": "safe" - }, - "SyncDestinationCreate": { - "title": "Sync Destination definition for creating a new destination", - "description": "Sync Destination Definition", - "type": "object", - "required": [ - "name", - "path", - "version" - ], - "properties": { - "name": { - "type": "string", - "example": "my-destination-definition", - "description": "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "path": { - "$ref": "#/components/schemas/SyncPluginPath", - "example": "cloudquery/postgresql" - }, - "version": { - "type": "string", - "description": "Version of the plugin", - "example": "v1.2.3" - }, - "write_mode": { - "$ref": "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode": { - "$ref": "#/components/schemas/SyncDestinationMigrateMode" - }, - "spec": { - "type": "object", - "additionalProperties": true, - "format": "Plugin parameters, specific to each plugin" - }, - "env": { - "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SyncEnvCreate" - } + "Sync" : { + "description" : "Managed Sync definition", + "properties" : { + "name" : { + "description" : "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" }, - "last_update_source": { - "$ref": "#/components/schemas/SyncLastUpdateSource" + "source" : { + "description" : "Unique name of the source", + "type" : "string" + }, + "destinations" : { + "description" : "List of destinations for the sync", + "items" : { + "description" : "Unique name of the destination", + "type" : "string" + }, + "type" : "array" + }, + "disabled" : { + "description" : "Whether the sync is disabled", + "type" : "boolean" + }, + "schedule" : { + "description" : "Cron schedule for the sync", + "type" : "string" + }, + "cpu" : { + "description" : "CPU quota for the sync", + "example" : "1", + "type" : "string", + "x-go-name" : "CPU" + }, + "memory" : { + "description" : "Memory quota for the sync", + "example" : "2Gi", + "type" : "string" + }, + "created_at" : { + "description" : "Time when the sync was created", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "description" : "Time when the sync was updated", + "format" : "date-time", + "type" : "string" + }, + "created_by" : { + "type" : "string" + } + }, + "required" : [ "cpu", "created_at", "destinations", "disabled", "memory", "name", "schedule", "source", "updated_at" ] + }, + "SyncCreate" : { + "description" : "Managed Sync definition", + "properties" : { + "name" : { + "description" : "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "source" : { + "description" : "Unique name of the source", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "destinations" : { + "items" : { + "description" : "Unique name of the destination", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "minItems" : 1, + "type" : "array" + }, + "schedule" : { + "description" : "Cron schedule for the sync", + "type" : "string" + }, + "disabled" : { + "default" : false, + "description" : "Whether the sync is disabled", + "type" : "boolean" + }, + "cpu" : { + "default" : "1", + "description" : "CPU quota for the sync", + "type" : "string", + "x-go-name" : "CPU" + }, + "memory" : { + "default" : "2Gi", + "description" : "Memory quota for the sync", + "type" : "string" + } + }, + "required" : [ "destinations", "name", "source" ] + }, + "SyncUpdate" : { + "description" : "Managed Sync definition", + "properties" : { + "source" : { + "description" : "Unique name of the source", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "destinations" : { + "items" : { + "description" : "Unique name of the destination", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "minItems" : 1, + "type" : "array" + }, + "schedule" : { + "description" : "Cron schedule for the sync", + "type" : "string" + }, + "disabled" : { + "default" : false, + "description" : "Whether the sync is disabled", + "type" : "boolean" + }, + "env" : { + "description" : "Environment variables for the sync", + "items" : { + "$ref" : "#/components/schemas/SyncEnv" + }, + "type" : "array" + }, + "cpu" : { + "default" : "1", + "description" : "CPU quota for the sync", + "type" : "string", + "x-go-name" : "CPU" + }, + "memory" : { + "default" : "2Gi", + "description" : "Memory quota for the sync", + "type" : "string" } } }, - "SyncDestination": { - "allOf": [ - { - "$ref": "#/components/schemas/SyncDestinationCreate" - }, - { - "type": "object", - "required": [ - "name", - "path", - "version", - "write_mode", - "migrate_mode", - "spec", - "env", - "created_at", - "updated_at", - "last_update_source" - ], - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "example": "2023-07-14T16:53:42Z", - "description": "Time when the source was created" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "example": "2023-07-14T16:53:42Z", - "description": "Time when the source was last updated" - }, - "env": { - "description": "Environment variables for the plugin.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SyncEnv" - } - } + "SyncRunStatus" : { + "description" : "The status of the sync run", + "enum" : [ "completed", "failed", "started", "cancelled", "created" ], + "type" : "string" + }, + "SyncRunStatusReason" : { + "description" : "The reason for the status", + "enum" : [ "error", "oom_killed" ], + "type" : "string" + }, + "SyncRun" : { + "description" : "Managed Sync Run definition", + "properties" : { + "sync_name" : { + "description" : "Name of the sync", + "type" : "string" + }, + "id" : { + "description" : "unique ID of the run", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" + }, + "status" : { + "$ref" : "#/components/schemas/SyncRunStatus" + }, + "status_reason" : { + "$ref" : "#/components/schemas/SyncRunStatusReason" + }, + "created_at" : { + "description" : "Time the sync run was created", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completed_at" : { + "description" : "Time the sync run was completed", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "total_rows" : { + "description" : "Total number of rows in the sync", + "format" : "int64", + "type" : "integer" + }, + "warnings" : { + "description" : "Number of warnings encountered during the sync", + "format" : "int64", + "type" : "integer" + }, + "errors" : { + "description" : "Number of errors encountered during the sync", + "format" : "int64", + "type" : "integer" + } + }, + "required" : [ "created_at", "errors", "id", "status", "sync_name", "total_rows", "warnings" ] + }, + "SyncRunID" : { + "description" : "ID of the SyncRun", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "SyncRunID" + }, + "SyncRunDetails" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SyncRun" + }, { + "properties" : { + "cpu_seconds" : { + "description" : "Total CPU seconds utilized during this sync run", + "format" : "double", + "type" : "number", + "x-go-name" : "CPUSeconds" + }, + "memory_byte_seconds" : { + "description" : "Total memory byte seconds utilized during this sync run", + "format" : "double", + "type" : "number" + }, + "network_egress_bytes" : { + "description" : "Total network egress bytes during this sync run", + "format" : "double", + "type" : "number" } } - ] - }, - "SyncDestinationUpdate": { - "title": "Sync Destination definition for creating a new destination", - "description": "Sync Destination Definition", - "type": "object", - "properties": { - "path": { - "$ref": "#/components/schemas/SyncPluginPath", - "example": "cloudquery/postgresql" - }, - "version": { - "type": "string", - "description": "Version of the plugin", - "example": "v1.2.3" - }, - "write_mode": { - "$ref": "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode": { - "$ref": "#/components/schemas/SyncDestinationMigrateMode" - }, - "spec": { - "type": "object", - "additionalProperties": true, - "format": "Plugin parameters, specific to each plugin" - }, - "env": { - "description": "Environment variables for the plugin. All environment variables will be stored as secrets.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SyncEnvCreate" - } + } ] + }, + "ListPluginNotificationRequests_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginNotificationRequest" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListPlugins_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws", + "kind" : "source", + "team_name" : "cloudquery", + "display_name" : "AWS Source Plugin", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://images.cloudquery.io/logos/aws.png", + "official" : true, + "short_description" : "Sync data from AWS to any destination", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "paid", + "usd_per_row" : "0.00123", + "free_rows_per_month" : 10000, + "release_stage" : "preview" + } ], + "items" : { + "$ref" : "#/components/schemas/ListPlugin" + }, + "type" : "array" }, - "last_update_source": { - "$ref": "#/components/schemas/SyncLastUpdateSource" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } - } + }, + "required" : [ "items", "metadata" ] }, - "Sync": { - "description": "Managed Sync definition", - "type": "object", - "required": [ - "name", - "source", - "destinations", - "disabled", - "schedule", - "cpu", - "memory", - "created_at", - "updated_at" - ], - "properties": { - "name": { - "type": "string", - "description": "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "source": { - "type": "string", - "description": "Unique name of the source" - }, - "destinations": { - "type": "array", - "description": "List of destinations for the sync", - "items": { - "type": "string", - "description": "Unique name of the destination" - } + "ListPluginUpcomingPriceChanges_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginPrice" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListPluginVersions_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginVersionList" + }, + "type" : "array" }, - "disabled": { - "type": "boolean", - "description": "Whether the sync is disabled" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "CreatePluginVersion_request" : { + "properties" : { + "message" : { + "description" : "A message describing what's new or changed in this version.\nThis message will be displayed to users in the plugin's changelog.\nSupports limited markdown syntax.\n", + "maxLength" : 30000, + "minLength" : 1, + "type" : "string" }, - "schedule": { - "type": "string", - "description": "Cron schedule for the sync" + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" }, - "cpu": { - "type": "string", - "description": "CPU quota for the sync", - "example": "1", - "x-go-name": "CPU" + "supported_targets" : { + "description" : "The targets supported by this plugin version, formatted as _", + "example" : [ "linux_arm64", "darwin_amd64", "windows_amd64" ], + "items" : { + "type" : "string" + }, + "type" : "array" }, - "memory": { - "type": "string", - "description": "Memory quota for the sync", - "example": "2Gi" + "checksums" : { + "description" : "List of SHA-256 checksums for this plugin version, one for each supported target.", + "items" : { + "type" : "string" + }, + "type" : "array" }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Time when the sync was created" + "package_type" : { + "$ref" : "#/components/schemas/PluginPackageType" }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Time when the sync was updated" + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" + } + }, + "required" : [ "checksums", "message", "package_type", "protocols", "supported_targets" ] + }, + "ListPluginVersionDocs_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPage" + }, + "type" : "array" }, - "created_by": { - "type": "string" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } - } + }, + "required" : [ "items", "metadata" ] + }, + "CreatePluginVersionDocs_request" : { + "properties" : { + "pages" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPageCreate" + }, + "type" : "array" + } + }, + "required" : [ "pages" ] }, - "SyncCreate": { - "type": "object", - "description": "Managed Sync definition", - "required": [ - "name", - "source", - "destinations" - ], - "properties": { - "name": { - "type": "string", - "description": "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "source": { - "type": "string", - "description": "Unique name of the source", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "destinations": { - "type": "array", - "items": { - "type": "string", - "description": "Unique name of the destination", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "minItems": 1 - }, - "schedule": { - "type": "string", - "description": "Cron schedule for the sync" - }, - "disabled": { - "type": "boolean", - "description": "Whether the sync is disabled", - "default": false - }, - "cpu": { - "type": "string", - "description": "CPU quota for the sync", - "default": "1", - "x-go-name": "CPU" - }, - "memory": { - "type": "string", - "description": "Memory quota for the sync", - "default": "2Gi" + "CreatePluginVersionDocs_201_response" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "type" : "array" } } }, - "SyncUpdate": { - "type": "object", - "description": "Managed Sync definition", - "properties": { - "source": { - "type": "string", - "description": "Unique name of the source", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "destinations": { - "type": "array", - "items": { - "type": "string", - "description": "Unique name of the destination", - "pattern": "^[a-zA-Z0-9_-]+$" - }, - "minItems": 1 - }, - "schedule": { - "type": "string", - "description": "Cron schedule for the sync" - }, - "disabled": { - "type": "boolean", - "description": "Whether the sync is disabled", - "default": false - }, - "env": { - "type": "array", - "description": "Environment variables for the sync", - "items": { - "$ref": "#/components/schemas/SyncEnv" - } - }, - "cpu": { - "type": "string", - "description": "CPU quota for the sync", - "default": "1", - "x-go-name": "CPU" + "DeletePluginVersionDocs_request" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "type" : "array" + } + }, + "required" : [ "names" ] + }, + "ListPluginVersionTables_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginTable" + }, + "type" : "array" }, - "memory": { - "type": "string", - "description": "Memory quota for the sync", - "default": "2Gi" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } - } + }, + "required" : [ "items", "metadata" ] }, - "SyncRunStatus": { - "description": "The status of the sync run", - "type": "string", - "enum": [ - "completed", - "failed", - "started", - "cancelled", - "created" - ] - }, - "SyncRunStatusReason": { - "description": "The reason for the status", - "type": "string", - "enum": [ - "error", - "oom_killed" - ] - }, - "SyncRun": { - "description": "Managed Sync Run definition", - "type": "object", - "required": [ - "created_at", - "sync_name", - "id", - "status", - "total_rows", - "warnings", - "errors" - ], - "properties": { - "sync_name": { - "type": "string", - "description": "Name of the sync" - }, - "id": { - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "description": "unique ID of the run", - "x-go-name": "ID" - }, - "status": { - "$ref": "#/components/schemas/SyncRunStatus", - "description": "Status of the sync run" - }, - "status_reason": { - "$ref": "#/components/schemas/SyncRunStatusReason", - "description": "Reason for the status of the sync run" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "Time the sync run was created" - }, - "completed_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "Time the sync run was completed" - }, - "total_rows": { - "type": "integer", - "format": "int64", - "description": "Total number of rows in the sync" - }, - "warnings": { - "type": "integer", - "format": "int64", - "description": "Number of warnings encountered during the sync" - }, - "errors": { - "type": "integer", - "format": "int64", - "description": "Number of errors encountered during the sync" + "CreatePluginVersionTables_request" : { + "properties" : { + "tables" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableCreate" + }, + "type" : "array" } - } + }, + "required" : [ "tables" ] }, - "SyncRunID": { - "description": "ID of the SyncRun", - "type": "string", - "format": "uuid", - "example": "12345678-1234-1234-1234-1234567890ab", - "x-go-name": "SyncRunID" - }, - "SyncRunDetails": { - "allOf": [ - { - "$ref": "#/components/schemas/SyncRun" - }, - { - "type": "object", - "required": [ - "created_at", - "sync_name", - "id", - "status", - "total_rows", - "warnings", - "errors" - ], - "properties": { - "cpu_seconds": { - "type": "number", - "format": "double", - "description": "Total CPU seconds utilized during this sync run", - "x-go-name": "CPUSeconds" - }, - "memory_byte_seconds": { - "type": "number", - "format": "double", - "description": "Total memory byte seconds utilized during this sync run" - }, - "network_egress_bytes": { - "type": "number", - "format": "double", - "description": "Total network egress bytes during this sync run" - } - } + "CreatePluginVersionTables_201_response" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "type" : "array" } - ] - } - }, - "responses": { - "InternalError": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + } + }, + "DeletePluginVersionTables_request" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "type" : "array" + } + }, + "required" : [ "names" ] + }, + "ListAddons_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws-policies", + "team_name" : "cloudquery", + "display_name" : "AWS Policies", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://images.cloudquery.io/logos/aws.png", + "official" : true, + "short_description" : "Sync data from AWS to any destination", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "free", + "price_usd" : "50", + "addon_type" : "visualization", + "addon_format" : "zip" + } ], + "items" : { + "$ref" : "#/components/schemas/ListAddon" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Internal Error" + "required" : [ "items", "metadata" ] }, - "RequiresAuthentication": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "ListAddonVersions_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/AddonVersion" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Requires authentication" + "required" : [ "items", "metadata" ] }, - "BadRequest": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FieldError" - } + "CreateAddonVersion_request" : { + "properties" : { + "message" : { + "description" : "A message describing what's new or changed in this version.\nThis message will be displayed to users in the addon's changelog.\nSupports limited markdown syntax.\n", + "maxLength" : 30000, + "minLength" : 1, + "type" : "string" + }, + "doc" : { + "description" : "Main README in MD format", + "type" : "string" + }, + "plugin_deps" : { + "description" : "plugin dependencies in the format of ['team_name/kind/plugin_name@version']", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "addon_deps" : { + "description" : "addon dependencies in the format of ['team_name/type/addon_name@version']", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "checksum" : { + "description" : "SHA-256 checksum for the addon asset", + "type" : "string" } }, - "description": "Bad request" + "required" : [ "checksum", "doc", "message" ] }, - "Forbidden": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FieldError" - } + "ListTeams_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Team" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Forbidden" + "required" : [ "items", "metadata" ] }, - "NotFound": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "CreateTeam_request" : { + "additionalProperties" : false, + "properties" : { + "name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "display_name" : { } + }, + "required" : [ "display_name", "name" ] + }, + "UpdateTeam_request" : { + "additionalProperties" : false, + "properties" : { + "display_name" : { } + } + }, + "CreateTeamImages_request" : { + "properties" : { + "images" : { + "items" : { + "$ref" : "#/components/schemas/TeamImageCreate" + }, + "minItems" : 1, + "type" : "array" } }, - "description": "Resource not found" + "required" : [ "images" ] }, - "UnprocessableEntity": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FieldError" - } + "CreateTeamImages_201_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/TeamImage" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListPluginsByTeam_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws-source", + "kind" : "source", + "team_name" : "cloudquery", + "display_name" : "AWS Source Plugin", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://images.cloudquery.io/logos/aws.png", + "official" : true, + "short_description" : "Sync data from AWS to any destination", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "paid", + "usd_per_row" : "0.00123", + "free_rows_per_month" : 10000, + "release_stage" : "preview" + } ], + "items" : { + "$ref" : "#/components/schemas/Plugin" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListAddonsByTeam_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws-policies", + "team_name" : "cloudquery", + "display_name" : "AWS Policies", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://images.cloudquery.io/logos/aws.png", + "official" : true, + "short_description" : "AWS policies", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "paid", + "price_usd" : "50", + "addon_type" : "visualization", + "addon_format" : "zip" + } ], + "items" : { + "$ref" : "#/components/schemas/Addon" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "UnprocessableEntity" + "required" : [ "items", "metadata" ] }, - "TooManyRequests": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "ListAddonOrdersByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/AddonOrder" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Too Many Requests" + "required" : [ "items", "metadata" ] }, - "ServiceUnavailable": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "GetTeamMemberships_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "role" : "admin", + "user" : { + "created_at" : "2017-07-14T16:53:42Z", + "email" : "user@clouduery.io", + "id" : "12345678-1234-1234-1234-1234567890ab", + "name" : "user", + "updated_at" : "2017-07-14T16:53:42Z" + } + } ], + "items" : { + "$ref" : "#/components/schemas/MembershipWithUser" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Service unavailable" + "required" : [ "items", "metadata" ] }, - "MethodNotAllowed": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "ListMonthlyLimitsByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/MonthlyLimit" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Method not allowed" + "required" : [ "items", "metadata" ] }, - "DockerError": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DockerError" - } + "ListInvoicesByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Invoice" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Error Returned from the Docker Authorization Handler to the Docker Registry" - } - }, - "parameters": { - "page": { - "description": "Page number of the results to fetch", - "in": "query", - "name": "page", - "required": false, - "schema": { - "default": 1, - "minimum": 1, - "type": "integer", - "format": "int64" - } + "required" : [ "items", "metadata" ] }, - "per_page": { - "description": "The number of results per page (max 1000).", - "in": "query", - "name": "per_page", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "type": "integer", - "format": "int64" - } + "ListTeamPluginUsage_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/UsageCurrent" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "plugin_team": { - "in": "path", - "name": "plugin_team", - "required": true, - "schema": { - "$ref": "#/components/schemas/TeamName" - } + "ListTeamInvitations_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Invitation" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "plugin_kind": { - "in": "path", - "name": "plugin_kind", - "required": true, - "schema": { - "$ref": "#/components/schemas/PluginKind" - } + "EmailTeamInvitation_request" : { + "properties" : { + "email" : { + "format" : "email", + "type" : "string" + }, + "role" : { + "enum" : [ "admin", "member" ], + "type" : "string" + } + }, + "required" : [ "email", "role" ] }, - "plugin_name": { - "in": "path", - "name": "plugin_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/PluginName" - } + "AcceptTeamInvitation_request" : { + "properties" : { + "token" : { + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "token" ] }, - "plugin_sort_by": { - "description": "The field to sort by", - "in": "query", - "name": "sort_by", - "required": false, - "schema": { - "enum": [ - "created_at", - "updated_at", - "name", - "downloads" - ], - "type": "string" - } + "ListSubscriptionOrdersByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrder" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "team_name": { - "in": "path", - "name": "team_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/TeamName" - } + "ListUsersByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/User" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "version_sort_by": { - "description": "The field to sort by", - "in": "query", - "name": "sort_by", - "required": false, - "schema": { - "enum": [ - "created_at" - ], - "type": "string" + "UpdateCurrentUser_request" : { + "additionalProperties" : false, + "properties" : { + "name" : { } } }, - "include_drafts": { - "description": "Whether to include draft versions", - "in": "query", - "name": "include_drafts", - "required": false, - "schema": { - "type": "boolean" - } + "ListCurrentUserInvitations_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/InvitationWithToken" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "include_prereleases": { - "description": "Whether to include prerelease versions", - "in": "query", - "name": "include_prereleases", - "required": false, - "schema": { - "type": "boolean" - } + "GetCurrentUserMemberships_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "role" : "admin", + "team" : { + "created_at" : "2017-07-14T16:53:42Z", + "name" : "cloudquery", + "display_name" : "CloudQuery", + "plan" : "free", + "is_trial_active" : false + } + } ], + "items" : { + "$ref" : "#/components/schemas/MembershipWithTeam" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "version_name": { - "in": "path", - "name": "version_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/VersionName" - } + "ListTeamAPIKeys_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/APIKey" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "target_name": { - "in": "path", - "name": "target_name", - "required": true, - "schema": { - "type": "string" - } + "CreateTeamAPIKey_request" : { + "properties" : { + "name" : { + "$ref" : "#/components/schemas/APIKeyName" + }, + "expires_at" : { + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "expires_at", "name" ] }, - "addon_sort_by": { - "description": "The field to sort by", - "in": "query", - "name": "sort_by", - "required": false, - "schema": { - "enum": [ - "created_at", - "updated_at", - "name", - "downloads" - ], - "type": "string" - } + "ListSyncSources_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/SyncSource" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "addon_type": { - "in": "path", - "name": "addon_type", - "required": true, - "schema": { - "$ref": "#/components/schemas/AddonType" - } + "ListSyncDestinations_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/SyncDestination" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "addon_name": { - "in": "path", - "name": "addon_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/AddonName" - } + "ListSyncs_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Sync" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "include_private": { - "description": "Whether to include private plugins", - "in": "query", - "name": "include_private", - "required": false, - "schema": { - "type": "boolean" - } + "ListSyncRuns_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/SyncRun" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "addon_order_id": { - "name": "addon_order_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/AddonOrderID" - }, - "x-go-name": "AddonOrderID" - }, - "email": { - "in": "path", - "name": "email", - "required": true, - "schema": { - "$ref": "#/components/schemas/Email" + "UpdateSyncRun_request" : { + "properties" : { + "status" : { + "$ref" : "#/components/schemas/SyncRunStatus" + }, + "status_reason" : { + "$ref" : "#/components/schemas/SyncRunStatusReason" + } } }, - "addon_team": { - "in": "path", - "name": "addon_team", - "required": true, - "schema": { - "$ref": "#/components/schemas/TeamName" - } + "CreateSyncRunProgress_request" : { + "properties" : { + "rows" : { + "description" : "Number of rows synced so far", + "format" : "int64", + "type" : "integer" + }, + "warnings" : { + "description" : "Number of warnings encountered so far", + "format" : "int64", + "type" : "integer" + }, + "errors" : { + "description" : "Number of errors encountered so far", + "format" : "int64", + "type" : "integer" + }, + "status" : { + "$ref" : "#/components/schemas/SyncRunStatus" + } + }, + "required" : [ "errors", "rows", "warnings" ] }, - "team_subscription_order_id": { - "name": "subscription_order_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/TeamSubscriptionOrderID" - }, - "x-go-name": "TeamSubscriptionOrderID" - }, - "user_id": { - "name": "user_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/UserID" - }, - "x-go-name": "UserID" - }, - "apikey_id": { - "name": "apikey_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/APIKeyID" - }, - "x-go-name": "APIKeyID" - }, - "sync_source_name": { - "name": "sync_source_name", - "in": "path", - "required": true, - "schema": { - "description": "Unique name of the sync source", - "type": "string", - "pattern": "^[a-zA-Z0-9_-]+$", - "x-go-name": "SyncSourceName" - } + "Sync_Run_Logs" : { + "additionalProperties" : false, + "properties" : { + "location" : { } + }, + "required" : [ "location" ], + "title" : "Sync Run Logs" }, - "sync_destination_name": { - "name": "sync_destination_name", - "in": "path", - "required": true, - "schema": { - "description": "Unique name of the sync destination", - "type": "string", - "pattern": "^[a-zA-Z0-9_-]+$", - "x-go-name": "SyncDestinationName" - } + "UpdateSyncTestConnection_request" : { + "properties" : { + "status" : { + "$ref" : "#/components/schemas/SyncTestConnectionStatus" + } + }, + "required" : [ "status" ] }, - "sync_name": { - "name": "sync_name", - "in": "path", - "required": true, - "schema": { - "description": "Unique name of the sync", - "type": "string", - "pattern": "^[a-zA-Z0-9_-]+$", - "x-go-name": "SyncName" - } + "UsageIncrease_tables_inner" : { + "properties" : { + "name" : { + "description" : "The name of the table.", + "example" : "my_table", + "type" : "string" + }, + "rows" : { + "description" : "The additional rows used by the table.", + "example" : 100, + "minimum" : 0, + "type" : "integer" + } + }, + "required" : [ "name", "rows" ] }, - "sync_run_id": { - "name": "sync_run_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/SyncRunID" - } + "UsageSummary_metadata" : { + "additionalProperties" : false, + "description" : "Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details.", + "properties" : { + "start" : { }, + "end" : { }, + "aggregation_period" : { + "description" : "The aggregation period to sum data over. In other words, data will be returned at this granularity.", + "enum" : [ "day", "month" ], + "type" : "string" + }, + "metrics" : { } + }, + "required" : [ "aggregation_period", "end", "metrics", "start" ] }, - "sync_test_connection_id": { - "name": "sync_test_connection_id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/SyncTestConnectionID" - } + "SpendSummary_metadata" : { + "additionalProperties" : false, + "description" : "Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details.", + "properties" : { + "start" : { }, + "end" : { } + }, + "required" : [ "end", "start" ] + } + }, + "securitySchemes" : { + "bearerAuth" : { + "scheme" : "bearer", + "type" : "http" + }, + "basicAuth" : { + "scheme" : "basic", + "type" : "http" } } } From 40b7a621a4b3e2afca65f8414f36d9ba53c48887 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 9 May 2024 11:04:58 +0300 Subject: [PATCH 153/343] chore(main): Release v1.11.0 (#161) :robot: I have created a release *beep* *boop* --- ## [1.11.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.10.0...v1.11.0) (2024-05-09) ### Features * Extract nested properties in their own structs ([#158](https://github.com/cloudquery/cloudquery-api-go/issues/158)) ([01453e3](https://github.com/cloudquery/cloudquery-api-go/commit/01453e3bf74fa1f9f36a43c9ae78e4130a254f52)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4116dd..ad7cb38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.11.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.10.0...v1.11.0) (2024-05-09) + + +### Features + +* Extract nested properties in their own structs ([#158](https://github.com/cloudquery/cloudquery-api-go/issues/158)) ([01453e3](https://github.com/cloudquery/cloudquery-api-go/commit/01453e3bf74fa1f9f36a43c9ae78e4130a254f52)) + ## [1.10.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.2...v1.10.0) (2024-05-08) From aec32b3fcbb581689dd0dd02c5604a63392ba0e4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 10 May 2024 12:09:10 +0300 Subject: [PATCH 154/343] fix: Generate CloudQuery Go API Client from `spec.json` (#162) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 554 ++++++++++++++++++++++++++++++++++++++++++++++++-- spec.json | 128 ++++++++++-- 2 files changed, 639 insertions(+), 43 deletions(-) diff --git a/models.gen.go b/models.gen.go index 10f5366..a19171f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -4,6 +4,8 @@ package cloudquery_api import ( + "encoding/json" + "fmt" "time" openapi_types "github.com/deepmap/oapi-codegen/pkg/types" @@ -186,12 +188,6 @@ const ( TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" ) -// Defines values for UsageSummaryMetadataAggregationPeriod. -const ( - UsageSummaryMetadataAggregationPeriodDay UsageSummaryMetadataAggregationPeriod = "day" - UsageSummaryMetadataAggregationPeriodMonth UsageSummaryMetadataAggregationPeriod = "month" -) - // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -646,10 +642,12 @@ type CreateTeamImagesRequest struct { // CreateTeamRequest defines model for CreateTeam_request. type CreateTeamRequest struct { + // DisplayName The team's display name DisplayName interface{} `json:"display_name"` // Name The unique name for the team. - Name TeamName `json:"name"` + Name TeamName `json:"name"` + AdditionalProperties map[string]interface{} `json:"-"` } // DeletePluginVersionDocsRequest defines model for DeletePluginVersionDocs_request. @@ -1591,6 +1589,13 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } +// PriceCategorySpend Spend by price category for a defined period. +type PriceCategorySpend struct { + // Category Supported price categories for billing + Category PluginPriceCategory `json:"category"` + Total string `json:"total"` +} + // RegistryAuthToken JWT token for the image registry type RegistryAuthToken struct { AccessToken string `json:"access_token"` @@ -1606,13 +1611,28 @@ type ReleaseURL struct { // Note that empty or all-zero values are not included in the response. type SpendSummary struct { // Metadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. - Metadata SpendSummaryMetadata `json:"metadata"` - Values interface{} `json:"values"` + Metadata SpendSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// SpendSummaryValue A spend summary value. +type SpendSummaryValue struct { + ByCategory []PriceCategorySpend `json:"by_category"` + + // Date The timestamp for the spend summary. + Date time.Time `json:"date"` + + // Total Total spend for the period in USD. + Total string `json:"total"` } // SpendSummaryMetadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. type SpendSummaryMetadata struct { - End interface{} `json:"end"` + // End The exclusive end of the query time range. + End interface{} `json:"end"` + + // Start The inclusive start of the query time range. Start interface{} `json:"start"` } @@ -1999,7 +2019,9 @@ type SyncUpdate struct { // SyncRunLogs defines model for Sync_Run_Logs. type SyncRunLogs struct { - Location interface{} `json:"location"` + // Location The location to download the sync run logs from + Location interface{} `json:"location"` + AdditionalProperties map[string]interface{} `json:"-"` } // Team CloudQuery Team @@ -2089,7 +2111,9 @@ type TeamSubscriptionOrderStatus string // UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. type UpdateCurrentUserRequest struct { - Name *interface{} `json:"name,omitempty"` + // Name The user's name + Name *interface{} `json:"name,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UpdateSyncRunRequest defines model for UpdateSyncRun_request. @@ -2109,7 +2133,9 @@ type UpdateSyncTestConnectionRequest struct { // UpdateTeamRequest defines model for UpdateTeam_request. type UpdateTeamRequest struct { - DisplayName *interface{} `json:"display_name,omitempty"` + // DisplayName The team's display name + DisplayName *interface{} `json:"display_name,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UsageCurrent The usage of a plugin within the current calendar month. @@ -2170,24 +2196,56 @@ type UsageIncreaseTablesInner struct { // UsageSummary A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range. // Note that empty or all-zero values are not included in the response. type UsageSummary struct { + // Groups The groups of the usage summary. Every group will have a corresponding value at the same index in the values array. Groups interface{} `json:"groups"` // Metadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. - Metadata UsageSummaryMetadata `json:"metadata"` - Values interface{} `json:"values"` + Metadata UsageSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// UsageSummaryGroup A usage summary group. +type UsageSummaryGroup struct { + // Name The name of the group. + Name string `json:"name"` + + // Value The value of the group at this index. + Value string `json:"value"` +} + +// UsageSummaryValue A usage summary value. +type UsageSummaryValue struct { + // CloudEgressBytes Egress bytes consumed in this period, one per group. + CloudEgressBytes *[]int64 `json:"cloud_egress_bytes,omitempty"` + + // CloudVcpuSeconds vCPU/seconds consumed in this period, one per group. + CloudVcpuSeconds *[]int64 `json:"cloud_vcpu_seconds,omitempty"` + + // CloudVramByteSeconds vRAM/byte-seconds consumed in this period, one per group. + CloudVramByteSeconds *[]int64 `json:"cloud_vram_byte_seconds,omitempty"` + + // PaidRows The paid rows that were synced in this period, one per group. + PaidRows *[]int64 `json:"paid_rows,omitempty"` + + // Timestamp The timestamp marking the start of a period. + Timestamp time.Time `json:"timestamp"` } // UsageSummaryMetadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. type UsageSummaryMetadata struct { // AggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. - AggregationPeriod UsageSummaryMetadataAggregationPeriod `json:"aggregation_period"` - End interface{} `json:"end"` - Metrics interface{} `json:"metrics"` - Start interface{} `json:"start"` -} + AggregationPeriod interface{} `json:"aggregation_period"` + + // End The exclusive end of the query time range. + End interface{} `json:"end"` -// UsageSummaryMetadataAggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. -type UsageSummaryMetadataAggregationPeriod string + // Metrics List of metrics included in the response. + Metrics interface{} `json:"metrics"` + + // Start The inclusive start of the query time range. + Start interface{} `json:"start"` +} // User CloudQuery User type User struct { @@ -2756,3 +2814,455 @@ type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest + +// Getter for additional properties for CreateTeamRequest. Returns the specified +// element and whether it was found +func (a CreateTeamRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for CreateTeamRequest +func (a *CreateTeamRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties +func (a *CreateTeamRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["display_name"]; found { + err = json.Unmarshal(raw, &a.DisplayName) + if err != nil { + return fmt.Errorf("error reading 'display_name': %w", err) + } + delete(object, "display_name") + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties +func (a CreateTeamRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["display_name"], err = json.Marshal(a.DisplayName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'display_name': %w", err) + } + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SpendSummary. Returns the specified +// element and whether it was found +func (a SpendSummary) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SpendSummary +func (a *SpendSummary) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SpendSummary to handle AdditionalProperties +func (a *SpendSummary) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["metadata"]; found { + err = json.Unmarshal(raw, &a.Metadata) + if err != nil { + return fmt.Errorf("error reading 'metadata': %w", err) + } + delete(object, "metadata") + } + + if raw, found := object["values"]; found { + err = json.Unmarshal(raw, &a.Values) + if err != nil { + return fmt.Errorf("error reading 'values': %w", err) + } + delete(object, "values") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SpendSummary to handle AdditionalProperties +func (a SpendSummary) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["metadata"], err = json.Marshal(a.Metadata) + if err != nil { + return nil, fmt.Errorf("error marshaling 'metadata': %w", err) + } + + object["values"], err = json.Marshal(a.Values) + if err != nil { + return nil, fmt.Errorf("error marshaling 'values': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SyncRunLogs. Returns the specified +// element and whether it was found +func (a SyncRunLogs) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SyncRunLogs +func (a *SyncRunLogs) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SyncRunLogs to handle AdditionalProperties +func (a *SyncRunLogs) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["location"]; found { + err = json.Unmarshal(raw, &a.Location) + if err != nil { + return fmt.Errorf("error reading 'location': %w", err) + } + delete(object, "location") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SyncRunLogs to handle AdditionalProperties +func (a SyncRunLogs) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["location"], err = json.Marshal(a.Location) + if err != nil { + return nil, fmt.Errorf("error marshaling 'location': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateCurrentUserRequest. Returns the specified +// element and whether it was found +func (a UpdateCurrentUserRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateCurrentUserRequest +func (a *UpdateCurrentUserRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties +func (a *UpdateCurrentUserRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties +func (a UpdateCurrentUserRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Name != nil { + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateTeamRequest. Returns the specified +// element and whether it was found +func (a UpdateTeamRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateTeamRequest +func (a *UpdateTeamRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties +func (a *UpdateTeamRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["display_name"]; found { + err = json.Unmarshal(raw, &a.DisplayName) + if err != nil { + return fmt.Errorf("error reading 'display_name': %w", err) + } + delete(object, "display_name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties +func (a UpdateTeamRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.DisplayName != nil { + object["display_name"], err = json.Marshal(a.DisplayName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'display_name': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UsageSummary. Returns the specified +// element and whether it was found +func (a UsageSummary) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UsageSummary +func (a *UsageSummary) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UsageSummary to handle AdditionalProperties +func (a *UsageSummary) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["groups"]; found { + err = json.Unmarshal(raw, &a.Groups) + if err != nil { + return fmt.Errorf("error reading 'groups': %w", err) + } + delete(object, "groups") + } + + if raw, found := object["metadata"]; found { + err = json.Unmarshal(raw, &a.Metadata) + if err != nil { + return fmt.Errorf("error reading 'metadata': %w", err) + } + delete(object, "metadata") + } + + if raw, found := object["values"]; found { + err = json.Unmarshal(raw, &a.Values) + if err != nil { + return fmt.Errorf("error reading 'values': %w", err) + } + delete(object, "values") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UsageSummary to handle AdditionalProperties +func (a UsageSummary) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["groups"], err = json.Marshal(a.Groups) + if err != nil { + return nil, fmt.Errorf("error marshaling 'groups': %w", err) + } + + object["metadata"], err = json.Marshal(a.Metadata) + if err != nil { + return nil, fmt.Errorf("error marshaling 'metadata': %w", err) + } + + object["values"], err = json.Marshal(a.Values) + if err != nil { + return nil, fmt.Errorf("error marshaling 'values': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} diff --git a/spec.json b/spec.json index e169026..e8381e4 100644 --- a/spec.json +++ b/spec.json @@ -2692,7 +2692,36 @@ }, "responses" : { "204" : { - "description" : "Success (the plugin usage was increased). It may take some time to reflect in the usage list." + "description" : "Success (the plugin usage was increased). It may take some time to reflect in the usage list.", + "headers" : { + "x-cq-minimum-update-interval" : { + "explode" : false, + "schema" : { + "description" : "The minimum interval in seconds between usage updates.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + }, + "x-cq-maximum-update-interval" : { + "explode" : false, + "schema" : { + "description" : "The maximum interval in seconds before a usage update is forced.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + }, + "x-cq-batch-limit" : { + "explode" : false, + "schema" : { + "description" : "The number of rows to batch before sending a usage update.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + } + } }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" @@ -6967,11 +6996,34 @@ "title" : "CloudQuery Usage Summary Value" }, "UsageSummary" : { - "additionalProperties" : false, + "additionalProperties" : { }, "description" : "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", "properties" : { - "groups" : { }, - "values" : { }, + "groups" : { + "description" : "The groups of the usage summary. Every group will have a corresponding value at the same index in the values array.", + "example" : [ { + "name" : "plugin", + "value" : "cloudquery/source/aws" + }, { + "name" : "plugin", + "value" : "cloudquery/source/gcp" + } ], + "items" : { + "$ref" : "#/components/schemas/UsageSummaryGroup" + } + }, + "values" : { + "example" : [ { + "timestamp" : "2021-01-01T00:00:00Z", + "paid_rows" : [ 100, 200 ] + }, { + "timestamp" : "2021-01-02T00:00:00Z", + "paid_rows" : [ 150, 300 ] + } ], + "items" : { + "$ref" : "#/components/schemas/UsageSummaryValue" + } + }, "metadata" : { "$ref" : "#/components/schemas/UsageSummary_metadata" } @@ -7017,10 +7069,14 @@ "title" : "CloudQuery Spend Summary Value" }, "SpendSummary" : { - "additionalProperties" : false, + "additionalProperties" : { }, "description" : "A spend summary for a team, summarizing the spend by each price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", "properties" : { - "values" : { }, + "values" : { + "items" : { + "$ref" : "#/components/schemas/SpendSummaryValue" + } + }, "metadata" : { "$ref" : "#/components/schemas/SpendSummary_metadata" } @@ -8079,19 +8135,25 @@ "required" : [ "items", "metadata" ] }, "CreateTeam_request" : { - "additionalProperties" : false, + "additionalProperties" : { }, "properties" : { "name" : { "$ref" : "#/components/schemas/TeamName" }, - "display_name" : { } + "display_name" : { + "description" : "The team's display name", + "maxLength" : 255, + "minLength" : 1 + } }, "required" : [ "display_name", "name" ] }, "UpdateTeam_request" : { - "additionalProperties" : false, + "additionalProperties" : { }, "properties" : { - "display_name" : { } + "display_name" : { + "description" : "The team's display name" + } } }, "CreateTeamImages_request" : { @@ -8328,9 +8390,13 @@ "required" : [ "items", "metadata" ] }, "UpdateCurrentUser_request" : { - "additionalProperties" : false, + "additionalProperties" : { }, "properties" : { - "name" : { } + "name" : { + "description" : "The user's name", + "maxLength" : 255, + "minLength" : 1 + } } }, "ListCurrentUserInvitations_200_response" : { @@ -8487,9 +8553,12 @@ "required" : [ "errors", "rows", "warnings" ] }, "Sync_Run_Logs" : { - "additionalProperties" : false, + "additionalProperties" : { }, "properties" : { - "location" : { } + "location" : { + "description" : "The location to download the sync run logs from", + "format" : "uri" + } }, "required" : [ "location" ], "title" : "Sync Run Logs" @@ -8522,14 +8591,25 @@ "additionalProperties" : false, "description" : "Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details.", "properties" : { - "start" : { }, - "end" : { }, + "start" : { + "description" : "The inclusive start of the query time range.", + "format" : "date-time" + }, + "end" : { + "description" : "The exclusive end of the query time range.", + "format" : "date-time" + }, "aggregation_period" : { "description" : "The aggregation period to sum data over. In other words, data will be returned at this granularity.", - "enum" : [ "day", "month" ], - "type" : "string" + "enum" : [ "day", "month" ] }, - "metrics" : { } + "metrics" : { + "default" : [ "paid_rows" ], + "description" : "List of metrics included in the response.", + "items" : { + "enum" : [ "paid_rows", "cloud_egress_bytes", "cloud_vcpu_seconds", "cloud_vram_byte_seconds" ] + } + } }, "required" : [ "aggregation_period", "end", "metrics", "start" ] }, @@ -8537,8 +8617,14 @@ "additionalProperties" : false, "description" : "Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details.", "properties" : { - "start" : { }, - "end" : { } + "start" : { + "description" : "The inclusive start of the query time range.", + "format" : "date-time" + }, + "end" : { + "description" : "The exclusive end of the query time range.", + "format" : "date-time" + } }, "required" : [ "end", "start" ] } From 410f6b2221a65a3beeb24ec53fd1a1f0dc55ce3b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 10 May 2024 12:14:51 +0300 Subject: [PATCH 155/343] chore(main): Release v1.11.1 (#163) :robot: I have created a release *beep* *boop* --- ## [1.11.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.0...v1.11.1) (2024-05-10) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#162](https://github.com/cloudquery/cloudquery-api-go/issues/162)) ([aec32b3](https://github.com/cloudquery/cloudquery-api-go/commit/aec32b3fcbb581689dd0dd02c5604a63392ba0e4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad7cb38..a09ae3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.11.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.0...v1.11.1) (2024-05-10) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#162](https://github.com/cloudquery/cloudquery-api-go/issues/162)) ([aec32b3](https://github.com/cloudquery/cloudquery-api-go/commit/aec32b3fcbb581689dd0dd02c5604a63392ba0e4)) + ## [1.11.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.10.0...v1.11.0) (2024-05-09) From 36294a688773187f26e424893022e98ec812dd14 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 17 May 2024 12:27:36 +0300 Subject: [PATCH 156/343] fix: Generate CloudQuery Go API Client from `spec.json` (#164) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 647 +++++++++++++++++--------------------------------- models.gen.go | 120 +++++----- spec.json | 556 ++++++++++++++++++++----------------------- 3 files changed, 534 insertions(+), 789 deletions(-) diff --git a/client.gen.go b/client.gen.go index b4d9927..2241c1d 100644 --- a/client.gen.go +++ b/client.gen.go @@ -314,30 +314,25 @@ type ClientInterface interface { // ListInvoicesByTeam request ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetTeamMemberships request - GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetManagedDatabases request + GetManagedDatabases(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteTeamMembership request - DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateManagedDatabaseWithBody request with any body + CreateManagedDatabaseWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListMonthlyLimitsByTeam request - ListMonthlyLimitsByTeam(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateManagedDatabase(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateMonthlyLimitWithBody request with any body - CreateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteManagedDatabase request + DeleteManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateMonthlyLimit(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetManagedDatabase request + GetManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteMonthlyLimit request - DeleteMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetMonthlyLimit request - GetMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateMonthlyLimitWithBody request with any body - UpdateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamMemberships request + GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdateMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeamMembership request + DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePluginsByTeam request DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1488,32 +1483,8 @@ func (c *Client) ListInvoicesByTeam(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } -func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamMembershipRequest(c.Server, teamName, email) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) ListMonthlyLimitsByTeam(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListMonthlyLimitsByTeamRequest(c.Server, teamName, params) +func (c *Client) GetManagedDatabases(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetManagedDatabasesRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -1524,8 +1495,8 @@ func (c *Client) ListMonthlyLimitsByTeam(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) CreateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMonthlyLimitRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) CreateManagedDatabaseWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateManagedDatabaseRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -1536,8 +1507,8 @@ func (c *Client) CreateMonthlyLimitWithBody(ctx context.Context, teamName TeamNa return c.Client.Do(req) } -func (c *Client) CreateMonthlyLimit(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateMonthlyLimitRequest(c.Server, teamName, body) +func (c *Client) CreateManagedDatabase(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateManagedDatabaseRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -1548,8 +1519,8 @@ func (c *Client) CreateMonthlyLimit(ctx context.Context, teamName TeamName, body return c.Client.Do(req) } -func (c *Client) DeleteMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteMonthlyLimitRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) +func (c *Client) DeleteManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) if err != nil { return nil, err } @@ -1560,8 +1531,8 @@ func (c *Client) DeleteMonthlyLimit(ctx context.Context, teamName TeamName, plug return c.Client.Do(req) } -func (c *Client) GetMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetMonthlyLimitRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) +func (c *Client) GetManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) if err != nil { return nil, err } @@ -1572,8 +1543,8 @@ func (c *Client) GetMonthlyLimit(ctx context.Context, teamName TeamName, pluginT return c.Client.Do(req) } -func (c *Client) UpdateMonthlyLimitWithBody(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateMonthlyLimitRequestWithBody(c.Server, teamName, pluginTeam, pluginKind, pluginName, contentType, body) +func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -1584,8 +1555,8 @@ func (c *Client) UpdateMonthlyLimitWithBody(ctx context.Context, teamName TeamNa return c.Client.Do(req) } -func (c *Client) UpdateMonthlyLimit(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateMonthlyLimitRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, body) +func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamMembershipRequest(c.Server, teamName, email) if err != nil { return nil, err } @@ -5963,8 +5934,8 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List return req, nil } -// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships -func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { +// NewGetManagedDatabasesRequest generates requests for GetManagedDatabases +func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *GetManagedDatabasesParams) (*http.Request, error) { var err error var pathParam0 string @@ -5979,7 +5950,7 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6035,49 +6006,19 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return req, nil } -// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership -func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Email) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) +// NewCreateManagedDatabaseRequest calls the generic CreateManagedDatabase builder with application/json body +func NewCreateManagedDatabaseRequest(server string, teamName TeamName, body CreateManagedDatabaseJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewCreateManagedDatabaseRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewListMonthlyLimitsByTeamRequest generates requests for ListMonthlyLimitsByTeam -func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params *ListMonthlyLimitsByTeamParams) (*http.Request, error) { +// NewCreateManagedDatabaseRequestWithBody generates requests for CreateManagedDatabase with any type of body +func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6092,7 +6033,7 @@ func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6102,65 +6043,18 @@ func NewListMonthlyLimitsByTeamRequest(server string, teamName TeamName, params return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewCreateMonthlyLimitRequest calls the generic CreateMonthlyLimit builder with application/json body -func NewCreateMonthlyLimitRequest(server string, teamName TeamName, body CreateMonthlyLimitJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateMonthlyLimitRequestWithBody(server, teamName, "application/json", bodyReader) + return req, nil } -// NewCreateMonthlyLimitRequestWithBody generates requests for CreateMonthlyLimit with any type of body -func NewCreateMonthlyLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteManagedDatabaseRequest generates requests for DeleteManagedDatabase +func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { var err error var pathParam0 string @@ -6170,12 +6064,19 @@ func NewCreateMonthlyLimitRequestWithBody(server string, teamName TeamName, cont return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6185,18 +6086,16 @@ func NewCreateMonthlyLimitRequestWithBody(server string, teamName TeamName, cont return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteMonthlyLimitRequest generates requests for DeleteMonthlyLimit -func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewGetManagedDatabaseRequest generates requests for GetManagedDatabase +func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { var err error var pathParam0 string @@ -6208,21 +6107,7 @@ func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam P var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) if err != nil { return nil, err } @@ -6232,7 +6117,7 @@ func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam P return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6242,7 +6127,7 @@ func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam P return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -6250,8 +6135,8 @@ func NewDeleteMonthlyLimitRequest(server string, teamName TeamName, pluginTeam P return req, nil } -// NewGetMonthlyLimitRequest generates requests for GetMonthlyLimit -func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships +func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6261,40 +6146,57 @@ func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam Plug return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string + if params != nil { + queryValues := queryURL.Query() - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } + if params.Page != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -6305,19 +6207,8 @@ func NewGetMonthlyLimitRequest(server string, teamName TeamName, pluginTeam Plug return req, nil } -// NewUpdateMonthlyLimitRequest calls the generic UpdateMonthlyLimit builder with application/json body -func NewUpdateMonthlyLimitRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateMonthlyLimitRequestWithBody(server, teamName, pluginTeam, pluginKind, pluginName, "application/json", bodyReader) -} - -// NewUpdateMonthlyLimitRequestWithBody generates requests for UpdateMonthlyLimit with any type of body -func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership +func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Email) (*http.Request, error) { var err error var pathParam0 string @@ -6329,21 +6220,7 @@ func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, plug var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) if err != nil { return nil, err } @@ -6353,7 +6230,7 @@ func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, plug return nil, err } - operationPath := fmt.Sprintf("/teams/%s/monthly-limits/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6363,13 +6240,11 @@ func NewUpdateMonthlyLimitRequestWithBody(server string, teamName TeamName, plug return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } @@ -9263,30 +9138,25 @@ type ClientWithResponsesInterface interface { // ListInvoicesByTeamWithResponse request ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) - // GetTeamMembershipsWithResponse request - GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) - - // DeleteTeamMembershipWithResponse request - DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) - - // ListMonthlyLimitsByTeamWithResponse request - ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) + // GetManagedDatabasesWithResponse request + GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) - // CreateMonthlyLimitWithBodyWithResponse request with any body - CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + // CreateManagedDatabaseWithBodyWithResponse request with any body + CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) - CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) + CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) - // DeleteMonthlyLimitWithResponse request - DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) + // DeleteManagedDatabaseWithResponse request + DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) - // GetMonthlyLimitWithResponse request - GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) + // GetManagedDatabaseWithResponse request + GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) - // UpdateMonthlyLimitWithBodyWithResponse request with any body - UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + // GetTeamMembershipsWithResponse request + GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) - UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) + // DeleteTeamMembershipWithResponse request + DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) // DeletePluginsByTeamWithResponse request DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) @@ -10997,10 +10867,10 @@ func (r ListInvoicesByTeamResponse) StatusCode() int { return 0 } -type GetTeamMembershipsResponse struct { +type GetManagedDatabasesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetTeamMemberships200Response + JSON200 *GetManagedDatabases200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden @@ -11009,7 +10879,7 @@ type GetTeamMembershipsResponse struct { } // Status returns HTTPResponse.Status -func (r GetTeamMembershipsResponse) Status() string { +func (r GetManagedDatabasesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11017,51 +10887,28 @@ func (r GetTeamMembershipsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTeamMembershipsResponse) StatusCode() int { +func (r GetManagedDatabasesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteTeamMembershipResponse struct { +type CreateManagedDatabaseResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *ManagedDatabase JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON409 *Conflict + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteTeamMembershipResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamMembershipResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListMonthlyLimitsByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListMonthlyLimitsByTeam200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListMonthlyLimitsByTeamResponse) Status() string { +func (r CreateManagedDatabaseResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11069,26 +10916,24 @@ func (r ListMonthlyLimitsByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListMonthlyLimitsByTeamResponse) StatusCode() int { +func (r CreateManagedDatabaseResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateMonthlyLimitResponse struct { +type DeleteManagedDatabaseResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *MonthlyLimit JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateMonthlyLimitResponse) Status() string { +func (r DeleteManagedDatabaseResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11096,24 +10941,24 @@ func (r CreateMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateMonthlyLimitResponse) StatusCode() int { +func (r DeleteManagedDatabaseResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteMonthlyLimitResponse struct { +type GetManagedDatabaseResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ManagedDatabase JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteMonthlyLimitResponse) Status() string { +func (r GetManagedDatabaseResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11121,17 +10966,18 @@ func (r DeleteMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteMonthlyLimitResponse) StatusCode() int { +func (r GetManagedDatabaseResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMonthlyLimitResponse struct { +type GetTeamMembershipsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonthlyLimit + JSON200 *GetTeamMemberships200Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound @@ -11139,7 +10985,7 @@ type GetMonthlyLimitResponse struct { } // Status returns HTTPResponse.Status -func (r GetMonthlyLimitResponse) Status() string { +func (r GetTeamMembershipsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11147,17 +10993,16 @@ func (r GetMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMonthlyLimitResponse) StatusCode() int { +func (r GetTeamMembershipsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateMonthlyLimitResponse struct { +type DeleteTeamMembershipResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MonthlyLimit JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden @@ -11166,7 +11011,7 @@ type UpdateMonthlyLimitResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateMonthlyLimitResponse) Status() string { +func (r DeleteTeamMembershipResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11174,7 +11019,7 @@ func (r UpdateMonthlyLimitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateMonthlyLimitResponse) StatusCode() int { +func (r DeleteTeamMembershipResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -13139,83 +12984,66 @@ func (c *ClientWithResponses) ListInvoicesByTeamWithResponse(ctx context.Context return ParseListInvoicesByTeamResponse(rsp) } -// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse -func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { - rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTeamMembershipsResponse(rsp) -} - -// DeleteTeamMembershipWithResponse request returning *DeleteTeamMembershipResponse -func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { - rsp, err := c.DeleteTeamMembership(ctx, teamName, email, reqEditors...) +// GetManagedDatabasesWithResponse request returning *GetManagedDatabasesResponse +func (c *ClientWithResponses) GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) { + rsp, err := c.GetManagedDatabases(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseDeleteTeamMembershipResponse(rsp) + return ParseGetManagedDatabasesResponse(rsp) } -// ListMonthlyLimitsByTeamWithResponse request returning *ListMonthlyLimitsByTeamResponse -func (c *ClientWithResponses) ListMonthlyLimitsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListMonthlyLimitsByTeamParams, reqEditors ...RequestEditorFn) (*ListMonthlyLimitsByTeamResponse, error) { - rsp, err := c.ListMonthlyLimitsByTeam(ctx, teamName, params, reqEditors...) +// CreateManagedDatabaseWithBodyWithResponse request with arbitrary body returning *CreateManagedDatabaseResponse +func (c *ClientWithResponses) CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { + rsp, err := c.CreateManagedDatabaseWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseListMonthlyLimitsByTeamResponse(rsp) + return ParseCreateManagedDatabaseResponse(rsp) } -// CreateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *CreateMonthlyLimitResponse -func (c *ClientWithResponses) CreateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { - rsp, err := c.CreateMonthlyLimitWithBody(ctx, teamName, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { + rsp, err := c.CreateManagedDatabase(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateMonthlyLimitResponse(rsp) + return ParseCreateManagedDatabaseResponse(rsp) } -func (c *ClientWithResponses) CreateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, body CreateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMonthlyLimitResponse, error) { - rsp, err := c.CreateMonthlyLimit(ctx, teamName, body, reqEditors...) +// DeleteManagedDatabaseWithResponse request returning *DeleteManagedDatabaseResponse +func (c *ClientWithResponses) DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) { + rsp, err := c.DeleteManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) if err != nil { return nil, err } - return ParseCreateMonthlyLimitResponse(rsp) + return ParseDeleteManagedDatabaseResponse(rsp) } -// DeleteMonthlyLimitWithResponse request returning *DeleteMonthlyLimitResponse -func (c *ClientWithResponses) DeleteMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeleteMonthlyLimitResponse, error) { - rsp, err := c.DeleteMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) +// GetManagedDatabaseWithResponse request returning *GetManagedDatabaseResponse +func (c *ClientWithResponses) GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) { + rsp, err := c.GetManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) if err != nil { return nil, err } - return ParseDeleteMonthlyLimitResponse(rsp) + return ParseGetManagedDatabaseResponse(rsp) } -// GetMonthlyLimitWithResponse request returning *GetMonthlyLimitResponse -func (c *ClientWithResponses) GetMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetMonthlyLimitResponse, error) { - rsp, err := c.GetMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetMonthlyLimitResponse(rsp) -} - -// UpdateMonthlyLimitWithBodyWithResponse request with arbitrary body returning *UpdateMonthlyLimitResponse -func (c *ClientWithResponses) UpdateMonthlyLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { - rsp, err := c.UpdateMonthlyLimitWithBody(ctx, teamName, pluginTeam, pluginKind, pluginName, contentType, body, reqEditors...) +// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse +func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { + rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdateMonthlyLimitResponse(rsp) + return ParseGetTeamMembershipsResponse(rsp) } -func (c *ClientWithResponses) UpdateMonthlyLimitWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, body UpdateMonthlyLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMonthlyLimitResponse, error) { - rsp, err := c.UpdateMonthlyLimit(ctx, teamName, pluginTeam, pluginKind, pluginName, body, reqEditors...) +// DeleteTeamMembershipWithResponse request returning *DeleteTeamMembershipResponse +func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { + rsp, err := c.DeleteTeamMembership(ctx, teamName, email, reqEditors...) if err != nil { return nil, err } - return ParseUpdateMonthlyLimitResponse(rsp) + return ParseDeleteTeamMembershipResponse(rsp) } // DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse @@ -16947,22 +16775,22 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes return response, nil } -// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call -func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { +// ParseGetManagedDatabasesResponse parses an HTTP response from a GetManagedDatabasesWithResponse call +func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamMembershipsResponse{ + response := &GetManagedDatabasesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetTeamMemberships200Response + var dest GetManagedDatabases200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -17008,20 +16836,27 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } -// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call -func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { +// ParseCreateManagedDatabaseResponse parses an HTTP response from a CreateManagedDatabaseWithResponse call +func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamMembershipResponse{ + response := &CreateManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ManagedDatabase + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -17050,59 +16885,19 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListMonthlyLimitsByTeamResponse parses an HTTP response from a ListMonthlyLimitsByTeamWithResponse call -func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimitsByTeamResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListMonthlyLimitsByTeamResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListMonthlyLimitsByTeam200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -17116,27 +16911,20 @@ func ParseListMonthlyLimitsByTeamResponse(rsp *http.Response) (*ListMonthlyLimit return response, nil } -// ParseCreateMonthlyLimitResponse parses an HTTP response from a CreateMonthlyLimitWithResponse call -func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitResponse, error) { +// ParseDeleteManagedDatabaseResponse parses an HTTP response from a DeleteManagedDatabaseWithResponse call +func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateMonthlyLimitResponse{ + response := &DeleteManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest MonthlyLimit - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -17144,13 +16932,6 @@ func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -17177,33 +16958,33 @@ func ParseCreateMonthlyLimitResponse(rsp *http.Response) (*CreateMonthlyLimitRes return response, nil } -// ParseDeleteMonthlyLimitResponse parses an HTTP response from a DeleteMonthlyLimitWithResponse call -func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitResponse, error) { +// ParseGetManagedDatabaseResponse parses an HTTP response from a GetManagedDatabaseWithResponse call +func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteMonthlyLimitResponse{ + response := &GetManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ManagedDatabase if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -17224,27 +17005,34 @@ func ParseDeleteMonthlyLimitResponse(rsp *http.Response) (*DeleteMonthlyLimitRes return response, nil } -// ParseGetMonthlyLimitResponse parses an HTTP response from a GetMonthlyLimitWithResponse call -func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, error) { +// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call +func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonthlyLimitResponse{ + response := &GetTeamMembershipsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonthlyLimit + var dest GetTeamMemberships200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -17278,27 +17066,20 @@ func ParseGetMonthlyLimitResponse(rsp *http.Response) (*GetMonthlyLimitResponse, return response, nil } -// ParseUpdateMonthlyLimitResponse parses an HTTP response from a UpdateMonthlyLimitWithResponse call -func ParseUpdateMonthlyLimitResponse(rsp *http.Response) (*UpdateMonthlyLimitResponse, error) { +// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call +func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateMonthlyLimitResponse{ + response := &DeleteTeamMembershipResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MonthlyLimit - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index a19171f..d6729c0 100644 --- a/models.gen.go +++ b/models.gen.go @@ -60,6 +60,15 @@ const ( EmailTeamInvitationRequestRoleMember EmailTeamInvitationRequestRole = "member" ) +// Defines values for ManagedDatabaseStatus. +const ( + ManagedDatabaseStatusExpired ManagedDatabaseStatus = "expired" + ManagedDatabaseStatusFailed ManagedDatabaseStatus = "failed" + ManagedDatabaseStatusPending ManagedDatabaseStatus = "pending" + ManagedDatabaseStatusProcessing ManagedDatabaseStatus = "processing" + ManagedDatabaseStatusReady ManagedDatabaseStatus = "ready" +) + // Defines values for PluginCategory. const ( PluginCategoryCloudFinops PluginCategory = "cloud-finops" @@ -691,6 +700,12 @@ type GetCurrentUserMemberships200Response struct { Metadata ListMetadata `json:"metadata"` } +// GetManagedDatabases200Response defines model for GetManagedDatabases_200_response. +type GetManagedDatabases200Response struct { + Items []ManagedDatabase `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + // GetTeamMemberships200Response defines model for GetTeamMemberships_200_response. type GetTeamMemberships200Response struct { Items []MembershipWithUser `json:"items"` @@ -824,12 +839,6 @@ type ListMetadata struct { TotalCount *int `json:"total_count,omitempty"` } -// ListMonthlyLimitsByTeam200Response defines model for ListMonthlyLimitsByTeam_200_response. -type ListMonthlyLimitsByTeam200Response struct { - Items []MonthlyLimit `json:"items"` - Metadata ListMetadata `json:"metadata"` -} - // ListPlugin defines model for ListPlugin. type ListPlugin struct { // Category Supported categories for plugins @@ -994,6 +1003,33 @@ type ListUsersByTeam200Response struct { Metadata ListMetadata `json:"metadata"` } +// ManagedDatabase Managed Database definition +type ManagedDatabase struct { + // ConnectionString The connection string to the database + ConnectionString *string `json:"connection_string,omitempty"` + + // CreatedAt Time the managed database was created + CreatedAt time.Time `json:"created_at"` + + // Expiration Time the managed database should expire + Expiration *time.Time `json:"expiration,omitempty"` + + // Id The identifier for the managed database + ManagedDatabaseID ManagedDatabaseID `json:"id"` + + // Status The status of the managed database + Status ManagedDatabaseStatus `json:"status"` +} + +// ManagedDatabaseCreate Managed Database creation +type ManagedDatabaseCreate = map[string]interface{} + +// ManagedDatabaseID The identifier for the managed database +type ManagedDatabaseID = openapi_types.UUID + +// ManagedDatabaseStatus The status of the managed database +type ManagedDatabaseStatus string + // MembershipWithTeam defines model for MembershipWithTeam. type MembershipWithTeam struct { Role string `json:"role"` @@ -1010,48 +1046,6 @@ type MembershipWithUser struct { User *User `json:"user,omitempty"` } -// MonthlyLimit A configurable monthly limit for plugin usage. -type MonthlyLimit struct { - // CreatedAt The date and time the plugin limit was created. - CreatedAt time.Time `json:"created_at"` - - // PluginKind The kind of plugin, ie. source or destination. - PluginKind PluginKind `json:"plugin_kind"` - - // PluginName The unique name for the plugin. - PluginName PluginName `json:"plugin_name"` - - // PluginTeam The unique name for the team. - PluginTeam TeamName `json:"plugin_team"` - - // UpdatedAt The date and time the plugin limit was last updated. - UpdatedAt time.Time `json:"updated_at"` - - // Usd The maximum USD amount the plugin is allowed to use within a calendar month. - USD int `json:"usd"` -} - -// MonthlyLimitCreate A configurable monthly limit for plugin usage. -type MonthlyLimitCreate struct { - // PluginKind The kind of plugin, ie. source or destination. - PluginKind PluginKind `json:"plugin_kind"` - - // PluginName The unique name for the plugin. - PluginName PluginName `json:"plugin_name"` - - // PluginTeam The unique name for the team. - PluginTeam TeamName `json:"plugin_team"` - - // Usd The maximum USD amount the plugin is allowed to use within a calendar month. - USD int `json:"usd"` -} - -// MonthlyLimitUpdate A configurable monthly limit for plugin usage. -type MonthlyLimitUpdate struct { - // Usd The maximum USD amount the plugin is allowed to use within a calendar month. - USD int `json:"usd"` -} - // Plugin CloudQuery Plugin type Plugin struct { // Category Supported categories for plugins @@ -1982,6 +1976,12 @@ type SyncTestConnection struct { // CreatedAt Whether the sync is disabled CreatedAt time.Time `json:"created_at"` + // FailureCode Code for failure + FailureCode *string `json:"failure_code,omitempty"` + + // FailureReason Reason for failure + FailureReason *string `json:"failure_reason,omitempty"` + // Id unique ID of the test connection ID ID `json:"id"` @@ -2127,6 +2127,12 @@ type UpdateSyncRunRequest struct { // UpdateSyncTestConnectionRequest defines model for UpdateSyncTestConnection_request. type UpdateSyncTestConnectionRequest struct { + // FailureCode Code for failure + FailureCode *string `json:"failure_code,omitempty"` + + // FailureReason Reason for failure + FailureReason *string `json:"failure_reason,omitempty"` + // Status The status of the sync run Status SyncTestConnectionStatus `json:"status"` } @@ -2320,6 +2326,9 @@ type VersionSortBy string // BadRequest defines model for BadRequest. type BadRequest = FieldError +// Conflict Basic Error +type Conflict = BasicError + // Forbidden defines model for Forbidden. type Forbidden = FieldError @@ -2530,8 +2539,8 @@ type ListInvoicesByTeamParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } -// GetTeamMembershipsParams defines parameters for GetTeamMemberships. -type GetTeamMembershipsParams struct { +// GetManagedDatabasesParams defines parameters for GetManagedDatabases. +type GetManagedDatabasesParams struct { // Page Page number of the results to fetch Page *Page `form:"page,omitempty" json:"page,omitempty"` @@ -2539,8 +2548,8 @@ type GetTeamMembershipsParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } -// ListMonthlyLimitsByTeamParams defines parameters for ListMonthlyLimitsByTeam. -type ListMonthlyLimitsByTeamParams struct { +// GetTeamMembershipsParams defines parameters for GetTeamMemberships. +type GetTeamMembershipsParams struct { // Page Page number of the results to fetch Page *Page `form:"page,omitempty" json:"page,omitempty"` @@ -2761,11 +2770,8 @@ type EmailTeamInvitationJSONRequestBody = EmailTeamInvitationRequest // AcceptTeamInvitationJSONRequestBody defines body for AcceptTeamInvitation for application/json ContentType. type AcceptTeamInvitationJSONRequestBody = AcceptTeamInvitationRequest -// CreateMonthlyLimitJSONRequestBody defines body for CreateMonthlyLimit for application/json ContentType. -type CreateMonthlyLimitJSONRequestBody = MonthlyLimitCreate - -// UpdateMonthlyLimitJSONRequestBody defines body for UpdateMonthlyLimit for application/json ContentType. -type UpdateMonthlyLimitJSONRequestBody = MonthlyLimitUpdate +// CreateManagedDatabaseJSONRequestBody defines body for CreateManagedDatabase for application/json ContentType. +type CreateManagedDatabaseJSONRequestBody = ManagedDatabaseCreate // CreateSpendingLimitJSONRequestBody defines body for CreateSpendingLimit for application/json ContentType. type CreateSpendingLimitJSONRequestBody = SpendingLimitCreate diff --git a/spec.json b/spec.json index e8381e4..514449e 100644 --- a/spec.json +++ b/spec.json @@ -37,6 +37,8 @@ "name" : "registry" }, { "name" : "syncs" + }, { + "name" : "managed-databases" } ], "paths" : { "/" : { @@ -2246,90 +2248,6 @@ "tags" : [ "teams" ] } }, - "/teams/{team_name}/monthly-limits" : { - "get" : { - "deprecated" : true, - "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nList all monthly limits for the team.\n", - "operationId" : "ListMonthlyLimitsByTeam", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/page" - }, { - "$ref" : "#/components/parameters/per_page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListMonthlyLimitsByTeam_200_response" - } - } - }, - "description" : "List of monthly limits for the team." - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - }, - "post" : { - "deprecated" : true, - "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nCreate a monthly limit for a plugin\n", - "operationId" : "CreateMonthlyLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MonthlyLimitCreate" - } - } - } - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MonthlyLimit" - } - } - }, - "description" : "New monthly limit created." - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - } - }, "/teams/{team_name}/spending-limits" : { "delete" : { "description" : "Delete a spending limit for a team", @@ -2477,129 +2395,6 @@ "tags" : [ "teams" ] } }, - "/teams/{team_name}/monthly-limits/{plugin_team}/{plugin_kind}/{plugin_name}" : { - "delete" : { - "description" : "Delete a monthly limit for a plugin", - "operationId" : "DeleteMonthlyLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/plugin_team" - }, { - "$ref" : "#/components/parameters/plugin_kind" - }, { - "$ref" : "#/components/parameters/plugin_name" - } ], - "responses" : { - "204" : { - "description" : "Monthly limit deleted." - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - }, - "get" : { - "deprecated" : true, - "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nGet a monthly limit for a plugin\n", - "operationId" : "GetMonthlyLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/plugin_team" - }, { - "$ref" : "#/components/parameters/plugin_kind" - }, { - "$ref" : "#/components/parameters/plugin_name" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MonthlyLimit" - } - } - }, - "description" : "Monthly limit retrieved." - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - }, - "put" : { - "deprecated" : true, - "description" : "This endpoint is deprecated. Use the /teams/{team_name}/spending-limits endpoint instead.\nUpdate a monthly limit for a plugin\n", - "operationId" : "UpdateMonthlyLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/plugin_team" - }, { - "$ref" : "#/components/parameters/plugin_kind" - }, { - "$ref" : "#/components/parameters/plugin_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MonthlyLimitUpdate" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/MonthlyLimit" - } - } - }, - "description" : "Monthly limit updated." - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - } - }, "/teams/{team_name}/invoices" : { "get" : { "description" : "List all past invoices for the team.", @@ -4849,6 +4644,162 @@ }, "tags" : [ "syncs" ] } + }, + "/teams/{team_name}/managed-databases" : { + "get" : { + "description" : "Get a paginated list of managed databases", + "operationId" : "GetManagedDatabases", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetManagedDatabases_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + }, + "post" : { + "description" : "Create a new managed database", + "operationId" : "CreateManagedDatabase", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabaseCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabase" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + } + }, + "/teams/{team_name}/managed-databases/{managed_database_id}" : { + "delete" : { + "description" : "Delete this managed database. Any syncs relying on this database must be deleted first.", + "operationId" : "DeleteManagedDatabase", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/managed_database_id" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + }, + "get" : { + "description" : "Get a single managed database.", + "operationId" : "GetManagedDatabase", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/managed_database_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabase" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + } } }, "components" : { @@ -5153,6 +5104,17 @@ "$ref" : "#/components/schemas/SyncTestConnectionID" }, "style" : "simple" + }, + "managed_database_id" : { + "explode" : false, + "in" : "path", + "name" : "managed_database_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabaseID" + }, + "style" : "simple", + "x-go-name" : "ManagedDatabaseID" } }, "responses" : { @@ -5255,6 +5217,16 @@ } }, "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry" + }, + "Conflict" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Conflict" } }, "schemas" : { @@ -6682,68 +6654,6 @@ "required" : [ "role" ], "title" : "CloudQuery User Membership" }, - "MonthlyLimit" : { - "additionalProperties" : false, - "description" : "A configurable monthly limit for plugin usage.", - "properties" : { - "created_at" : { - "description" : "The date and time the plugin limit was created.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "description" : "The date and time the plugin limit was last updated.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "plugin_team" : { - "$ref" : "#/components/schemas/TeamName" - }, - "plugin_kind" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "plugin_name" : { - "$ref" : "#/components/schemas/PluginName" - }, - "usd" : { - "description" : "The maximum USD amount the plugin is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "required" : [ "created_at", "plugin_kind", "plugin_name", "plugin_team", "updated_at", "usd" ], - "title" : "CloudQuery Plugin Monthly Limit" - }, - "MonthlyLimitCreate" : { - "additionalProperties" : false, - "description" : "A configurable monthly limit for plugin usage.", - "properties" : { - "plugin_team" : { - "$ref" : "#/components/schemas/TeamName" - }, - "plugin_kind" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "plugin_name" : { - "$ref" : "#/components/schemas/PluginName" - }, - "usd" : { - "description" : "The maximum USD amount the plugin is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "required" : [ "plugin_kind", "plugin_name", "plugin_team", "usd" ], - "title" : "CloudQuery Plugin Monthly Limit" - }, "SpendingLimit" : { "additionalProperties" : false, "description" : "A configurable spending limit for the team. Empty values indicate no limit.", @@ -6803,22 +6713,6 @@ "required" : [ "usd" ], "title" : "Team Spending Limit" }, - "MonthlyLimitUpdate" : { - "additionalProperties" : false, - "description" : "A configurable monthly limit for plugin usage.", - "properties" : { - "usd" : { - "description" : "The maximum USD amount the plugin is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "required" : [ "usd" ], - "title" : "CloudQuery Plugin Monthly Limit" - }, "Invoice" : { "additionalProperties" : false, "description" : "Invoice details", @@ -7429,6 +7323,16 @@ "status" : { "$ref" : "#/components/schemas/SyncTestConnectionStatus" }, + "failure_reason" : { + "description" : "Reason for failure", + "example" : "password authentication failed for user \"exampleuser\"", + "type" : "string" + }, + "failure_code" : { + "description" : "Code for failure", + "example" : "INVALID_CREDENTIALS", + "type" : "string" + }, "created_at" : { "description" : "Whether the sync is disabled", "example" : "2017-07-14T16:53:42Z", @@ -7841,6 +7745,50 @@ } } ] }, + "ManagedDatabaseID" : { + "description" : "The identifier for the managed database", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ManagedDatabaseID" + }, + "ManagedDatabaseStatus" : { + "description" : "The status of the managed database", + "enum" : [ "pending", "processing", "ready", "failed", "expired" ], + "type" : "string" + }, + "ManagedDatabase" : { + "description" : "Managed Database definition", + "properties" : { + "created_at" : { + "description" : "Time the managed database was created", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "connection_string" : { + "description" : "The connection string to the database", + "type" : "string" + }, + "expiration" : { + "description" : "Time the managed database should expire", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/ManagedDatabaseID" + }, + "status" : { + "$ref" : "#/components/schemas/ManagedDatabaseStatus" + } + }, + "required" : [ "created_at", "id", "status" ] + }, + "ManagedDatabaseCreate" : { + "description" : "Managed Database creation", + "type" : "object" + }, "ListPluginNotificationRequests_200_response" : { "properties" : { "items" : { @@ -8283,20 +8231,6 @@ }, "required" : [ "items", "metadata" ] }, - "ListMonthlyLimitsByTeam_200_response" : { - "properties" : { - "items" : { - "items" : { - "$ref" : "#/components/schemas/MonthlyLimit" - }, - "type" : "array" - }, - "metadata" : { - "$ref" : "#/components/schemas/ListMetadata" - } - }, - "required" : [ "items", "metadata" ] - }, "ListInvoicesByTeam_200_response" : { "properties" : { "items" : { @@ -8567,10 +8501,34 @@ "properties" : { "status" : { "$ref" : "#/components/schemas/SyncTestConnectionStatus" + }, + "failure_reason" : { + "description" : "Reason for failure", + "example" : "password authentication failed for user \"exampleuser\"", + "type" : "string" + }, + "failure_code" : { + "description" : "Code for failure", + "example" : "INVALID_CREDENTIALS", + "type" : "string" } }, "required" : [ "status" ] }, + "GetManagedDatabases_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/ManagedDatabase" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From 55844ac33be0bba72dc9de289ab33a6aaccb4b77 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 17 May 2024 12:31:01 +0300 Subject: [PATCH 157/343] chore(main): Release v1.11.2 (#165) :robot: I have created a release *beep* *boop* --- ## [1.11.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.1...v1.11.2) (2024-05-17) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#164](https://github.com/cloudquery/cloudquery-api-go/issues/164)) ([36294a6](https://github.com/cloudquery/cloudquery-api-go/commit/36294a688773187f26e424893022e98ec812dd14)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a09ae3d..f2c6c0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.11.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.1...v1.11.2) (2024-05-17) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#164](https://github.com/cloudquery/cloudquery-api-go/issues/164)) ([36294a6](https://github.com/cloudquery/cloudquery-api-go/commit/36294a688773187f26e424893022e98ec812dd14)) + ## [1.11.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.0...v1.11.1) (2024-05-10) From a596adc8b5c06e5c7312dd5cf002b61e9dc71107 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 27 May 2024 12:51:05 +0300 Subject: [PATCH 158/343] fix: Generate CloudQuery Go API Client from `spec.json` (#166) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 9 ++++----- spec.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/models.gen.go b/models.gen.go index d6729c0..b8200c4 100644 --- a/models.gen.go +++ b/models.gen.go @@ -62,11 +62,10 @@ const ( // Defines values for ManagedDatabaseStatus. const ( - ManagedDatabaseStatusExpired ManagedDatabaseStatus = "expired" - ManagedDatabaseStatusFailed ManagedDatabaseStatus = "failed" - ManagedDatabaseStatusPending ManagedDatabaseStatus = "pending" - ManagedDatabaseStatusProcessing ManagedDatabaseStatus = "processing" - ManagedDatabaseStatusReady ManagedDatabaseStatus = "ready" + ManagedDatabaseStatusExpired ManagedDatabaseStatus = "expired" + ManagedDatabaseStatusFailed ManagedDatabaseStatus = "failed" + ManagedDatabaseStatusPending ManagedDatabaseStatus = "pending" + ManagedDatabaseStatusReady ManagedDatabaseStatus = "ready" ) // Defines values for PluginCategory. diff --git a/spec.json b/spec.json index 514449e..bca2ef6 100644 --- a/spec.json +++ b/spec.json @@ -7754,7 +7754,7 @@ }, "ManagedDatabaseStatus" : { "description" : "The status of the managed database", - "enum" : [ "pending", "processing", "ready", "failed", "expired" ], + "enum" : [ "pending", "ready", "failed", "expired" ], "type" : "string" }, "ManagedDatabase" : { From 0706f83b76745bc9fedb111c6dbd018ca2fa90da Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 28 May 2024 18:05:15 +0300 Subject: [PATCH 159/343] fix: Generate CloudQuery Go API Client from `spec.json` (#168) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 8 +++ spec.json | 47 +++++++++++++ 3 files changed, 233 insertions(+) diff --git a/client.gen.go b/client.gen.go index 2241c1d..26bc832 100644 --- a/client.gen.go +++ b/client.gen.go @@ -295,6 +295,11 @@ type ClientInterface interface { CreateTeamImages(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeamInvitationWithBody request with any body + DeleteTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteTeamInvitation(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamInvitations request ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1399,6 +1404,30 @@ func (c *Client) CreateTeamImages(ctx context.Context, teamName TeamName, body C return c.Client.Do(req) } +func (c *Client) DeleteTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteTeamInvitation(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamInvitationRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamInvitationsRequest(c.Server, teamName, params) if err != nil { @@ -5655,6 +5684,53 @@ func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, conten return req, nil } +// NewDeleteTeamInvitationRequest calls the generic DeleteTeamInvitation builder with application/json body +func NewDeleteTeamInvitationRequest(server string, teamName TeamName, body DeleteTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewDeleteTeamInvitationRequestWithBody generates requests for DeleteTeamInvitation with any type of body +func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListTeamInvitationsRequest generates requests for ListTeamInvitations func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { var err error @@ -9119,6 +9195,11 @@ type ClientWithResponsesInterface interface { CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + // DeleteTeamInvitationWithBodyWithResponse request with any body + DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) + + DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) + // ListTeamInvitationsWithResponse request ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) @@ -10739,6 +10820,32 @@ func (r CreateTeamImagesResponse) StatusCode() int { return 0 } +type DeleteTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamInvitationsResponse struct { Body []byte HTTPResponse *http.Response @@ -12923,6 +13030,23 @@ func (c *ClientWithResponses) CreateTeamImagesWithResponse(ctx context.Context, return ParseCreateTeamImagesResponse(rsp) } +// DeleteTeamInvitationWithBodyWithResponse request with arbitrary body returning *DeleteTeamInvitationResponse +func (c *ClientWithResponses) DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { + rsp, err := c.DeleteTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamInvitationResponse(rsp) +} + +func (c *ClientWithResponses) DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { + rsp, err := c.DeleteTeamInvitation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamInvitationResponse(rsp) +} + // ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) @@ -16519,6 +16643,60 @@ func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesRespons return response, nil } +// ParseDeleteTeamInvitationResponse parses an HTTP response from a DeleteTeamInvitationWithResponse call +func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTeamInvitationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index b8200c4..5797270 100644 --- a/models.gen.go +++ b/models.gen.go @@ -668,6 +668,11 @@ type DeletePluginVersionTablesRequest struct { Names []PluginTableName `json:"names"` } +// DeleteTeamInvitationRequest defines model for DeleteTeamInvitation_request. +type DeleteTeamInvitationRequest struct { + Email openapi_types.Email `json:"email"` +} + // DockerError Error Returned from the Docker Authorization Handler to the Docker Registry type DockerError struct { Details string `json:"details"` @@ -2763,6 +2768,9 @@ type CreateTeamAPIKeyJSONRequestBody = CreateTeamAPIKeyRequest // CreateTeamImagesJSONRequestBody defines body for CreateTeamImages for application/json ContentType. type CreateTeamImagesJSONRequestBody = CreateTeamImagesRequest +// DeleteTeamInvitationJSONRequestBody defines body for DeleteTeamInvitation for application/json ContentType. +type DeleteTeamInvitationJSONRequestBody = DeleteTeamInvitationRequest + // EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. type EmailTeamInvitationJSONRequestBody = EmailTeamInvitationRequest diff --git a/spec.json b/spec.json index bca2ef6..82a2c6a 100644 --- a/spec.json +++ b/spec.json @@ -2960,6 +2960,43 @@ } }, "/teams/{team_name}/invitations" : { + "delete" : { + "description" : "Delete an invitation to the team, preventing the user becoming a team member", + "operationId" : "DeleteTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeleteTeamInvitation_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, "get" : { "description" : "List of open invitations to the team", "operationId" : "ListTeamInvitations", @@ -3092,6 +3129,7 @@ }, "/teams/{team_name}/invitations/{email}" : { "delete" : { + "deprecated" : true, "description" : "Cancel an invitation to the team, preventing the user becoming a team member", "operationId" : "CancelTeamInvitation", "parameters" : [ { @@ -8286,6 +8324,15 @@ }, "required" : [ "email", "role" ] }, + "DeleteTeamInvitation_request" : { + "properties" : { + "email" : { + "format" : "email", + "type" : "string" + } + }, + "required" : [ "email" ] + }, "AcceptTeamInvitation_request" : { "properties" : { "token" : { From 2cdf436608b4d01a2ebccaa0769c57468e1c5499 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 30 May 2024 19:36:02 +0300 Subject: [PATCH 160/343] fix: Generate CloudQuery Go API Client from `spec.json` (#169) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ spec.json | 14 ++++++++ 2 files changed, 105 insertions(+) diff --git a/client.gen.go b/client.gen.go index 26bc832..e2cd80d 100644 --- a/client.gen.go +++ b/client.gen.go @@ -137,6 +137,9 @@ type ClientInterface interface { // UploadAddonAsset request UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + // CQHealthCheck request + CQHealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginNotificationRequests request ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -708,6 +711,18 @@ func (c *Client) UploadAddonAsset(ctx context.Context, teamName TeamName, addonT return c.Client.Do(req) } +func (c *Client) CQHealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCQHealthCheckRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginNotificationRequestsRequest(c.Server, params) if err != nil { @@ -3103,6 +3118,33 @@ func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType Addo return req, nil } +// NewCQHealthCheckRequest generates requests for CQHealthCheck +func NewCQHealthCheckRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/cq-healthcheck") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { var err error @@ -9037,6 +9079,9 @@ type ClientWithResponsesInterface interface { // UploadAddonAssetWithResponse request UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + // CQHealthCheckWithResponse request + CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) + // ListPluginNotificationRequestsWithResponse request ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) @@ -9724,6 +9769,27 @@ func (r UploadAddonAssetResponse) StatusCode() int { return 0 } +type CQHealthCheckResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r CQHealthCheckResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CQHealthCheckResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginNotificationRequestsResponse struct { Body []byte HTTPResponse *http.Response @@ -12524,6 +12590,15 @@ func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, return ParseUploadAddonAssetResponse(rsp) } +// CQHealthCheckWithResponse request returning *CQHealthCheckResponse +func (c *ClientWithResponses) CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) { + rsp, err := c.CQHealthCheck(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCQHealthCheckResponse(rsp) +} + // ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) @@ -14347,6 +14422,22 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons return response, nil } +// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call +func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CQHealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + // ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/spec.json b/spec.json index 82a2c6a..471ae91 100644 --- a/spec.json +++ b/spec.json @@ -54,6 +54,20 @@ "tags" : [ "healthcheck" ] } }, + "/cq-healthcheck" : { + "get" : { + "description" : "Health check endpoint, returns 200", + "operationId" : "CQHealthCheck", + "responses" : { + "200" : { + "description" : "Response" + } + }, + "security" : [ ], + "tags" : [ "healthcheck" ], + "x-internal" : true + } + }, "/upload/image" : { "post" : { "description" : "Get a URL to upload image that will be publicly accessible", From c1b35a2cf2d4436bc44dc2c2a3d4dd0e2295b2cf Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:40:05 +0300 Subject: [PATCH 161/343] chore(main): Release v1.11.3 (#167) :robot: I have created a release *beep* *boop* --- ## [1.11.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.2...v1.11.3) (2024-05-30) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#166](https://github.com/cloudquery/cloudquery-api-go/issues/166)) ([a596adc](https://github.com/cloudquery/cloudquery-api-go/commit/a596adc8b5c06e5c7312dd5cf002b61e9dc71107)) * Generate CloudQuery Go API Client from `spec.json` ([#168](https://github.com/cloudquery/cloudquery-api-go/issues/168)) ([0706f83](https://github.com/cloudquery/cloudquery-api-go/commit/0706f83b76745bc9fedb111c6dbd018ca2fa90da)) * Generate CloudQuery Go API Client from `spec.json` ([#169](https://github.com/cloudquery/cloudquery-api-go/issues/169)) ([2cdf436](https://github.com/cloudquery/cloudquery-api-go/commit/2cdf436608b4d01a2ebccaa0769c57468e1c5499)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c6c0a..74a7649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.11.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.2...v1.11.3) (2024-05-30) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#166](https://github.com/cloudquery/cloudquery-api-go/issues/166)) ([a596adc](https://github.com/cloudquery/cloudquery-api-go/commit/a596adc8b5c06e5c7312dd5cf002b61e9dc71107)) +* Generate CloudQuery Go API Client from `spec.json` ([#168](https://github.com/cloudquery/cloudquery-api-go/issues/168)) ([0706f83](https://github.com/cloudquery/cloudquery-api-go/commit/0706f83b76745bc9fedb111c6dbd018ca2fa90da)) +* Generate CloudQuery Go API Client from `spec.json` ([#169](https://github.com/cloudquery/cloudquery-api-go/issues/169)) ([2cdf436](https://github.com/cloudquery/cloudquery-api-go/commit/2cdf436608b4d01a2ebccaa0769c57468e1c5499)) + ## [1.11.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.1...v1.11.2) (2024-05-17) From cfc4eed76e9122d702c6e249cb9ab5acaca17ee3 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:40:32 +0300 Subject: [PATCH 162/343] fix: Generate CloudQuery Go API Client from `spec.json` (#170) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 5272 ++++++++++++++++++++++++++++++------------------- models.gen.go | 164 ++ spec.json | 498 +++++ 3 files changed, 3902 insertions(+), 2032 deletions(-) diff --git a/client.gen.go b/client.gen.go index e2cd80d..102a3ca 100644 --- a/client.gen.go +++ b/client.gen.go @@ -293,6 +293,35 @@ type ClientInterface interface { // DeleteTeamAPIKey request DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListConnectors request + ListConnectors(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateConnectorWithBody request with any body + CreateConnectorWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateConnector(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetConnector request + GetConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateConnectorWithBody request with any body + UpdateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RevokeConnector request + RevokeConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthenticateConnectorFinishWithBody request with any body + AuthenticateConnectorFinishWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AuthenticateConnectorFinish(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthenticateConnectorWithBody request with any body + AuthenticateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AuthenticateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateTeamImagesWithBody request with any body CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1395,6 +1424,138 @@ func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKey return c.Client.Do(req) } +func (c *Client) ListConnectors(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListConnectorsRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateConnectorWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateConnectorRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateConnector(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateConnectorRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetConnectorRequest(c.Server, teamName, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateConnectorRequestWithBody(c.Server, teamName, connectorID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateConnectorRequest(c.Server, teamName, connectorID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RevokeConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRevokeConnectorRequest(c.Server, teamName, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorFinishWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorFinishRequestWithBody(c.Server, teamName, connectorID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorFinish(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorFinishRequest(c.Server, teamName, connectorID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorRequestWithBody(c.Server, teamName, connectorID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorRequest(c.Server, teamName, connectorID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateTeamImagesRequestWithBody(c.Server, teamName, contentType, body) if err != nil { @@ -5679,66 +5840,8 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyID APIKe return req, nil } -// NewCreateTeamImagesRequest calls the generic CreateTeamImages builder with application/json body -func NewCreateTeamImagesRequest(server string, teamName TeamName, body CreateTeamImagesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateTeamImagesRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateTeamImagesRequestWithBody generates requests for CreateTeamImages with any type of body -func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/images", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteTeamInvitationRequest calls the generic DeleteTeamInvitation builder with application/json body -func NewDeleteTeamInvitationRequest(server string, teamName TeamName, body DeleteTeamInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewDeleteTeamInvitationRequestWithBody generates requests for DeleteTeamInvitation with any type of body -func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewListConnectorsRequest generates requests for ListConnectors +func NewListConnectorsRequest(server string, teamName TeamName, params *ListConnectorsParams) (*http.Request, error) { var err error var pathParam0 string @@ -5753,7 +5856,7 @@ func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, co return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/connectors", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5763,44 +5866,24 @@ func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, co return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListTeamInvitationsRequest generates requests for ListTeamInvitations -func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.PerPage != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params != nil { - queryValues := queryURL.Query() + } if params.Page != nil { @@ -5818,9 +5901,9 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis } - if params.PerPage != nil { + if params.Type != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5845,19 +5928,19 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body -func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { +// NewCreateConnectorRequest calls the generic CreateConnector builder with application/json body +func NewCreateConnectorRequest(server string, teamName TeamName, body CreateConnectorJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateConnectorRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body -func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateConnectorRequestWithBody generates requests for CreateConnector with any type of body +func NewCreateConnectorRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5872,7 +5955,7 @@ func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, con return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/connectors", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5892,19 +5975,8 @@ func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, con return req, nil } -// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body -func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body -func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetConnectorRequest generates requests for GetConnector +func NewGetConnectorRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { var err error var pathParam0 string @@ -5914,12 +5986,19 @@ func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, co return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/connectors/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5929,18 +6008,27 @@ func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, co return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation -func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Email) (*http.Request, error) { +// NewUpdateConnectorRequest calls the generic UpdateConnector builder with application/json body +func NewUpdateConnectorRequest(server string, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateConnectorRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) +} + +// NewUpdateConnectorRequestWithBody generates requests for UpdateConnector with any type of body +func NewUpdateConnectorRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5952,7 +6040,7 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) if err != nil { return nil, err } @@ -5962,7 +6050,7 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/connectors/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5972,16 +6060,18 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListInvoicesByTeamRequest generates requests for ListInvoicesByTeam -func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *ListInvoicesByTeamParams) (*http.Request, error) { +// NewRevokeConnectorRequest generates requests for RevokeConnector +func NewRevokeConnectorRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { var err error var pathParam0 string @@ -5991,12 +6081,19 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invoices", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6006,45 +6103,7 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -6052,8 +6111,19 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List return req, nil } -// NewGetManagedDatabasesRequest generates requests for GetManagedDatabases -func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *GetManagedDatabasesParams) (*http.Request, error) { +// NewAuthenticateConnectorFinishRequest calls the generic AuthenticateConnectorFinish builder with application/json body +func NewAuthenticateConnectorFinishRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAuthenticateConnectorFinishRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) +} + +// NewAuthenticateConnectorFinishRequestWithBody generates requests for AuthenticateConnectorFinish with any type of body +func NewAuthenticateConnectorFinishRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6063,12 +6133,19 @@ func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *Get return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6078,65 +6155,29 @@ func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *Get return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCreateManagedDatabaseRequest calls the generic CreateManagedDatabase builder with application/json body -func NewCreateManagedDatabaseRequest(server string, teamName TeamName, body CreateManagedDatabaseJSONRequestBody) (*http.Request, error) { +// NewAuthenticateConnectorRequest calls the generic AuthenticateConnector builder with application/json body +func NewAuthenticateConnectorRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateManagedDatabaseRequestWithBody(server, teamName, "application/json", bodyReader) + return NewAuthenticateConnectorRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) } -// NewCreateManagedDatabaseRequestWithBody generates requests for CreateManagedDatabase with any type of body -func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewAuthenticateConnectorRequestWithBody generates requests for AuthenticateConnector with any type of body +func NewAuthenticateConnectorRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6146,12 +6187,19 @@ func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, c return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6171,20 +6219,24 @@ func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, c return req, nil } -// NewDeleteManagedDatabaseRequest generates requests for DeleteManagedDatabase -func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewCreateTeamImagesRequest calls the generic CreateTeamImages builder with application/json body +func NewCreateTeamImagesRequest(server string, teamName TeamName, body CreateTeamImagesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamImagesRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewCreateTeamImagesRequestWithBody generates requests for CreateTeamImages with any type of body +func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -6194,7 +6246,7 @@ func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDa return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/images", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6204,28 +6256,34 @@ func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDa return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetManagedDatabaseRequest generates requests for GetManagedDatabase -func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewDeleteTeamInvitationRequest calls the generic DeleteTeamInvitation builder with application/json body +func NewDeleteTeamInvitationRequest(server string, teamName TeamName, body DeleteTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewDeleteTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewDeleteTeamInvitationRequestWithBody generates requests for DeleteTeamInvitation with any type of body +func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -6235,7 +6293,7 @@ func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatab return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6245,16 +6303,18 @@ func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatab return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships -func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { +// NewListTeamInvitationsRequest generates requests for ListTeamInvitations +func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6269,7 +6329,7 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6325,20 +6385,24 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return req, nil } -// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership -func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Email) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body +func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body +func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -6348,7 +6412,7 @@ func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Emai return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6358,16 +6422,29 @@ func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Emai return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam -func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { +// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body +func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body +func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6382,7 +6459,7 @@ func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Requ return nil, err } - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6392,16 +6469,18 @@ func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Requ return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - return req, nil + req.Header.Add("Content-Type", contentType) + + return req, nil } -// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam -func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { +// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation +func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Email) (*http.Request, error) { var err error var pathParam0 string @@ -6411,12 +6490,53 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListInvoicesByTeamRequest generates requests for ListInvoicesByTeam +func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *ListInvoicesByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invoices", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6461,9 +6581,65 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } - if params.IncludePrivate != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetManagedDatabasesRequest generates requests for GetManagedDatabases +func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *GetManagedDatabasesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6488,8 +6664,19 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return req, nil } -// NewDownloadPluginAssetByTeamRequest generates requests for DownloadPluginAssetByTeam -func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams) (*http.Request, error) { +// NewCreateManagedDatabaseRequest calls the generic CreateManagedDatabase builder with application/json body +func NewCreateManagedDatabaseRequest(server string, teamName TeamName, body CreateManagedDatabaseJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateManagedDatabaseRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateManagedDatabaseRequestWithBody generates requests for CreateManagedDatabase with any type of body +func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6499,37 +6686,45 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - var pathParam4 string + req.Header.Add("Content-Type", contentType) - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + return req, nil +} + +// NewDeleteManagedDatabaseRequest generates requests for DeleteManagedDatabase +func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - var pathParam5 string + var pathParam1 string - pathParam5, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) if err != nil { return nil, err } @@ -6539,7 +6734,7 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return nil, err } - operationPath := fmt.Sprintf("/teams/%s/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4, pathParam5) + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6549,31 +6744,57 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - if params != nil { + return req, nil +} - if params.Accept != nil { - var headerParam0 string +// NewGetManagedDatabaseRequest generates requests for GetManagedDatabase +func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { + var err error - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) - if err != nil { - return nil, err - } + var pathParam0 string - req.Header.Set("Accept", headerParam0) - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } return req, nil } -// NewGetTeamSpendRequest generates requests for GetTeamSpend -func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpendParams) (*http.Request, error) { +// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships +func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6588,7 +6809,7 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spend", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6601,9 +6822,9 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe if params != nil { queryValues := queryURL.Query() - if params.Start != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6617,9 +6838,9 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe } - if params.End != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6644,8 +6865,8 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe return req, nil } -// NewDeleteSpendingLimitRequest generates requests for DeleteSpendingLimit -func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { +// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership +func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Email) (*http.Request, error) { var err error var pathParam0 string @@ -6655,12 +6876,19 @@ func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Requ return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6678,8 +6906,8 @@ func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Requ return req, nil } -// NewGetSpendingLimitRequest generates requests for GetSpendingLimit -func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { +// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam +func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -6694,7 +6922,7 @@ func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6704,7 +6932,7 @@ func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -6712,19 +6940,8 @@ func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request return req, nil } -// NewCreateSpendingLimitRequest calls the generic CreateSpendingLimit builder with application/json body -func NewCreateSpendingLimitRequest(server string, teamName TeamName, body CreateSpendingLimitJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateSpendingLimitRequestWithBody generates requests for CreateSpendingLimit with any type of body -func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam +func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -6739,90 +6956,7 @@ func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, con return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewUpdateSpendingLimitRequest calls the generic UpdateSpendingLimit builder with application/json body -func NewUpdateSpendingLimitRequest(server string, teamName TeamName, body UpdateSpendingLimitJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewUpdateSpendingLimitRequestWithBody generates requests for UpdateSpendingLimit with any type of body -func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PUT", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam -func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6867,6 +7001,22 @@ func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, pa } + if params.IncludePrivate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -6878,19 +7028,8 @@ func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, pa return req, nil } -// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body -func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body -func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewDownloadPluginAssetByTeamRequest generates requests for DownloadPluginAssetByTeam +func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -6900,45 +7039,37 @@ func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName Te return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam2 string - queryURL, err := serverURL.Parse(operationPath) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam -func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { - var err error - - var pathParam0 string + var pathParam4 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } - var pathParam1 string + var pathParam5 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) + pathParam5, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) if err != nil { return nil, err } @@ -6948,7 +7079,7 @@ func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, team return nil, err } - operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4, pathParam5) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6963,11 +7094,26 @@ func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, team return nil, err } + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + return req, nil } -// NewListSyncDestinationsRequest generates requests for ListSyncDestinations -func NewListSyncDestinationsRequest(server string, teamName TeamName, params *ListSyncDestinationsParams) (*http.Request, error) { +// NewGetTeamSpendRequest generates requests for GetTeamSpend +func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpendParams) (*http.Request, error) { var err error var pathParam0 string @@ -6982,7 +7128,7 @@ func NewListSyncDestinationsRequest(server string, teamName TeamName, params *Li return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/spend", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6995,9 +7141,9 @@ func NewListSyncDestinationsRequest(server string, teamName TeamName, params *Li if params != nil { queryValues := queryURL.Query() - if params.PerPage != nil { + if params.Start != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7011,9 +7157,9 @@ func NewListSyncDestinationsRequest(server string, teamName TeamName, params *Li } - if params.Page != nil { + if params.End != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7038,19 +7184,8 @@ func NewListSyncDestinationsRequest(server string, teamName TeamName, params *Li return req, nil } -// NewCreateSyncDestinationRequest calls the generic CreateSyncDestination builder with application/json body -func NewCreateSyncDestinationRequest(server string, teamName TeamName, body CreateSyncDestinationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateSyncDestinationRequestWithBody generates requests for CreateSyncDestination with any type of body -func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteSpendingLimitRequest generates requests for DeleteSpendingLimit +func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -7065,7 +7200,7 @@ func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, c return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7075,29 +7210,16 @@ func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, c return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewTestSyncDestinationRequest calls the generic TestSyncDestination builder with application/json body -func NewTestSyncDestinationRequest(server string, teamName TeamName, body TestSyncDestinationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewTestSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewTestSyncDestinationRequestWithBody generates requests for TestSyncDestination with any type of body -func NewTestSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetSpendingLimitRequest generates requests for GetSpendingLimit +func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -7112,7 +7234,7 @@ func NewTestSyncDestinationRequestWithBody(server string, teamName TeamName, con return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/test", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7122,30 +7244,32 @@ func NewTestSyncDestinationRequestWithBody(server string, teamName TeamName, con return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteSyncDestinationRequest generates requests for DeleteSyncDestination -func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewCreateSpendingLimitRequest calls the generic CreateSpendingLimit builder with application/json body +func NewCreateSpendingLimitRequest(server string, teamName TeamName, body CreateSpendingLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewCreateSpendingLimitRequestWithBody generates requests for CreateSpendingLimit with any type of body +func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -7155,7 +7279,7 @@ func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDesti return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7165,28 +7289,34 @@ func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDesti return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetSyncDestinationRequest generates requests for GetSyncDestination -func NewGetSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { +// NewUpdateSpendingLimitRequest calls the generic UpdateSpendingLimit builder with application/json body +func NewUpdateSpendingLimitRequest(server string, teamName TeamName, body UpdateSpendingLimitJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewUpdateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewUpdateSpendingLimitRequestWithBody generates requests for UpdateSpendingLimit with any type of body +func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -7196,7 +7326,43 @@ func NewGetSyncDestinationRequest(server string, teamName TeamName, syncDestinat return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam +func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7206,6 +7372,44 @@ func NewGetSyncDestinationRequest(server string, teamName TeamName, syncDestinat return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -7214,19 +7418,55 @@ func NewGetSyncDestinationRequest(server string, teamName TeamName, syncDestinat return req, nil } -// NewUpdateSyncDestinationRequest calls the generic UpdateSyncDestination builder with application/json body -func NewUpdateSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody) (*http.Request, error) { +// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body +func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncDestinationRequestWithBody(server, teamName, syncDestinationName, "application/json", bodyReader) + return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewUpdateSyncDestinationRequestWithBody generates requests for UpdateSyncDestination with any type of body -func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body +func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam +func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { var err error var pathParam0 string @@ -7238,7 +7478,7 @@ func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, s var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) if err != nil { return nil, err } @@ -7248,7 +7488,7 @@ func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, s return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7258,18 +7498,16 @@ func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, s return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListSyncSourcesRequest generates requests for ListSyncSources -func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyncSourcesParams) (*http.Request, error) { +// NewListSyncDestinationsRequest generates requests for ListSyncDestinations +func NewListSyncDestinationsRequest(server string, teamName TeamName, params *ListSyncDestinationsParams) (*http.Request, error) { var err error var pathParam0 string @@ -7284,7 +7522,7 @@ func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyn return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7340,19 +7578,19 @@ func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyn return req, nil } -// NewCreateSyncSourceRequest calls the generic CreateSyncSource builder with application/json body -func NewCreateSyncSourceRequest(server string, teamName TeamName, body CreateSyncSourceJSONRequestBody) (*http.Request, error) { +// NewCreateSyncDestinationRequest calls the generic CreateSyncDestination builder with application/json body +func NewCreateSyncDestinationRequest(server string, teamName TeamName, body CreateSyncDestinationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreateSyncSourceRequestWithBody generates requests for CreateSyncSource with any type of body -func NewCreateSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSyncDestinationRequestWithBody generates requests for CreateSyncDestination with any type of body +func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7367,7 +7605,7 @@ func NewCreateSyncSourceRequestWithBody(server string, teamName TeamName, conten return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7387,19 +7625,19 @@ func NewCreateSyncSourceRequestWithBody(server string, teamName TeamName, conten return req, nil } -// NewTestSyncSourceRequest calls the generic TestSyncSource builder with application/json body -func NewTestSyncSourceRequest(server string, teamName TeamName, body TestSyncSourceJSONRequestBody) (*http.Request, error) { +// NewTestSyncDestinationRequest calls the generic TestSyncDestination builder with application/json body +func NewTestSyncDestinationRequest(server string, teamName TeamName, body TestSyncDestinationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewTestSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) + return NewTestSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewTestSyncSourceRequestWithBody generates requests for TestSyncSource with any type of body -func NewTestSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewTestSyncDestinationRequestWithBody generates requests for TestSyncDestination with any type of body +func NewTestSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7414,7 +7652,7 @@ func NewTestSyncSourceRequestWithBody(server string, teamName TeamName, contentT return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-sources/test", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/test", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7434,8 +7672,8 @@ func NewTestSyncSourceRequestWithBody(server string, teamName TeamName, contentT return req, nil } -// NewDeleteSyncSourceRequest generates requests for DeleteSyncSource -func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { +// NewDeleteSyncDestinationRequest generates requests for DeleteSyncDestination +func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { var err error var pathParam0 string @@ -7447,7 +7685,7 @@ func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -7457,7 +7695,7 @@ func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7475,8 +7713,8 @@ func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName return req, nil } -// NewGetSyncSourceRequest generates requests for GetSyncSource -func NewGetSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { +// NewGetSyncDestinationRequest generates requests for GetSyncDestination +func NewGetSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { var err error var pathParam0 string @@ -7488,7 +7726,7 @@ func NewGetSyncSourceRequest(server string, teamName TeamName, syncSourceName Sy var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -7498,7 +7736,7 @@ func NewGetSyncSourceRequest(server string, teamName TeamName, syncSourceName Sy return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7516,19 +7754,19 @@ func NewGetSyncSourceRequest(server string, teamName TeamName, syncSourceName Sy return req, nil } -// NewUpdateSyncSourceRequest calls the generic UpdateSyncSource builder with application/json body -func NewUpdateSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncDestinationRequest calls the generic UpdateSyncDestination builder with application/json body +func NewUpdateSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncSourceRequestWithBody(server, teamName, syncSourceName, "application/json", bodyReader) + return NewUpdateSyncDestinationRequestWithBody(server, teamName, syncDestinationName, "application/json", bodyReader) } -// NewUpdateSyncSourceRequestWithBody generates requests for UpdateSyncSource with any type of body -func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncDestinationRequestWithBody generates requests for UpdateSyncDestination with any type of body +func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7540,7 +7778,7 @@ func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSo var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -7550,7 +7788,7 @@ func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSo return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7570,8 +7808,8 @@ func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSo return req, nil } -// NewListSyncsRequest generates requests for ListSyncs -func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { +// NewListSyncSourcesRequest generates requests for ListSyncSources +func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyncSourcesParams) (*http.Request, error) { var err error var pathParam0 string @@ -7586,7 +7824,7 @@ func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsPara return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7642,19 +7880,19 @@ func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsPara return req, nil } -// NewCreateSyncRequest calls the generic CreateSync builder with application/json body -func NewCreateSyncRequest(server string, teamName TeamName, body CreateSyncJSONRequestBody) (*http.Request, error) { +// NewCreateSyncSourceRequest calls the generic CreateSyncSource builder with application/json body +func NewCreateSyncSourceRequest(server string, teamName TeamName, body CreateSyncSourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSyncRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreateSyncRequestWithBody generates requests for CreateSync with any type of body -func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSyncSourceRequestWithBody generates requests for CreateSyncSource with any type of body +func NewCreateSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7669,7 +7907,7 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7689,20 +7927,24 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return req, nil } -// NewGetSyncTestConnectionRequest generates requests for GetSyncTestConnection -func NewGetSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewTestSyncSourceRequest calls the generic TestSyncSource builder with application/json body +func NewTestSyncSourceRequest(server string, teamName TeamName, body TestSyncSourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewTestSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewTestSyncSourceRequestWithBody generates requests for TestSyncSource with any type of body +func NewTestSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -7712,7 +7954,7 @@ func NewGetSyncTestConnectionRequest(server string, teamName TeamName, syncTestC return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/test", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7722,70 +7964,18 @@ func NewGetSyncTestConnectionRequest(server string, teamName TeamName, syncTestC return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdateSyncTestConnectionRequest calls the generic UpdateSyncTestConnection builder with application/json body -func NewUpdateSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) -} - -// NewUpdateSyncTestConnectionRequestWithBody generates requests for UpdateSyncTestConnection with any type of body -func NewUpdateSyncTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteSyncRequest generates requests for DeleteSync -func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewDeleteSyncSourceRequest generates requests for DeleteSyncSource +func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { var err error var pathParam0 string @@ -7797,7 +7987,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) if err != nil { return nil, err } @@ -7807,7 +7997,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7825,8 +8015,8 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return req, nil } -// NewGetSyncRequest generates requests for GetSync -func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewGetSyncSourceRequest generates requests for GetSyncSource +func NewGetSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { var err error var pathParam0 string @@ -7838,7 +8028,7 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) if err != nil { return nil, err } @@ -7848,7 +8038,7 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7866,19 +8056,19 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return req, nil } -// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body -func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncSourceRequest calls the generic UpdateSyncSource builder with application/json body +func NewUpdateSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) + return NewUpdateSyncSourceRequestWithBody(server, teamName, syncSourceName, "application/json", bodyReader) } -// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body -func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncSourceRequestWithBody generates requests for UpdateSyncSource with any type of body +func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7890,7 +8080,7 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) if err != nil { return nil, err } @@ -7900,7 +8090,7 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7920,8 +8110,8 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return req, nil } -// NewListSyncRunsRequest generates requests for ListSyncRuns -func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { +// NewListSyncsRequest generates requests for ListSyncs +func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { var err error var pathParam0 string @@ -7931,19 +8121,12 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7999,20 +8182,24 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, return req, nil } -// NewCreateSyncRunRequest generates requests for CreateSyncRun -func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewCreateSyncRequest calls the generic CreateSync builder with application/json body +func NewCreateSyncRequest(server string, teamName TeamName, body CreateSyncJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewCreateSyncRequestWithBody generates requests for CreateSync with any type of body +func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -8022,7 +8209,7 @@ func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8032,16 +8219,18 @@ func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetSyncRunRequest generates requests for GetSyncRun -func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { +// NewGetSyncTestConnectionRequest generates requests for GetSyncTestConnection +func NewGetSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { var err error var pathParam0 string @@ -8053,14 +8242,7 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) if err != nil { return nil, err } @@ -8070,7 +8252,7 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8088,19 +8270,19 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s return req, nil } -// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body -func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncTestConnectionRequest calls the generic UpdateSyncTestConnection builder with application/json body +func NewUpdateSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) + return NewUpdateSyncTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) } -// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body -func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncTestConnectionRequestWithBody generates requests for UpdateSyncTestConnection with any type of body +func NewUpdateSyncTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8112,14 +8294,7 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) if err != nil { return nil, err } @@ -8129,7 +8304,7 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8149,8 +8324,8 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return req, nil } -// NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs -func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams) (*http.Request, error) { +// NewDeleteSyncRequest generates requests for DeleteSync +func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -8167,19 +8342,12 @@ func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncNam return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/logs", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8189,42 +8357,68 @@ func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncNam return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - if params != nil { + return req, nil +} - if params.Accept != nil { - var headerParam0 string +// NewGetSyncRequest generates requests for GetSync +func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { + var err error - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) - if err != nil { - return nil, err - } + var pathParam0 string - req.Header.Set("Accept", headerParam0) - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } return req, nil } -// NewCreateSyncRunProgressRequest calls the generic CreateSyncRunProgress builder with application/json body -func NewCreateSyncRunProgressRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body +func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSyncRunProgressRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) + return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) } -// NewCreateSyncRunProgressRequestWithBody generates requests for CreateSyncRunProgress with any type of body -func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body +func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8241,19 +8435,12 @@ func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, s return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/progress", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8263,7 +8450,7 @@ func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, s return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -8273,8 +8460,8 @@ func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, s return req, nil } -// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage -func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { +// NewListSyncRunsRequest generates requests for ListSyncRuns +func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { var err error var pathParam0 string @@ -8284,12 +8471,19 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8302,9 +8496,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8318,9 +8512,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis } - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8345,19 +8539,8 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body -func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body -func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSyncRunRequest generates requests for CreateSyncRun +func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -8367,12 +8550,19 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8382,18 +8572,16 @@ func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary -func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { +// NewGetSyncRunRequest generates requests for GetSyncRun +func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { var err error var pathParam0 string @@ -8403,12 +8591,26 @@ func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *Get return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8418,76 +8620,6 @@ func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *Get return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Metrics != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Start != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.End != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.AggregationPeriod != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -8496,8 +8628,19 @@ func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *Get return req, nil } -// NewGetGroupedTeamUsageSummaryRequest generates requests for GetGroupedTeamUsageSummary -func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams) (*http.Request, error) { +// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body +func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) +} + +// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body +func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8509,7 +8652,14 @@ func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, grou var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group_by", runtime.ParamLocationPath, groupBy) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) if err != nil { return nil, err } @@ -8519,7 +8669,7 @@ func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, grou return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage-summary/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8529,86 +8679,18 @@ func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, grou return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Metrics != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Start != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.End != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.AggregationPeriod != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage -func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs +func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams) (*http.Request, error) { var err error var pathParam0 string @@ -8620,21 +8702,14 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) if err != nil { return nil, err } @@ -8644,7 +8719,7 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/logs", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8659,91 +8734,66 @@ func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam P return nil, err } - return req, nil -} + if params != nil { -// NewListUsersByTeamRequest generates requests for ListUsersByTeam -func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { - var err error + if params.Accept != nil { + var headerParam0 string - var pathParam0 string + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err } - serverURL, err := url.Parse(server) + return req, nil +} + +// NewCreateSyncRunProgressRequest calls the generic CreateSyncRunProgress builder with application/json body +func NewCreateSyncRunProgressRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncRunProgressRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) +} - operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +// NewCreateSyncRunProgressRequestWithBody generates requests for CreateSyncRunProgress with any type of body +func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { + var err error - queryURL, err := serverURL.Parse(operationPath) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } + var pathParam1 string - req, err := http.NewRequest("GET", queryURL.String(), nil) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } - return req, nil -} + var pathParam2 string -// NewUploadImageRequest generates requests for UploadImage -func NewUploadImageRequest(server string) (*http.Request, error) { - var err error + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/upload/image") + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/progress", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8753,24 +8803,33 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8780,6 +8839,44 @@ func NewGetCurrentUserRequest(server string) (*http.Request, error) { return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -8788,27 +8885,34 @@ func NewGetCurrentUserRequest(server string) (*http.Request, error) { return req, nil } -// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body -func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body -func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8818,7 +8922,7 @@ func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -8828,16 +8932,23 @@ func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body return req, nil } -// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations -func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { +// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary +func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/invitations") + operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8850,9 +8961,9 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.Metrics != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8866,9 +8977,9 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser } - if params.PerPage != nil { + if params.Start != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8882,42 +8993,9 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships -func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/memberships") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { + if params.End != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8931,9 +9009,9 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe } - if params.PerPage != nil { + if params.AggregationPeriod != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8958,13 +9036,20 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return req, nil } -// NewDeleteUserRequest generates requests for DeleteUser -func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { +// NewGetGroupedTeamUsageSummaryRequest generates requests for GetGroupedTeamUsageSummary +func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group_by", runtime.ParamLocationPath, groupBy) if err != nil { return nil, err } @@ -8974,7 +9059,7 @@ func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/users/%s", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage-summary/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8984,474 +9069,958 @@ func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - return req, nil -} + if params.Metrics != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} + if params.Start != nil { -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // HealthCheckWithResponse request - HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - // ListAddonsWithResponse request - ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) - - // CreateAddonWithBodyWithResponse request with any body - CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + if params.End != nil { - CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // DeleteAddonByTeamAndNameWithResponse request - DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) + } - // GetAddonWithResponse request - GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) + if params.AggregationPeriod != nil { - // UpdateAddonWithBodyWithResponse request with any body - UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + } - // ListAddonVersionsWithResponse request - ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // GetAddonVersionWithResponse request - GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // UpdateAddonVersionWithBodyWithResponse request with any body - UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + return req, nil +} - UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) +// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage +func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error - // CreateAddonVersionWithBodyWithResponse request with any body - CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + var pathParam0 string - CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - // DownloadAddonAssetWithResponse request - DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + var pathParam1 string - // UploadAddonAssetWithResponse request - UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } - // CQHealthCheckWithResponse request - CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) + var pathParam2 string - // ListPluginNotificationRequestsWithResponse request - ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } - // CreatePluginNotificationRequestWithBodyWithResponse request with any body - CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + var pathParam3 string - CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } - // DeletePluginNotificationRequestWithResponse request - DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // GetPluginNotificationRequestWithResponse request - GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) + operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListPluginsWithResponse request - ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreatePluginWithBodyWithResponse request with any body - CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + return req, nil +} - // DeletePluginByTeamAndPluginNameWithResponse request - DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) +// NewListUsersByTeamRequest generates requests for ListUsersByTeam +func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { + var err error - // GetPluginWithResponse request - GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + var pathParam0 string - // UpdatePluginWithBodyWithResponse request with any body - UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // DeletePluginUpcomingPriceChangesWithResponse request - DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) + operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListPluginUpcomingPriceChangesWithResponse request - ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body - CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + if params != nil { + queryValues := queryURL.Query() - CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + if params.PerPage != nil { - // ListPluginVersionsWithResponse request - ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // GetPluginVersionWithResponse request - GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + } - // UpdatePluginVersionWithBodyWithResponse request with any body - UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + if params.Page != nil { - UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + } - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // UploadPluginAssetWithResponse request - UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + return req, nil +} - // DeletePluginVersionDocsWithBodyWithResponse request with any body - DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) +// NewUploadImageRequest generates requests for UploadImage +func NewUploadImageRequest(server string) (*http.Request, error) { + var err error - DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ListPluginVersionDocsWithResponse request - ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + operationPath := fmt.Sprintf("/upload/image") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ReplacePluginVersionDocsWithBodyWithResponse request with any body - ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CreatePluginVersionDocsWithBodyWithResponse request with any body - CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + return req, nil +} - CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error - // DeletePluginVersionTablesWithBodyWithResponse request with any body - DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // ListPluginVersionTablesWithResponse request - ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // CreatePluginVersionTablesWithBodyWithResponse request with any body - CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + return req, nil +} - // GetPluginVersionTableWithResponse request - GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) +} - // AuthRegistryRequestWithResponse request - AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - // ListTeamsWithResponse request - ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CreateTeamWithBodyWithResponse request with any body - CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // DeleteTeamWithResponse request - DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - // GetTeamByNameWithResponse request - GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + req.Header.Add("Content-Type", contentType) - // UpdateTeamWithBodyWithResponse request with any body - UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + return req, nil +} - UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) +// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations +func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { + var err error - // ListAddonOrdersByTeamWithResponse request - ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CreateAddonOrderForTeamWithBodyWithResponse request with any body - CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + operationPath := fmt.Sprintf("/user/invitations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // GetAddonOrderByTeamWithResponse request - GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + if params != nil { + queryValues := queryURL.Query() - // DeleteAddonsByTeamWithResponse request - DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) + if params.Page != nil { - // ListAddonsByTeamWithResponse request - ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // DownloadAddonAssetByTeamWithResponse request - DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + } - // ListTeamAPIKeysWithResponse request - ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + if params.PerPage != nil { - // CreateTeamAPIKeyWithBodyWithResponse request with any body - CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + } - // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // CreateTeamImagesWithBodyWithResponse request with any body - CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + return req, nil +} - // DeleteTeamInvitationWithBodyWithResponse request with any body - DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) +// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships +func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { + var err error - DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ListTeamInvitationsWithResponse request - ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + operationPath := fmt.Sprintf("/user/memberships") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // EmailTeamInvitationWithBodyWithResponse request with any body - EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + if params != nil { + queryValues := queryURL.Query() - // AcceptTeamInvitationWithBodyWithResponse request with any body - AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + if params.Page != nil { - AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // CancelTeamInvitationWithResponse request - CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + } - // ListInvoicesByTeamWithResponse request - ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + if params.PerPage != nil { - // GetManagedDatabasesWithResponse request - GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - // CreateManagedDatabaseWithBodyWithResponse request with any body - CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) + } - CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // DeleteManagedDatabaseWithResponse request - DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // GetManagedDatabaseWithResponse request - GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) + return req, nil +} - // GetTeamMembershipsWithResponse request - GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) +// NewDeleteUserRequest generates requests for DeleteUser +func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { + var err error - // DeleteTeamMembershipWithResponse request - DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) + var pathParam0 string - // DeletePluginsByTeamWithResponse request - DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } - // ListPluginsByTeamWithResponse request - ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // DownloadPluginAssetByTeamWithResponse request - DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + operationPath := fmt.Sprintf("/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // GetTeamSpendWithResponse request - GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // DeleteSpendingLimitWithResponse request - DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - // GetSpendingLimitWithResponse request - GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) + return req, nil +} - // CreateSpendingLimitWithBodyWithResponse request with any body - CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} - CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} - // UpdateSpendingLimitWithBodyWithResponse request with any body - UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} - UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} - // ListSubscriptionOrdersByTeamWithResponse request - ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // HealthCheckWithResponse request + HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body - CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + // ListAddonsWithResponse request + ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) - CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + // CreateAddonWithBodyWithResponse request with any body + CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - // GetSubscriptionOrderByTeamWithResponse request - GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - // ListSyncDestinationsWithResponse request - ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) + // DeleteAddonByTeamAndNameWithResponse request + DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) - // CreateSyncDestinationWithBodyWithResponse request with any body - CreateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) + // GetAddonWithResponse request + GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) - CreateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) + // UpdateAddonWithBodyWithResponse request with any body + UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - // TestSyncDestinationWithBodyWithResponse request with any body - TestSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) + UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - TestSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) + // ListAddonVersionsWithResponse request + ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) - // DeleteSyncDestinationWithResponse request - DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) + // GetAddonVersionWithResponse request + GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) - // GetSyncDestinationWithResponse request - GetSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*GetSyncDestinationResponse, error) + // UpdateAddonVersionWithBodyWithResponse request with any body + UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - // UpdateSyncDestinationWithBodyWithResponse request with any body - UpdateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + // CreateAddonVersionWithBodyWithResponse request with any body + CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - // ListSyncSourcesWithResponse request - ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) + CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - // CreateSyncSourceWithBodyWithResponse request with any body - CreateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) + // DownloadAddonAssetWithResponse request + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) - CreateSyncSourceWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) + // UploadAddonAssetWithResponse request + UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) - // TestSyncSourceWithBodyWithResponse request with any body - TestSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) + // CQHealthCheckWithResponse request + CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) - TestSyncSourceWithResponse(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) + // ListPluginNotificationRequestsWithResponse request + ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) - // DeleteSyncSourceWithResponse request - DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) + // CreatePluginNotificationRequestWithBodyWithResponse request with any body + CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - // GetSyncSourceWithResponse request - GetSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*GetSyncSourceResponse, error) + CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - // UpdateSyncSourceWithBodyWithResponse request with any body - UpdateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + // DeletePluginNotificationRequestWithResponse request + DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) - UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + // GetPluginNotificationRequestWithResponse request + GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) - // ListSyncsWithResponse request - ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) + // ListPluginsWithResponse request + ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) - // CreateSyncWithBodyWithResponse request with any body - CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + // CreatePluginWithBodyWithResponse request with any body + CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) - CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) - // GetSyncTestConnectionWithResponse request - GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) + // DeletePluginByTeamAndPluginNameWithResponse request + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) - // UpdateSyncTestConnectionWithBodyWithResponse request with any body - UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) + // GetPluginWithResponse request + GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) - UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) + // UpdatePluginWithBodyWithResponse request with any body + UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) - // DeleteSyncWithResponse request - DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) + UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) - // GetSyncWithResponse request - GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) + // DeletePluginUpcomingPriceChangesWithResponse request + DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) - // UpdateSyncWithBodyWithResponse request with any body - UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + // ListPluginUpcomingPriceChangesWithResponse request + ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) - UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body + CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) - // ListSyncRunsWithResponse request - ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) + CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) - // CreateSyncRunWithResponse request - CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) + // ListPluginVersionsWithResponse request + ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) - // GetSyncRunWithResponse request - GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) + // GetPluginVersionWithResponse request + GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) - // UpdateSyncRunWithBodyWithResponse request with any body - UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + // UpdatePluginVersionWithBodyWithResponse request with any body + UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) - UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) - // GetSyncRunLogsWithResponse request - GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) + // CreatePluginVersionWithBodyWithResponse request with any body + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - // CreateSyncRunProgressWithBodyWithResponse request with any body - CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - CreateSyncRunProgressWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) + // DownloadPluginAssetWithResponse request + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) - // ListTeamPluginUsageWithResponse request - ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) + // UploadPluginAssetWithResponse request + UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) - // IncreaseTeamPluginUsageWithBodyWithResponse request with any body - IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + // DeletePluginVersionDocsWithBodyWithResponse request with any body + DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) - IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) - // GetTeamUsageSummaryWithResponse request - GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) + // ListPluginVersionDocsWithResponse request + ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) - // GetGroupedTeamUsageSummaryWithResponse request - GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) + // ReplacePluginVersionDocsWithBodyWithResponse request with any body + ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) - // GetTeamPluginUsageWithResponse request - GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) + ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) - // ListUsersByTeamWithResponse request - ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) + // CreatePluginVersionDocsWithBodyWithResponse request with any body + CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) - // UploadImageWithResponse request - UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) - // GetCurrentUserWithResponse request - GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + // DeletePluginVersionTablesWithBodyWithResponse request with any body + DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) - // UpdateCurrentUserWithBodyWithResponse request with any body - UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) - UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + // ListPluginVersionTablesWithResponse request + ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) - // ListCurrentUserInvitationsWithResponse request + // CreatePluginVersionTablesWithBodyWithResponse request with any body + CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + // GetPluginVersionTableWithResponse request + GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + + // AuthRegistryRequestWithResponse request + AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + + // ListTeamsWithResponse request + ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + + // CreateTeamWithBodyWithResponse request with any body + CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + // DeleteTeamWithResponse request + DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) + + // GetTeamByNameWithResponse request + GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + + // UpdateTeamWithBodyWithResponse request with any body + UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + // ListAddonOrdersByTeamWithResponse request + ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + + // CreateAddonOrderForTeamWithBodyWithResponse request with any body + CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + // GetAddonOrderByTeamWithResponse request + GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + + // DeleteAddonsByTeamWithResponse request + DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) + + // ListAddonsByTeamWithResponse request + ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + + // DownloadAddonAssetByTeamWithResponse request + DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + + // ListTeamAPIKeysWithResponse request + ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + + // CreateTeamAPIKeyWithBodyWithResponse request with any body + CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + // DeleteTeamAPIKeyWithResponse request + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + + // ListConnectorsWithResponse request + ListConnectorsWithResponse(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*ListConnectorsResponse, error) + + // CreateConnectorWithBodyWithResponse request with any body + CreateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) + + CreateConnectorWithResponse(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) + + // GetConnectorWithResponse request + GetConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorResponse, error) + + // UpdateConnectorWithBodyWithResponse request with any body + UpdateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) + + UpdateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) + + // RevokeConnectorWithResponse request + RevokeConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*RevokeConnectorResponse, error) + + // AuthenticateConnectorFinishWithBodyWithResponse request with any body + AuthenticateConnectorFinishWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) + + AuthenticateConnectorFinishWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) + + // AuthenticateConnectorWithBodyWithResponse request with any body + AuthenticateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) + + AuthenticateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) + + // CreateTeamImagesWithBodyWithResponse request with any body + CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + + CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + + // DeleteTeamInvitationWithBodyWithResponse request with any body + DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) + + DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) + + // ListTeamInvitationsWithResponse request + ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + + // EmailTeamInvitationWithBodyWithResponse request with any body + EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + // AcceptTeamInvitationWithBodyWithResponse request with any body + AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + // CancelTeamInvitationWithResponse request + CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + + // ListInvoicesByTeamWithResponse request + ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + + // GetManagedDatabasesWithResponse request + GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) + + // CreateManagedDatabaseWithBodyWithResponse request with any body + CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) + + CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) + + // DeleteManagedDatabaseWithResponse request + DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) + + // GetManagedDatabaseWithResponse request + GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) + + // GetTeamMembershipsWithResponse request + GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + + // DeleteTeamMembershipWithResponse request + DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) + + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + + // ListPluginsByTeamWithResponse request + ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + + // DownloadPluginAssetByTeamWithResponse request + DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + + // GetTeamSpendWithResponse request + GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) + + // DeleteSpendingLimitWithResponse request + DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) + + // GetSpendingLimitWithResponse request + GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) + + // CreateSpendingLimitWithBodyWithResponse request with any body + CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) + + CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) + + // UpdateSpendingLimitWithBodyWithResponse request with any body + UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) + + UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) + + // ListSubscriptionOrdersByTeamWithResponse request + ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) + + // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body + CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + // GetSubscriptionOrderByTeamWithResponse request + GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + + // ListSyncDestinationsWithResponse request + ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) + + // CreateSyncDestinationWithBodyWithResponse request with any body + CreateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) + + CreateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) + + // TestSyncDestinationWithBodyWithResponse request with any body + TestSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) + + TestSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) + + // DeleteSyncDestinationWithResponse request + DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) + + // GetSyncDestinationWithResponse request + GetSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*GetSyncDestinationResponse, error) + + // UpdateSyncDestinationWithBodyWithResponse request with any body + UpdateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + + UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + + // ListSyncSourcesWithResponse request + ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) + + // CreateSyncSourceWithBodyWithResponse request with any body + CreateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) + + CreateSyncSourceWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) + + // TestSyncSourceWithBodyWithResponse request with any body + TestSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) + + TestSyncSourceWithResponse(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) + + // DeleteSyncSourceWithResponse request + DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) + + // GetSyncSourceWithResponse request + GetSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*GetSyncSourceResponse, error) + + // UpdateSyncSourceWithBodyWithResponse request with any body + UpdateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + + UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + + // ListSyncsWithResponse request + ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) + + // CreateSyncWithBodyWithResponse request with any body + CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + + CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) + + // GetSyncTestConnectionWithResponse request + GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) + + // UpdateSyncTestConnectionWithBodyWithResponse request with any body + UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) + + UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) + + // DeleteSyncWithResponse request + DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) + + // GetSyncWithResponse request + GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) + + // UpdateSyncWithBodyWithResponse request with any body + UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + + UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) + + // ListSyncRunsWithResponse request + ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) + + // CreateSyncRunWithResponse request + CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) + + // GetSyncRunWithResponse request + GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) + + // UpdateSyncRunWithBodyWithResponse request with any body + UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + + UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + + // GetSyncRunLogsWithResponse request + GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) + + // CreateSyncRunProgressWithBodyWithResponse request with any body + CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) + + CreateSyncRunProgressWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) + + // ListTeamPluginUsageWithResponse request + ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) + + // IncreaseTeamPluginUsageWithBodyWithResponse request with any body + IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + // GetTeamUsageSummaryWithResponse request + GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) + + // GetGroupedTeamUsageSummaryWithResponse request + GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) + + // GetTeamPluginUsageWithResponse request + GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) + + // ListUsersByTeamWithResponse request + ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) + + // UploadImageWithResponse request + UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + + // GetCurrentUserWithResponse request + GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + + // UpdateCurrentUserWithBodyWithResponse request with any body + UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + + UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + + // ListCurrentUserInvitationsWithResponse request ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) // GetCurrentUserMembershipsWithResponse request @@ -10486,17 +11055,203 @@ func (r AuthRegistryRequestResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthRegistryRequestResponse) StatusCode() int { +func (r AuthRegistryRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListTeamsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeams200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTeamByNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamByNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamByNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddonOrdersByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateAddonOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *AddonOrder + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateAddonOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonOrderForTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListTeamsResponse struct { +type GetAddonOrderByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListTeams200Response + JSON200 *AddonOrder JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound @@ -10504,7 +11259,7 @@ type ListTeamsResponse struct { } // Status returns HTTPResponse.Status -func (r ListTeamsResponse) Status() string { +func (r GetAddonOrderByTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10512,26 +11267,25 @@ func (r ListTeamsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTeamsResponse) StatusCode() int { +func (r GetAddonOrderByTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTeamResponse struct { +type DeleteAddonsByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *Team JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON422 *UnprocessableEntity + JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateTeamResponse) Status() string { +func (r DeleteAddonsByTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10539,26 +11293,25 @@ func (r CreateTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamResponse) StatusCode() int { +func (r DeleteAddonsByTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteTeamResponse struct { +type ListAddonsByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON400 *BadRequest + JSON200 *ListAddonsByTeam200Response JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteTeamResponse) Status() string { +func (r ListAddonsByTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10566,26 +11319,26 @@ func (r DeleteTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamResponse) StatusCode() int { +func (r ListAddonsByTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTeamByNameResponse struct { +type DownloadAddonAssetByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Team - JSON400 *BadRequest + JSON200 *AddonAsset JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetTeamByNameResponse) Status() string { +func (r DownloadAddonAssetByTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10593,26 +11346,24 @@ func (r GetTeamByNameResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTeamByNameResponse) StatusCode() int { +func (r DownloadAddonAssetByTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateTeamResponse struct { +type ListTeamAPIKeysResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Team - JSON400 *BadRequest + JSON200 *ListTeamAPIKeys200Response JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateTeamResponse) Status() string { +func (r ListTeamAPIKeysResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10620,25 +11371,25 @@ func (r UpdateTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateTeamResponse) StatusCode() int { +func (r ListTeamAPIKeysResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAddonOrdersByTeamResponse struct { +type CreateTeamAPIKeyResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListAddonOrdersByTeam200Response + JSON201 *APIKey + JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListAddonOrdersByTeamResponse) Status() string { +func (r CreateTeamAPIKeyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10646,17 +11397,16 @@ func (r ListAddonOrdersByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAddonOrdersByTeamResponse) StatusCode() int { +func (r CreateTeamAPIKeyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateAddonOrderForTeamResponse struct { +type DeleteTeamAPIKeyResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *AddonOrder JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -10664,7 +11414,7 @@ type CreateAddonOrderForTeamResponse struct { } // Status returns HTTPResponse.Status -func (r CreateAddonOrderForTeamResponse) Status() string { +func (r DeleteTeamAPIKeyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10672,25 +11422,24 @@ func (r CreateAddonOrderForTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateAddonOrderForTeamResponse) StatusCode() int { +func (r DeleteTeamAPIKeyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetAddonOrderByTeamResponse struct { +type ListConnectorsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AddonOrder + JSON200 *ListConnectors200Response JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetAddonOrderByTeamResponse) Status() string { +func (r ListConnectorsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10698,25 +11447,25 @@ func (r GetAddonOrderByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetAddonOrderByTeamResponse) StatusCode() int { +func (r ListConnectorsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteAddonsByTeamResponse struct { +type CreateConnectorResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *Connector JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteAddonsByTeamResponse) Status() string { +func (r CreateConnectorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10724,25 +11473,24 @@ func (r DeleteAddonsByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteAddonsByTeamResponse) StatusCode() int { +func (r CreateConnectorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAddonsByTeamResponse struct { +type GetConnectorResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListAddonsByTeam200Response + JSON200 *Connector JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListAddonsByTeamResponse) Status() string { +func (r GetConnectorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10750,26 +11498,25 @@ func (r ListAddonsByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAddonsByTeamResponse) StatusCode() int { +func (r GetConnectorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DownloadAddonAssetByTeamResponse struct { +type UpdateConnectorResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AddonAsset + JSON200 *Connector + JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DownloadAddonAssetByTeamResponse) Status() string { +func (r UpdateConnectorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10777,24 +11524,24 @@ func (r DownloadAddonAssetByTeamResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DownloadAddonAssetByTeamResponse) StatusCode() int { +func (r UpdateConnectorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListTeamAPIKeysResponse struct { +type RevokeConnectorResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListTeamAPIKeys200Response JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListTeamAPIKeysResponse) Status() string { +func (r RevokeConnectorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10802,25 +11549,25 @@ func (r ListTeamAPIKeysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTeamAPIKeysResponse) StatusCode() int { +func (r RevokeConnectorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTeamAPIKeyResponse struct { +type AuthenticateConnectorFinishResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *APIKey JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateTeamAPIKeyResponse) Status() string { +func (r AuthenticateConnectorFinishResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10828,24 +11575,26 @@ func (r CreateTeamAPIKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamAPIKeyResponse) StatusCode() int { +func (r AuthenticateConnectorFinishResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteTeamAPIKeyResponse struct { +type AuthenticateConnectorResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *AuthenticateConnector200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteTeamAPIKeyResponse) Status() string { +func (r AuthenticateConnectorResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10853,7 +11602,7 @@ func (r DeleteTeamAPIKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamAPIKeyResponse) StatusCode() int { +func (r AuthenticateConnectorResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -13088,6 +13837,101 @@ func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, return ParseDeleteTeamAPIKeyResponse(rsp) } +// ListConnectorsWithResponse request returning *ListConnectorsResponse +func (c *ClientWithResponses) ListConnectorsWithResponse(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*ListConnectorsResponse, error) { + rsp, err := c.ListConnectors(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListConnectorsResponse(rsp) +} + +// CreateConnectorWithBodyWithResponse request with arbitrary body returning *CreateConnectorResponse +func (c *ClientWithResponses) CreateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) { + rsp, err := c.CreateConnectorWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateConnectorResponse(rsp) +} + +func (c *ClientWithResponses) CreateConnectorWithResponse(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) { + rsp, err := c.CreateConnector(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateConnectorResponse(rsp) +} + +// GetConnectorWithResponse request returning *GetConnectorResponse +func (c *ClientWithResponses) GetConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorResponse, error) { + rsp, err := c.GetConnector(ctx, teamName, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetConnectorResponse(rsp) +} + +// UpdateConnectorWithBodyWithResponse request with arbitrary body returning *UpdateConnectorResponse +func (c *ClientWithResponses) UpdateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) { + rsp, err := c.UpdateConnectorWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateConnectorResponse(rsp) +} + +func (c *ClientWithResponses) UpdateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) { + rsp, err := c.UpdateConnector(ctx, teamName, connectorID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateConnectorResponse(rsp) +} + +// RevokeConnectorWithResponse request returning *RevokeConnectorResponse +func (c *ClientWithResponses) RevokeConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*RevokeConnectorResponse, error) { + rsp, err := c.RevokeConnector(ctx, teamName, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseRevokeConnectorResponse(rsp) +} + +// AuthenticateConnectorFinishWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishResponse +func (c *ClientWithResponses) AuthenticateConnectorFinishWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) { + rsp, err := c.AuthenticateConnectorFinishWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorFinishResponse(rsp) +} + +func (c *ClientWithResponses) AuthenticateConnectorFinishWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) { + rsp, err := c.AuthenticateConnectorFinish(ctx, teamName, connectorID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorFinishResponse(rsp) +} + +// AuthenticateConnectorWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorResponse +func (c *ClientWithResponses) AuthenticateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) { + rsp, err := c.AuthenticateConnectorWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorResponse(rsp) +} + +func (c *ClientWithResponses) AuthenticateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) { + rsp, err := c.AuthenticateConnector(ctx, teamName, connectorID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorResponse(rsp) +} + // CreateTeamImagesWithBodyWithResponse request with arbitrary body returning *CreateTeamImagesResponse func (c *ClientWithResponses) CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { rsp, err := c.CreateTeamImagesWithBody(ctx, teamName, contentType, body, reqEditors...) @@ -13687,156 +14531,466 @@ func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Contex if err != nil { return nil, err } - return ParseListTeamPluginUsageResponse(rsp) + return ParseListTeamPluginUsageResponse(rsp) +} + +// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +// GetTeamUsageSummaryWithResponse request returning *GetTeamUsageSummaryResponse +func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { + rsp, err := c.GetTeamUsageSummary(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamUsageSummaryResponse(rsp) +} + +// GetGroupedTeamUsageSummaryWithResponse request returning *GetGroupedTeamUsageSummaryResponse +func (c *ClientWithResponses) GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) { + rsp, err := c.GetGroupedTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetGroupedTeamUsageSummaryResponse(rsp) +} + +// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse +func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { + rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamPluginUsageResponse(rsp) +} + +// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse +func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { + rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListUsersByTeamResponse(rsp) +} + +// UploadImageWithResponse request returning *UploadImageResponse +func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImage(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadImageResponse(rsp) +} + +// GetCurrentUserWithResponse request returning *GetCurrentUserResponse +func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { + rsp, err := c.GetCurrentUser(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserResponse(rsp) +} + +// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse +func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + +// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse +func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { + rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCurrentUserInvitationsResponse(rsp) } -// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) +// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse +func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { + rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseIncreaseTeamPluginUsageResponse(rsp) + return ParseGetCurrentUserMembershipsResponse(rsp) } -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) +// DeleteUserWithResponse request returning *DeleteUserResponse +func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { + rsp, err := c.DeleteUser(ctx, userID, reqEditors...) if err != nil { return nil, err } - return ParseIncreaseTeamPluginUsageResponse(rsp) + return ParseDeleteUserResponse(rsp) } -// GetTeamUsageSummaryWithResponse request returning *GetTeamUsageSummaryResponse -func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { - rsp, err := c.GetTeamUsageSummary(ctx, teamName, params, reqEditors...) +// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call +func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetTeamUsageSummaryResponse(rsp) + + response := &HealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil } -// GetGroupedTeamUsageSummaryWithResponse request returning *GetGroupedTeamUsageSummaryResponse -func (c *ClientWithResponses) GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) { - rsp, err := c.GetGroupedTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) +// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call +func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetGroupedTeamUsageSummaryResponse(rsp) + + response := &ListAddonsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddons200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse -func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { - rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) +// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call +func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetTeamPluginUsageResponse(rsp) + + response := &CreateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse -func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { - rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) +// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call +func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListUsersByTeamResponse(rsp) + + response := &DeleteAddonByTeamAndNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// UploadImageWithResponse request returning *UploadImageResponse -func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { - rsp, err := c.UploadImage(ctx, reqEditors...) +// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call +func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseUploadImageResponse(rsp) + + response := &GetAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// GetCurrentUserWithResponse request returning *GetCurrentUserResponse -func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { - rsp, err := c.GetCurrentUser(ctx, reqEditors...) +// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call +func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetCurrentUserResponse(rsp) -} -// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse -func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} + response := &UpdateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest -func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest -// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse -func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { - rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListCurrentUserInvitationsResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse -func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { - rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) - if err != nil { - return nil, err } - return ParseGetCurrentUserMembershipsResponse(rsp) -} -// DeleteUserWithResponse request returning *DeleteUserResponse -func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { - rsp, err := c.DeleteUser(ctx, userID, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteUserResponse(rsp) + return response, nil } -// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call -func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { +// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call +func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &HealthCheckResponse{ + response := &ListAddonVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonVersions200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } -// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call -func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { +// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call +func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsResponse{ + response := &GetAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddons200Response + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13849,6 +15003,20 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13861,26 +15029,26 @@ func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { return response, nil } -// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call -func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { +// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call +func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonResponse{ + response := &UpdateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Addon + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -13889,6 +15057,13 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13896,12 +15071,12 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -13915,20 +15090,34 @@ func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) return response, nil } -// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call -func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { +// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call +func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonByTeamAndNameResponse{ + response := &CreateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13969,22 +15158,22 @@ func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTe return response, nil } -// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call -func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { +// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call +func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonResponse{ + response := &DownloadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddon + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13997,6 +15186,13 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14004,6 +15200,13 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14016,33 +15219,33 @@ func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { return response, nil } -// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call -func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { +// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call +func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAddonResponse{ + response := &UploadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -14051,19 +15254,61 @@ func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call +func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CQHealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call +func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginNotificationRequestsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -14077,26 +15322,33 @@ func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) return response, nil } -// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call -func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { +// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call +func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonVersionsResponse{ + response := &CreatePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonVersions200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginNotificationRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -14119,6 +15371,13 @@ func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsRespo } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14131,27 +15390,20 @@ func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsRespo return response, nil } -// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call -func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { +// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call +func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonVersionResponse{ + response := &DeletePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14159,13 +15411,6 @@ func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14185,34 +15430,27 @@ func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, return response, nil } -// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call -func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { +// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call +func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAddonVersionResponse{ + response := &GetPluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14220,13 +15458,6 @@ func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14246,41 +15477,27 @@ func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionRes return response, nil } -// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call -func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { +// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call +func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonVersionResponse{ + response := &ListPluginsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion + var dest ListPlugins200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14288,20 +15505,6 @@ func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14314,33 +15517,33 @@ func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionRes return response, nil } -// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call -func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { +// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call +func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetResponse{ + response := &CreatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -14349,19 +15552,12 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -14375,26 +15571,26 @@ func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetRes return response, nil } -// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call -func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { +// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call +func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadAddonAssetResponse{ + response := &DeletePluginByTeamAndPluginNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -14410,6 +15606,13 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14422,38 +15625,22 @@ func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetRespons return response, nil } -// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call -func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CQHealthCheckResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call -func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { +// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call +func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginNotificationRequestsResponse{ + response := &GetPluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginNotificationRequests200Response + var dest ListPlugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14466,6 +15653,13 @@ func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPlugi } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14478,26 +15672,26 @@ func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPlugi return response, nil } -// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call -func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { +// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call +func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginNotificationRequestResponse{ + response := &UpdatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginNotificationRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -14506,13 +15700,6 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14546,73 +15733,33 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call -func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePluginNotificationRequestResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call -func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { +// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call +func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginNotificationRequestResponse{ + response := &DeletePluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginNotificationRequests200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -14633,22 +15780,22 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo return response, nil } -// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call -func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { +// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call +func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsResponse{ + response := &ListPluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPlugins200Response + var dest ListPluginUpcomingPriceChanges200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14661,6 +15808,20 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14673,33 +15834,33 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) return response, nil } -// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call -func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { +// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call +func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginResponse{ + response := &CreatePluginUpcomingPriceChangeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Plugin + var dest PluginPrice if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -14708,6 +15869,13 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14727,26 +15895,26 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error return response, nil } -// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call -func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { +// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call +func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginByTeamAndPluginNameResponse{ + response := &ListPluginVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginVersions200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -14781,22 +15949,22 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl return response, nil } -// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call -func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { +// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call +func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginResponse{ + response := &GetPluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPlugin + var dest PluginVersionDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14809,6 +15977,13 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14828,22 +16003,22 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { return response, nil } -// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call -func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { +// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call +func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginResponse{ + response := &UpdatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14856,12 +16031,12 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -14870,13 +16045,6 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14889,20 +16057,41 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error return response, nil } -// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call -func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { +// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call +func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginUpcomingPriceChangesResponse{ + response := &CreatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14917,13 +16106,6 @@ func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeleteP } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14936,22 +16118,22 @@ func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeleteP return response, nil } -// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call -func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { +// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call +func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginUpcomingPriceChangesResponse{ + response := &DownloadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginUpcomingPriceChanges200Response + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14964,19 +16146,19 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -14990,22 +16172,22 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi return response, nil } -// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call -func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { +// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call +func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginUpcomingPriceChangeResponse{ + response := &UploadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginPrice + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15025,20 +16207,6 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15051,26 +16219,26 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call -func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { +// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call +func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionsResponse{ + response := &DeletePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersions200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -15093,6 +16261,13 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15105,22 +16280,22 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes return response, nil } -// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call -func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { +// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call +func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionResponse{ + response := &ListPluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersionDetails + var dest ListPluginVersionDocs200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15133,13 +16308,6 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15159,26 +16327,26 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons return response, nil } -// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call -func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { +// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call +func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginVersionResponse{ + response := &ReplacePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -15194,6 +16362,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15201,6 +16376,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15213,29 +16395,22 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR return response, nil } -// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call -func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { +// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call +func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionResponse{ + response := &CreatePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginVersion + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15262,6 +16437,20 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15274,26 +16463,26 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR return response, nil } -// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call -func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { +// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call +func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetResponse{ + response := &DeletePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -15302,6 +16491,13 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15309,12 +16505,12 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -15328,26 +16524,26 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR return response, nil } -// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call -func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { +// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call +func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadPluginAssetResponse{ + response := &ListPluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginVersionTables200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -15356,12 +16552,12 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -15375,20 +16571,27 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo return response, nil } -// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call -func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { +// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call +func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionDocsResponse{ + response := &CreatePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionTables201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15436,22 +16639,22 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers return response, nil } -// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call -func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { +// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call +func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionDocsResponse{ + response := &GetPluginVersionTableResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersionDocs200Response + var dest PluginTableDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15483,34 +16686,88 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD return response, nil } -// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call -func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ReplacePluginVersionDocsResponse{ + response := &AuthRegistryRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionDocs201Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RegistryAuthToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call +func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListTeamsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListTeams200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15532,13 +16789,6 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15551,22 +16801,22 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe return response, nil } -// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call -func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { +// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call +func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionDocsResponse{ + response := &CreateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionDocs201Response + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15593,13 +16843,6 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15619,15 +16862,15 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers return response, nil } -// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call -func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { +// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call +func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionTablesResponse{ + response := &DeleteTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -15680,27 +16923,34 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe return response, nil } -// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call -func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { +// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call +func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionTablesResponse{ + response := &GetTeamByNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersionTables200Response + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15708,6 +16958,13 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15727,26 +16984,26 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio return response, nil } -// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call -func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionTablesResponse{ + response := &UpdateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionTables201Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -15776,13 +17033,6 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15795,22 +17045,22 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe return response, nil } -// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call -func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { +// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call +func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionTableResponse{ + response := &ListAddonOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginTableDetails + var dest ListAddonOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15823,6 +17073,13 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15842,57 +17099,50 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } -// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call -func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { +// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call +func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthRegistryRequestResponse{ + response := &CreateAddonOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RegistryAuthToken + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest DockerError + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest DockerError + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest DockerError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest DockerError + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15903,22 +17153,22 @@ func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestR return response, nil } -// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call -func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { +// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call +func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamsResponse{ + response := &GetAddonOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeams200Response + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15957,27 +17207,20 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { return response, nil } -// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call -func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { +// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call +func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamResponse{ + response := &DeleteAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Team - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15999,12 +17242,12 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -16018,26 +17261,26 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { return response, nil } -// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call -func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { +// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call +func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamResponse{ + response := &ListAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -16060,13 +17303,6 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16079,34 +17315,27 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { return response, nil } -// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call -func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { +// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call +func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamByNameResponse{ + response := &DownloadAddonAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16128,6 +17357,13 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16140,34 +17376,27 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } -// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call -func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateTeamResponse{ + response := &ListTeamAPIKeysResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + var dest ListTeamAPIKeys200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16175,13 +17404,6 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16201,47 +17423,47 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } -// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call -func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonOrdersByTeamResponse{ + response := &CreateTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonOrdersByTeam200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest APIKey if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -16255,27 +17477,20 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT return response, nil } -// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call -func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonOrderForTeamResponse{ + response := &DeleteTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonOrder - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16309,22 +17524,22 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder return response, nil } -// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call -func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { +// ParseListConnectorsResponse parses an HTTP response from a ListConnectorsWithResponse call +func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonOrderByTeamResponse{ + response := &ListConnectorsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonOrder + var dest ListConnectors200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16337,13 +17552,6 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16363,20 +17571,27 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR return response, nil } -// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call -func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { +// ParseCreateConnectorResponse parses an HTTP response from a CreateConnectorWithResponse call +func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonsByTeamResponse{ + response := &CreateConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Connector + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16391,19 +17606,12 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -16417,22 +17625,22 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes return response, nil } -// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call -func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { +// ParseGetConnectorResponse parses an HTTP response from a GetConnectorWithResponse call +func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsByTeamResponse{ + response := &GetConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonsByTeam200Response + var dest Connector if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16445,13 +17653,6 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16471,40 +17672,40 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons return response, nil } -// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call -func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { +// ParseUpdateConnectorResponse parses an HTTP response from a UpdateConnectorWithResponse call +func ParseUpdateConnectorResponse(rsp *http.Response) (*UpdateConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetByTeamResponse{ + response := &UpdateConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + var dest Connector if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -16513,13 +17714,6 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16532,27 +17726,20 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs return response, nil } -// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call -func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { +// ParseRevokeConnectorResponse parses an HTTP response from a RevokeConnectorWithResponse call +func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamAPIKeysResponse{ + response := &RevokeConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeamAPIKeys200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16567,6 +17754,13 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16579,27 +17773,20 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, return response, nil } -// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call -func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { +// ParseAuthenticateConnectorFinishResponse parses an HTTP response from a AuthenticateConnectorFinishWithResponse call +func ParseAuthenticateConnectorFinishResponse(rsp *http.Response) (*AuthenticateConnectorFinishResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamAPIKeyResponse{ + response := &AuthenticateConnectorFinishResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest APIKey - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16614,6 +17801,13 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16633,20 +17827,27 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons return response, nil } -// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call -func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { +// ParseAuthenticateConnectorResponse parses an HTTP response from a AuthenticateConnectorWithResponse call +func ParseAuthenticateConnectorResponse(rsp *http.Response) (*AuthenticateConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamAPIKeyResponse{ + response := &AuthenticateConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AuthenticateConnector200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16668,6 +17869,13 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 5797270..ff02ddf 100644 --- a/models.gen.go +++ b/models.gen.go @@ -54,6 +54,14 @@ const ( AddonTypeVisualization AddonType = "visualization" ) +// Defines values for ConnectorStatus. +const ( + ConnectorStatusAuthenticated ConnectorStatus = "authenticated" + ConnectorStatusCreated ConnectorStatus = "created" + ConnectorStatusFailed ConnectorStatus = "failed" + ConnectorStatusRevoked ConnectorStatus = "revoked" +) + // Defines values for EmailTeamInvitationRequestRole. const ( EmailTeamInvitationRequestRoleAdmin EmailTeamInvitationRequestRole = "admin" @@ -545,12 +553,108 @@ type AddonVersionUpdate struct { Retracted *bool `json:"retracted,omitempty"` } +// AuthenticateConnectorFinishRequest defines model for AuthenticateConnectorFinish_request. +type AuthenticateConnectorFinishRequest struct { + // Aws AWS connector authentication request, filled in after the user has authenticated through AWS + Aws *ConnectorAuthFinishRequestAWS `json:"aws,omitempty"` +} + +// AuthenticateConnector200Response defines model for AuthenticateConnector_200_response. +type AuthenticateConnector200Response struct { + // Aws AWS connector authentication response to start the authentication process + Aws *ConnectorAuthResponseAWS `json:"aws,omitempty"` +} + +// AuthenticateConnectorRequest defines model for AuthenticateConnector_request. +type AuthenticateConnectorRequest struct { + // Aws AWS connector authentication request to start the authentication process + Aws *ConnectorAuthRequestAWS `json:"aws,omitempty"` +} + // BasicError Basic Error type BasicError struct { Message string `json:"message"` Status int `json:"status"` } +// Connector Connector definition +type Connector struct { + // CreatedAt Time the connector was created + CreatedAt time.Time `json:"created_at"` + + // Id unique ID of the connector + ID openapi_types.UUID `json:"id"` + + // Name Name of the connector + Name string `json:"name"` + + // Status The status of the connector + Status ConnectorStatus `json:"status"` + + // Type Type of the connector + Type string `json:"type"` +} + +// ConnectorAuthFinishRequestAWS AWS connector authentication request, filled in after the user has authenticated through AWS +type ConnectorAuthFinishRequestAWS struct { + // ExternalId External ID in the role definition. Optional. If not provided the previously suggested external ID will be used. Empty string will remove the external ID. + ExternalID *string `json:"external_id,omitempty"` + + // RoleArn ARN of role created by the user + RoleARN string `json:"role_arn"` +} + +// ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process +type ConnectorAuthRequestAWS struct { + // AccountIds List of AWS account IDs to authenticate + AccountIDs *[]string `json:"account_ids,omitempty"` + + // PluginKind Kind of the plugin + PluginKind string `json:"plugin_kind"` + + // PluginName Name of the plugin + PluginName string `json:"plugin_name"` + + // PluginTeam Team that owns the plugin we are authenticating the connector for + PluginTeam string `json:"plugin_team"` +} + +// ConnectorAuthResponseAWS AWS connector authentication response to start the authentication process +type ConnectorAuthResponseAWS struct { + // RedirectUrl URL to redirect the user to, to authenticate + RedirectURL string `json:"redirect_url"` + + // RoleTemplateUrl URL to the role template, to present to the user + RoleTemplateURL string `json:"role_template_url"` + + // SuggestedExternalId External ID suggested to enter into the role definition + SuggestedExternalID string `json:"suggested_external_id"` + + // SuggestedPolicyArns List of AWS policy ARNs suggested to grant inside the role definition + SuggestedPolicyARNs []string `json:"suggested_policy_arns"` +} + +// ConnectorCreate Connector creation request +type ConnectorCreate struct { + // Name Name of the connector + Name string `json:"name"` + + // Type Type of the connector + Type string `json:"type"` +} + +// ConnectorID ID of the Connector +type ConnectorID = openapi_types.UUID + +// ConnectorStatus The status of the connector +type ConnectorStatus string + +// ConnectorUpdate defines model for ConnectorUpdate. +type ConnectorUpdate struct { + // Name Name of the connector + Name *string `json:"name,omitempty"` +} + // CreateAddonVersionRequest defines model for CreateAddonVersion_request. type CreateAddonVersionRequest struct { // AddonDeps addon dependencies in the format of ['team_name/type/addon_name@version'] @@ -825,6 +929,12 @@ type ListAddons200Response struct { Metadata ListMetadata `json:"metadata"` } +// ListConnectors200Response defines model for ListConnectors_200_response. +type ListConnectors200Response struct { + Items []Connector `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + // ListCurrentUserInvitations200Response defines model for ListCurrentUserInvitations_200_response. type ListCurrentUserInvitations200Response struct { Items []InvitationWithToken `json:"items"` @@ -1456,6 +1566,12 @@ type PluginVersion struct { // Checksums The checksums of the plugin assets Checksums []string `json:"checksums"` + // ConnectorRequired Whether a connector is required for this plugin version + ConnectorRequired *bool `json:"connector_required,omitempty"` + + // ConnectorTypes List of connector types available for this plugin version + ConnectorTypes *[]string `json:"connector_types,omitempty"` + // CreatedAt The date and time the plugin version was created. CreatedAt time.Time `json:"created_at"` @@ -1525,6 +1641,12 @@ type PluginVersionDetails struct { // Checksums The checksums of the plugin assets Checksums []string `json:"checksums"` + // ConnectorRequired Whether a connector is required for this plugin version + ConnectorRequired *bool `json:"connector_required,omitempty"` + + // ConnectorTypes List of connector types available for this plugin version + ConnectorTypes *[]string `json:"connector_types,omitempty"` + // CreatedAt The date and time the plugin version was created. CreatedAt time.Time `json:"created_at"` @@ -1713,6 +1835,9 @@ type SyncCreate struct { // SyncDestination defines model for SyncDestination. type SyncDestination struct { + // ConnectorId ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` @@ -1744,6 +1869,9 @@ type SyncDestination struct { // SyncDestinationCreate Sync Destination Definition type SyncDestinationCreate struct { + // ConnectorId ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` @@ -1772,6 +1900,9 @@ type SyncDestinationMigrateMode string // SyncDestinationUpdate Sync Destination Definition type SyncDestinationUpdate struct { + // ConnectorId ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` @@ -1896,6 +2027,9 @@ type SyncRunStatusReason string // SyncSource defines model for SyncSource. type SyncSource struct { + // ConnectorId ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` @@ -1927,6 +2061,9 @@ type SyncSource struct { // SyncSourceCreate Sync Source Definition type SyncSourceCreate struct { + // ConnectorId ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` @@ -1952,6 +2089,9 @@ type SyncSourceCreate struct { // SyncSourceUpdate Sync Source Update Definition type SyncSourceUpdate struct { + // ConnectorId ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` @@ -2525,6 +2665,18 @@ type ListTeamAPIKeysParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } +// ListConnectorsParams defines parameters for ListConnectors. +type ListConnectorsParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // Type Filter connectors by a given type. + Type *string `form:"type,omitempty" json:"type,omitempty"` +} + // ListTeamInvitationsParams defines parameters for ListTeamInvitations. type ListTeamInvitationsParams struct { // Page Page number of the results to fetch @@ -2765,6 +2917,18 @@ type CreateAddonOrderForTeamJSONRequestBody = AddonOrderCreate // CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. type CreateTeamAPIKeyJSONRequestBody = CreateTeamAPIKeyRequest +// CreateConnectorJSONRequestBody defines body for CreateConnector for application/json ContentType. +type CreateConnectorJSONRequestBody = ConnectorCreate + +// UpdateConnectorJSONRequestBody defines body for UpdateConnector for application/json ContentType. +type UpdateConnectorJSONRequestBody = ConnectorUpdate + +// AuthenticateConnectorFinishJSONRequestBody defines body for AuthenticateConnectorFinish for application/json ContentType. +type AuthenticateConnectorFinishJSONRequestBody = AuthenticateConnectorFinishRequest + +// AuthenticateConnectorJSONRequestBody defines body for AuthenticateConnector for application/json ContentType. +type AuthenticateConnectorJSONRequestBody = AuthenticateConnectorRequest + // CreateTeamImagesJSONRequestBody defines body for CreateTeamImages for application/json ContentType. type CreateTeamImagesJSONRequestBody = CreateTeamImagesRequest diff --git a/spec.json b/spec.json index 471ae91..bc27820 100644 --- a/spec.json +++ b/spec.json @@ -4852,6 +4852,292 @@ "tags" : [ "managed-databases" ], "x-internal" : true } + }, + "/teams/{team_name}/connectors" : { + "get" : { + "description" : "List all configured connectors", + "operationId" : "ListConnectors", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + }, { + "description" : "Filter connectors by a given type.", + "explode" : true, + "in" : "query", + "name" : "type", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListConnectors_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + }, + "post" : { + "description" : "Create new connector", + "operationId" : "CreateConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Connector" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } + }, + "/teams/{team_name}/connectors/{connector_id}" : { + "get" : { + "description" : "Get a configured connector", + "operationId" : "GetConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Connector" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + }, + "patch" : { + "description" : "Update a connector", + "operationId" : "UpdateConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorUpdate" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Connector" + } + } + }, + "description" : "Update response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } + }, + "/teams/{team_name}/connectors/{connector_id}/authenticate" : { + "delete" : { + "description" : "Revoke authentication for a given connector. Any syncs relying on this connector will stop running until the connector is reauthenticated or sync references are updated.", + "operationId" : "RevokeConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + }, + "patch" : { + "description" : "Complete authentication for a given connector", + "operationId" : "AuthenticateConnectorFinish", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthenticateConnectorFinish_request" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Authentication is complete." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + }, + "post" : { + "description" : "Authenticate or reauthenticate the given connector", + "operationId" : "AuthenticateConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthenticateConnector_request" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthenticateConnector_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } } }, "components" : { @@ -5167,6 +5453,17 @@ }, "style" : "simple", "x-go-name" : "ManagedDatabaseID" + }, + "connector_id" : { + "explode" : false, + "in" : "path", + "name" : "connector_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/ConnectorID" + }, + "style" : "simple", + "x-go-name" : "ConnectorID" } }, "responses" : { @@ -5832,6 +6129,17 @@ "properties" : { "spec_json_schema" : { "$ref" : "#/components/schemas/PluginSpecJSONSchema" + }, + "connector_required" : { + "description" : "Whether a connector is required for this plugin version", + "type" : "boolean" + }, + "connector_types" : { + "description" : "List of connector types available for this plugin version", + "items" : { + "type" : "string" + }, + "type" : "array" } } } ] @@ -7267,6 +7575,13 @@ "enum" : [ "yaml", "ui" ], "type" : "string" }, + "ConnectorID" : { + "description" : "ID of the Connector", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ConnectorID" + }, "SyncSourceCreate" : { "description" : "Sync Source Definition", "properties" : { @@ -7312,6 +7627,9 @@ }, "last_update_source" : { "$ref" : "#/components/schemas/SyncLastUpdateSource" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" } }, "required" : [ "name", "path", "tables", "version" ], @@ -7439,6 +7757,9 @@ }, "last_update_source" : { "$ref" : "#/components/schemas/SyncLastUpdateSource" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" } }, "title" : "Sync Source definition for creating a new source" @@ -7492,6 +7813,9 @@ }, "last_update_source" : { "$ref" : "#/components/schemas/SyncLastUpdateSource" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" } }, "required" : [ "name", "path", "version" ], @@ -7556,6 +7880,9 @@ }, "last_update_source" : { "$ref" : "#/components/schemas/SyncLastUpdateSource" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" } }, "title" : "Sync Destination definition for creating a new destination" @@ -7841,6 +8168,142 @@ "description" : "Managed Database creation", "type" : "object" }, + "ConnectorStatus" : { + "description" : "The status of the connector", + "enum" : [ "created", "authenticated", "failed", "revoked" ], + "type" : "string" + }, + "Connector" : { + "description" : "Connector definition", + "properties" : { + "id" : { + "description" : "unique ID of the connector", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" + }, + "type" : { + "description" : "Type of the connector", + "type" : "string" + }, + "name" : { + "description" : "Name of the connector", + "type" : "string" + }, + "status" : { + "$ref" : "#/components/schemas/ConnectorStatus" + }, + "created_at" : { + "description" : "Time the connector was created", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "created_at", "id", "name", "status", "type" ] + }, + "ConnectorCreate" : { + "description" : "Connector creation request", + "properties" : { + "type" : { + "description" : "Type of the connector", + "type" : "string" + }, + "name" : { + "description" : "Name of the connector", + "type" : "string" + } + }, + "required" : [ "name", "type" ] + }, + "ConnectorUpdate" : { + "additionalProperties" : false, + "properties" : { + "name" : { + "description" : "Name of the connector", + "type" : "string" + } + } + }, + "ConnectorAuthRequestAWS" : { + "additionalProperties" : false, + "description" : "AWS connector authentication request to start the authentication process", + "properties" : { + "plugin_team" : { + "description" : "Team that owns the plugin we are authenticating the connector for", + "example" : "cloudquery", + "type" : "string" + }, + "plugin_kind" : { + "description" : "Kind of the plugin", + "example" : "source", + "type" : "string" + }, + "plugin_name" : { + "description" : "Name of the plugin", + "example" : "aws", + "type" : "string" + }, + "account_ids" : { + "description" : "List of AWS account IDs to authenticate", + "example" : [ "123456789012" ], + "items" : { + "type" : "string" + }, + "type" : "array", + "x-go-name" : "AccountIDs" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] + }, + "ConnectorAuthResponseAWS" : { + "additionalProperties" : false, + "description" : "AWS connector authentication response to start the authentication process", + "properties" : { + "redirect_url" : { + "description" : "URL to redirect the user to, to authenticate", + "type" : "string", + "x-go-name" : "RedirectURL" + }, + "role_template_url" : { + "description" : "URL to the role template, to present to the user", + "type" : "string", + "x-go-name" : "RoleTemplateURL" + }, + "suggested_external_id" : { + "description" : "External ID suggested to enter into the role definition", + "type" : "string", + "x-go-name" : "SuggestedExternalID" + }, + "suggested_policy_arns" : { + "description" : "List of AWS policy ARNs suggested to grant inside the role definition", + "items" : { + "type" : "string" + }, + "type" : "array", + "x-go-name" : "SuggestedPolicyARNs" + } + }, + "required" : [ "redirect_url", "role_template_url", "suggested_external_id", "suggested_policy_arns" ] + }, + "ConnectorAuthFinishRequestAWS" : { + "additionalProperties" : false, + "description" : "AWS connector authentication request, filled in after the user has authenticated through AWS", + "properties" : { + "role_arn" : { + "description" : "ARN of role created by the user", + "type" : "string", + "x-go-name" : "RoleARN" + }, + "external_id" : { + "description" : "External ID in the role definition. Optional. If not provided the previously suggested external ID will be used. Empty string will remove the external ID.", + "type" : "string", + "x-go-name" : "ExternalID" + } + }, + "required" : [ "role_arn" ] + }, "ListPluginNotificationRequests_200_response" : { "properties" : { "items" : { @@ -8590,6 +9053,41 @@ }, "required" : [ "items", "metadata" ] }, + "ListConnectors_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Connector" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "AuthenticateConnector_request" : { + "properties" : { + "aws" : { + "$ref" : "#/components/schemas/ConnectorAuthRequestAWS" + } + } + }, + "AuthenticateConnector_200_response" : { + "properties" : { + "aws" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseAWS" + } + } + }, + "AuthenticateConnectorFinish_request" : { + "properties" : { + "aws" : { + "$ref" : "#/components/schemas/ConnectorAuthFinishRequestAWS" + } + } + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From 0557f6e7c60b1cdf45d65005046af2a282f957da Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:03:47 +0300 Subject: [PATCH 163/343] fix: Generate CloudQuery Go API Client from `spec.json` (#172) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 692 +++++++++++++++++++++++++++++++++++++++++++++++++- models.gen.go | 31 +++ spec.json | 254 +++++++++++++++++- 3 files changed, 953 insertions(+), 24 deletions(-) diff --git a/client.gen.go b/client.gen.go index 102a3ca..78b8cb1 100644 --- a/client.gen.go +++ b/client.gen.go @@ -474,6 +474,12 @@ type ClientInterface interface { UpdateSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTestConnectionConnectorCredentials request + GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTestConnectionConnectorIdentity request + GetTestConnectionConnectorIdentity(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteSync request DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -499,6 +505,12 @@ type ClientInterface interface { UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetSyncRunConnectorCredentials request + GetSyncRunConnectorCredentials(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSyncRunConnectorIdentity request + GetSyncRunConnectorIdentity(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetSyncRunLogs request GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2228,6 +2240,30 @@ func (c *Client) UpdateSyncTestConnection(ctx context.Context, teamName TeamName return c.Client.Do(req) } +func (c *Client) GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTestConnectionConnectorCredentialsRequest(c.Server, teamName, syncTestConnectionId, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTestConnectionConnectorIdentity(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTestConnectionConnectorIdentityRequest(c.Server, teamName, syncTestConnectionId, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncRequest(c.Server, teamName, syncName) if err != nil { @@ -2336,6 +2372,30 @@ func (c *Client) UpdateSyncRun(ctx context.Context, teamName TeamName, syncName return c.Client.Do(req) } +func (c *Client) GetSyncRunConnectorCredentials(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncRunConnectorCredentialsRequest(c.Server, teamName, syncName, syncRunId, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSyncRunConnectorIdentity(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncRunConnectorIdentityRequest(c.Server, teamName, syncName, syncRunId, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetSyncRunLogsRequest(c.Server, teamName, syncName, syncRunId, params) if err != nil { @@ -8324,6 +8384,102 @@ func NewUpdateSyncTestConnectionRequestWithBody(server string, teamName TeamName return req, nil } +// NewGetTestConnectionConnectorCredentialsRequest generates requests for GetTestConnectionConnectorCredentials +func NewGetTestConnectionConnectorCredentialsRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/connector/%s/credentials", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetTestConnectionConnectorIdentityRequest generates requests for GetTestConnectionConnectorIdentity +func NewGetTestConnectionConnectorIdentityRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/connector/%s/identity", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewDeleteSyncRequest generates requests for DeleteSync func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error @@ -8689,6 +8845,116 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return req, nil } +// NewGetSyncRunConnectorCredentialsRequest generates requests for GetSyncRunConnectorCredentials +func NewGetSyncRunConnectorCredentialsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/connector/%s/credentials", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetSyncRunConnectorIdentityRequest generates requests for GetSyncRunConnectorIdentity +func NewGetSyncRunConnectorIdentityRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/connector/%s/identity", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams) (*http.Request, error) { var err error @@ -9956,6 +10222,12 @@ type ClientWithResponsesInterface interface { UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) + // GetTestConnectionConnectorCredentialsWithResponse request + GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) + + // GetTestConnectionConnectorIdentityWithResponse request + GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) + // DeleteSyncWithResponse request DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) @@ -9981,6 +10253,12 @@ type ClientWithResponsesInterface interface { UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) + // GetSyncRunConnectorCredentialsWithResponse request + GetSyncRunConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorCredentialsResponse, error) + + // GetSyncRunConnectorIdentityWithResponse request + GetSyncRunConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorIdentityResponse, error) + // GetSyncRunLogsWithResponse request GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) @@ -12653,17 +12931,19 @@ func (r UpdateSyncTestConnectionResponse) StatusCode() int { return 0 } -type DeleteSyncResponse struct { +type GetTestConnectionConnectorCredentialsResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *GetSyncRunConnectorCredentials200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteSyncResponse) Status() string { +func (r GetTestConnectionConnectorCredentialsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -12671,25 +12951,26 @@ func (r DeleteSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncResponse) StatusCode() int { +func (r GetTestConnectionConnectorCredentialsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncResponse struct { +type GetTestConnectionConnectorIdentityResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Sync + JSON200 *GetSyncRunConnectorIdentity200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncResponse) Status() string { +func (r GetTestConnectionConnectorIdentityResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -12697,26 +12978,24 @@ func (r GetSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncResponse) StatusCode() int { +func (r GetTestConnectionConnectorIdentityResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncResponse struct { +type DeleteSyncResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Sync JSON400 *BadRequest - JSON403 *Forbidden + JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncResponse) Status() string { +func (r DeleteSyncResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -12724,7 +13003,60 @@ func (r UpdateSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncResponse) StatusCode() int { +func (r DeleteSyncResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Sync + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Sync + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -12834,6 +13166,60 @@ func (r UpdateSyncRunResponse) StatusCode() int { return 0 } +type GetSyncRunConnectorCredentialsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetSyncRunConnectorCredentials200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncRunConnectorCredentialsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncRunConnectorCredentialsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncRunConnectorIdentityResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetSyncRunConnectorIdentity200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncRunConnectorIdentityResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncRunConnectorIdentityResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetSyncRunLogsResponse struct { Body []byte HTTPResponse *http.Response @@ -14420,6 +14806,24 @@ func (c *ClientWithResponses) UpdateSyncTestConnectionWithResponse(ctx context.C return ParseUpdateSyncTestConnectionResponse(rsp) } +// GetTestConnectionConnectorCredentialsWithResponse request returning *GetTestConnectionConnectorCredentialsResponse +func (c *ClientWithResponses) GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) { + rsp, err := c.GetTestConnectionConnectorCredentials(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTestConnectionConnectorCredentialsResponse(rsp) +} + +// GetTestConnectionConnectorIdentityWithResponse request returning *GetTestConnectionConnectorIdentityResponse +func (c *ClientWithResponses) GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) { + rsp, err := c.GetTestConnectionConnectorIdentity(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTestConnectionConnectorIdentityResponse(rsp) +} + // DeleteSyncWithResponse request returning *DeleteSyncResponse func (c *ClientWithResponses) DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) { rsp, err := c.DeleteSync(ctx, teamName, syncName, reqEditors...) @@ -14499,6 +14903,24 @@ func (c *ClientWithResponses) UpdateSyncRunWithResponse(ctx context.Context, tea return ParseUpdateSyncRunResponse(rsp) } +// GetSyncRunConnectorCredentialsWithResponse request returning *GetSyncRunConnectorCredentialsResponse +func (c *ClientWithResponses) GetSyncRunConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorCredentialsResponse, error) { + rsp, err := c.GetSyncRunConnectorCredentials(ctx, teamName, syncName, syncRunId, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncRunConnectorCredentialsResponse(rsp) +} + +// GetSyncRunConnectorIdentityWithResponse request returning *GetSyncRunConnectorIdentityResponse +func (c *ClientWithResponses) GetSyncRunConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorIdentityResponse, error) { + rsp, err := c.GetSyncRunConnectorIdentity(ctx, teamName, syncName, syncRunId, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncRunConnectorIdentityResponse(rsp) +} + // GetSyncRunLogsWithResponse request returning *GetSyncRunLogsResponse func (c *ClientWithResponses) GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) { rsp, err := c.GetSyncRunLogs(ctx, teamName, syncName, syncRunId, params, reqEditors...) @@ -20076,6 +20498,128 @@ func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestC return response, nil } +// ParseGetTestConnectionConnectorCredentialsResponse parses an HTTP response from a GetTestConnectionConnectorCredentialsWithResponse call +func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*GetTestConnectionConnectorCredentialsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTestConnectionConnectorCredentialsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetSyncRunConnectorCredentials200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetTestConnectionConnectorIdentityResponse parses an HTTP response from a GetTestConnectionConnectorIdentityWithResponse call +func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTestConnectionConnectorIdentityResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTestConnectionConnectorIdentityResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetSyncRunConnectorIdentity200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteSyncResponse parses an HTTP response from a DeleteSyncWithResponse call func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -20447,6 +20991,128 @@ func ParseUpdateSyncRunResponse(rsp *http.Response) (*UpdateSyncRunResponse, err return response, nil } +// ParseGetSyncRunConnectorCredentialsResponse parses an HTTP response from a GetSyncRunConnectorCredentialsWithResponse call +func ParseGetSyncRunConnectorCredentialsResponse(rsp *http.Response) (*GetSyncRunConnectorCredentialsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncRunConnectorCredentialsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetSyncRunConnectorCredentials200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetSyncRunConnectorIdentityResponse parses an HTTP response from a GetSyncRunConnectorIdentityWithResponse call +func ParseGetSyncRunConnectorIdentityResponse(rsp *http.Response) (*GetSyncRunConnectorIdentityResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncRunConnectorIdentityResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetSyncRunConnectorIdentity200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetSyncRunLogsResponse parses an HTTP response from a GetSyncRunLogsWithResponse call func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index ff02ddf..bc9d9de 100644 --- a/models.gen.go +++ b/models.gen.go @@ -643,9 +643,28 @@ type ConnectorCreate struct { Type string `json:"type"` } +// ConnectorCredentialsResponseAWS AWS connector credentials response +type ConnectorCredentialsResponseAWS struct { + AccessKeyId string `json:"access_key_id"` + CanExpire bool `json:"can_expire"` + Expires time.Time `json:"expires"` + SecretAccessKey string `json:"secret_access_key"` + SessionToken string `json:"session_token"` + Source string `json:"source"` +} + // ConnectorID ID of the Connector type ConnectorID = openapi_types.UUID +// ConnectorIdentityResponseAWS AWS connector identity response +type ConnectorIdentityResponseAWS struct { + // AccountIds List of AWS account IDs + AccountIDs []string `json:"account_ids"` + + // RoleArn Role ARN to assume + RoleARN string `json:"role_arn"` +} + // ConnectorStatus The status of the connector type ConnectorStatus string @@ -814,6 +833,18 @@ type GetManagedDatabases200Response struct { Metadata ListMetadata `json:"metadata"` } +// GetSyncRunConnectorCredentials200Response defines model for GetSyncRunConnectorCredentials_200_response. +type GetSyncRunConnectorCredentials200Response struct { + // Aws AWS connector credentials response + Aws *ConnectorCredentialsResponseAWS `json:"aws,omitempty"` +} + +// GetSyncRunConnectorIdentity200Response defines model for GetSyncRunConnectorIdentity_200_response. +type GetSyncRunConnectorIdentity200Response struct { + // Aws AWS connector identity response + Aws *ConnectorIdentityResponseAWS `json:"aws,omitempty"` +} + // GetTeamMemberships200Response defines model for GetTeamMemberships_200_response. type GetTeamMemberships200Response struct { Items []MembershipWithUser `json:"items"` diff --git a/spec.json b/spec.json index bc27820..c661680 100644 --- a/spec.json +++ b/spec.json @@ -4618,6 +4618,94 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/identity" : { + "get" : { + "description" : "Get connector identity for a sync run.", + "operationId" : "GetSyncRunConnectorIdentity", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } + }, + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/credentials" : { + "get" : { + "description" : "Get connector credentials for a sync run.", + "operationId" : "GetSyncRunConnectorCredentials", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } + }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { "get" : { "description" : "Get a Sync Test Connection", @@ -4697,6 +4785,90 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/identity" : { + "get" : { + "description" : "Get connector identity for a test connection.", + "operationId" : "GetTestConnectionConnectorIdentity", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/credentials" : { + "get" : { + "description" : "Get connector credentials for a test connection", + "operationId" : "GetTestConnectionConnectorCredentials", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } + }, "/teams/{team_name}/managed-databases" : { "get" : { "description" : "Get a paginated list of managed databases", @@ -5433,6 +5605,17 @@ }, "style" : "simple" }, + "connector_id" : { + "explode" : false, + "in" : "path", + "name" : "connector_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/ConnectorID" + }, + "style" : "simple", + "x-go-name" : "ConnectorID" + }, "sync_test_connection_id" : { "explode" : false, "in" : "path", @@ -5453,17 +5636,6 @@ }, "style" : "simple", "x-go-name" : "ManagedDatabaseID" - }, - "connector_id" : { - "explode" : false, - "in" : "path", - "name" : "connector_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/ConnectorID" - }, - "style" : "simple", - "x-go-name" : "ConnectorID" } }, "responses" : { @@ -8124,6 +8296,52 @@ } } ] }, + "ConnectorIdentityResponseAWS" : { + "additionalProperties" : false, + "description" : "AWS connector identity response", + "properties" : { + "role_arn" : { + "description" : "Role ARN to assume", + "type" : "string", + "x-go-name" : "RoleARN" + }, + "account_ids" : { + "description" : "List of AWS account IDs", + "items" : { + "type" : "string" + }, + "type" : "array", + "x-go-name" : "AccountIDs" + } + }, + "required" : [ "account_ids", "role_arn" ] + }, + "ConnectorCredentialsResponseAWS" : { + "additionalProperties" : false, + "description" : "AWS connector credentials response", + "properties" : { + "access_key_id" : { + "type" : "string" + }, + "secret_access_key" : { + "type" : "string" + }, + "session_token" : { + "type" : "string" + }, + "source" : { + "type" : "string" + }, + "can_expire" : { + "type" : "boolean" + }, + "expires" : { + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "access_key_id", "can_expire", "expires", "secret_access_key", "session_token", "source" ] + }, "ManagedDatabaseID" : { "description" : "The identifier for the managed database", "example" : "12345678-1234-1234-1234-1234567890ab", @@ -9021,6 +9239,20 @@ "required" : [ "location" ], "title" : "Sync Run Logs" }, + "GetSyncRunConnectorIdentity_200_response" : { + "properties" : { + "aws" : { + "$ref" : "#/components/schemas/ConnectorIdentityResponseAWS" + } + } + }, + "GetSyncRunConnectorCredentials_200_response" : { + "properties" : { + "aws" : { + "$ref" : "#/components/schemas/ConnectorCredentialsResponseAWS" + } + } + }, "UpdateSyncTestConnection_request" : { "properties" : { "status" : { From ded46932fad761ed5e8ecee8a05170e111c302d4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 13 Jun 2024 12:24:29 +0300 Subject: [PATCH 164/343] fix: Generate CloudQuery Go API Client from `spec.json` (#173) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec.json b/spec.json index c661680..f077081 100644 --- a/spec.json +++ b/spec.json @@ -7013,9 +7013,10 @@ }, "checksum" : { "description" : "SHA1 checksum of image", + "maxLength" : 40, + "minLength" : 40, "pattern" : "^[a-f0-9]+$", - "type" : "string", - "length" : 40 + "type" : "string" } }, "required" : [ "checksum", "name" ], From f42ea7f7c639fe22dff6b90cc7c4b4fb92550dc4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:45:44 +0300 Subject: [PATCH 165/343] fix: Generate CloudQuery Go API Client from `spec.json` (#174) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 8 ++++---- spec.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models.gen.go b/models.gen.go index bc9d9de..5bc4102 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2210,7 +2210,7 @@ type Team struct { // Name The unique name for the team. Name TeamName `json:"name"` - // Plan The plan the team is on + // Plan The plan the team is on (trial is deprecated) Plan TeamPlan `json:"plan"` PlanEndTime *time.Time `json:"plan_end_time,omitempty"` TrialEndTime *time.Time `json:"trial_end_time,omitempty"` @@ -2243,7 +2243,7 @@ type TeamImageCreate struct { // TeamName The unique name for the team. type TeamName = string -// TeamPlan The plan the team is on +// TeamPlan The plan the team is on (trial is deprecated) type TeamPlan string // TeamSubscriptionOrder Team subscription order @@ -2257,7 +2257,7 @@ type TeamSubscriptionOrder struct { // Id ID of the team subscription order TeamSubscriptionOrderID TeamSubscriptionOrderID `json:"id"` - // Plan The plan the team is on + // Plan The plan the team is on (trial is deprecated) Plan TeamPlan `json:"plan"` Status TeamSubscriptionOrderStatus `json:"status"` @@ -2271,7 +2271,7 @@ type TeamSubscriptionOrderCreate struct { // CancelUrl URL to redirect to after order cancellation CancelUrl string `json:"cancel_url"` - // Plan The plan the team is on + // Plan The plan the team is on (trial is deprecated) Plan TeamPlan `json:"plan"` // SuccessUrl URL to redirect to after successful order completion diff --git a/spec.json b/spec.json index f077081..dad1652 100644 --- a/spec.json +++ b/spec.json @@ -6959,7 +6959,7 @@ "title" : "CloudQuery Addon Asset" }, "TeamPlan" : { - "description" : "The plan the team is on", + "description" : "The plan the team is on (trial is deprecated)", "enum" : [ "free", "paid", "enterprise", "trial" ], "type" : "string" }, From e7930cc35a92f93527e916c2b0bd4d5cf04ce11f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:05:48 +0300 Subject: [PATCH 166/343] fix: Generate CloudQuery Go API Client from `spec.json` (#175) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 20 ++++++++++---------- models.gen.go | 9 +++++++-- spec.json | 31 +++++++++++++++++++------------ 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/client.gen.go b/client.gen.go index 78b8cb1..26e547f 100644 --- a/client.gen.go +++ b/client.gen.go @@ -346,7 +346,7 @@ type ClientInterface interface { AcceptTeamInvitation(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CancelTeamInvitation request - CancelTeamInvitation(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) + CancelTeamInvitation(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) // ListInvoicesByTeam request ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -369,7 +369,7 @@ type ClientInterface interface { GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTeamMembership request - DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteTeamMembership(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePluginsByTeam request DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1676,7 +1676,7 @@ func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, bo return c.Client.Do(req) } -func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) { +func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCancelTeamInvitationRequest(c.Server, teamName, email) if err != nil { return nil, err @@ -1772,7 +1772,7 @@ func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } -func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) { +func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteTeamMembershipRequest(c.Server, teamName, email) if err != nil { return nil, err @@ -6540,7 +6540,7 @@ func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, co } // NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation -func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Email) (*http.Request, error) { +func NewCancelTeamInvitationRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { var err error var pathParam0 string @@ -6926,7 +6926,7 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT } // NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership -func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Email) (*http.Request, error) { +func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { var err error var pathParam0 string @@ -10094,7 +10094,7 @@ type ClientWithResponsesInterface interface { AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) // CancelTeamInvitationWithResponse request - CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) // ListInvoicesByTeamWithResponse request ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) @@ -10117,7 +10117,7 @@ type ClientWithResponsesInterface interface { GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) // DeleteTeamMembershipWithResponse request - DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) + DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) // DeletePluginsByTeamWithResponse request DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) @@ -14396,7 +14396,7 @@ func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Conte } // CancelTeamInvitationWithResponse request returning *CancelTeamInvitationResponse -func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { +func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { rsp, err := c.CancelTeamInvitation(ctx, teamName, email, reqEditors...) if err != nil { return nil, err @@ -14467,7 +14467,7 @@ func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context } // DeleteTeamMembershipWithResponse request returning *DeleteTeamMembershipResponse -func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { +func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { rsp, err := c.DeleteTeamMembership(ctx, teamName, email, reqEditors...) if err != nil { return nil, err diff --git a/models.gen.go b/models.gen.go index 5bc4102..259d5d8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -289,7 +289,9 @@ const ( // APIKey API Key to interact with CloudQuery Cloud under specific team type APIKey struct { CreatedAt *time.Time `json:"created_at,omitempty"` - CreatedBy *Email `json:"created_by,omitempty"` + + // CreatedBy email of the user that created the API key + CreatedBy *string `json:"created_by,omitempty"` // Expired Whether the API key has expired or not Expired bool `json:"expired"` @@ -2431,7 +2433,7 @@ type UsageSummaryMetadata struct { // User CloudQuery User type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` - Email Email `json:"email"` + Email string `json:"email"` // Id ID of the User ID openapi_types.UUID `json:"id"` @@ -2456,6 +2458,9 @@ type AddonSortBy string // AddonTeam The unique name for the team. type AddonTeam = TeamName +// EmailBasic defines model for email_basic. +type EmailBasic = string + // IncludeDrafts defines model for include_drafts. type IncludeDrafts = bool diff --git a/spec.json b/spec.json index dad1652..b1107da 100644 --- a/spec.json +++ b/spec.json @@ -2237,7 +2237,7 @@ "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/email" + "$ref" : "#/components/parameters/email_basic" } ], "responses" : { "204" : { @@ -3149,7 +3149,7 @@ "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/email" + "$ref" : "#/components/parameters/email_basic" } ], "responses" : { "204" : { @@ -4586,6 +4586,9 @@ }, "description" : "Response" }, + "204" : { + "description" : "No logs available for a sync run that has not started." + }, "302" : { "description" : "Redirect to the logs download URL for a sync run that has completed.", "headers" : { @@ -5503,13 +5506,14 @@ "style" : "simple", "x-go-name" : "AddonOrderID" }, - "email" : { + "email_basic" : { "explode" : false, "in" : "path", "name" : "email", "required" : true, "schema" : { - "$ref" : "#/components/schemas/Email" + "example" : "user@example.com", + "type" : "string" }, "style" : "simple" }, @@ -7130,11 +7134,6 @@ "required" : [ "addon_name", "addon_team", "addon_type", "cancel_url", "success_url" ], "title" : "Create CloudQuery Addon Order" }, - "Email" : { - "example" : "user@cloudquery.io", - "format" : "email", - "type" : "string" - }, "UserName" : { "description" : "The unique name for the user.", "example" : "user", @@ -7159,7 +7158,8 @@ "x-go-name" : "ID" }, "email" : { - "$ref" : "#/components/schemas/Email" + "example" : "user@example.com", + "type" : "string" }, "name" : { "$ref" : "#/components/schemas/UserName" @@ -7511,6 +7511,11 @@ "required" : [ "metadata", "values" ], "title" : "CloudQuery Spend Summary" }, + "Email" : { + "example" : "user@example.com", + "format" : "email", + "type" : "string" + }, "Invitation" : { "additionalProperties" : false, "properties" : { @@ -7668,7 +7673,9 @@ "$ref" : "#/components/schemas/APIKeyName" }, "created_by" : { - "$ref" : "#/components/schemas/Email" + "description" : "email of the user that created the API key", + "example" : "user@example.com", + "type" : "string" }, "id" : { "$ref" : "#/components/schemas/APIKeyID" @@ -8948,7 +8955,7 @@ "role" : "admin", "user" : { "created_at" : "2017-07-14T16:53:42Z", - "email" : "user@clouduery.io", + "email" : "user@example.com", "id" : "12345678-1234-1234-1234-1234567890ab", "name" : "user", "updated_at" : "2017-07-14T16:53:42Z" From 58bf785bbb8ca97a1f604cabd7ffd7b5d4b3afec Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 18 Jun 2024 19:02:57 +0300 Subject: [PATCH 167/343] fix: Generate CloudQuery Go API Client from `spec.json` (#176) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 2 +- spec.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index 259d5d8..7c732e1 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1971,7 +1971,7 @@ type SyncEnvCreate struct { Name string `json:"name"` // Value Value of the environment variable - Value string `json:"value"` + Value *string `json:"value,omitempty"` } // SyncLastUpdateSource How was the source or destination been created or updated last diff --git a/spec.json b/spec.json index b1107da..d52d1b8 100644 --- a/spec.json +++ b/spec.json @@ -7748,7 +7748,7 @@ "type" : "string" } }, - "required" : [ "name", "value" ] + "required" : [ "name" ] }, "SyncLastUpdateSource" : { "description" : "How was the source or destination been created or updated last", From fd9a4efb75db2ab775257ce98e84547c70889556 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:05:28 +0300 Subject: [PATCH 168/343] fix: Generate CloudQuery Go API Client from `spec.json` (#177) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 8 +++ spec.json | 46 +++++++++++++ 3 files changed, 232 insertions(+) diff --git a/client.gen.go b/client.gen.go index 26e547f..f68e592 100644 --- a/client.gen.go +++ b/client.gen.go @@ -365,6 +365,11 @@ type ClientInterface interface { // GetManagedDatabase request GetManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) + // RemoveTeamMembershipWithBody request with any body + RemoveTeamMembershipWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + RemoveTeamMembership(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamMemberships request GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1760,6 +1765,30 @@ func (c *Client) GetManagedDatabase(ctx context.Context, teamName TeamName, mana return c.Client.Do(req) } +func (c *Client) RemoveTeamMembershipWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemoveTeamMembershipRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RemoveTeamMembership(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemoveTeamMembershipRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) if err != nil { @@ -6853,6 +6882,53 @@ func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatab return req, nil } +// NewRemoveTeamMembershipRequest calls the generic RemoveTeamMembership builder with application/json body +func NewRemoveTeamMembershipRequest(server string, teamName TeamName, body RemoveTeamMembershipJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRemoveTeamMembershipRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewRemoveTeamMembershipRequestWithBody generates requests for RemoveTeamMembership with any type of body +func NewRemoveTeamMembershipRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewGetTeamMembershipsRequest generates requests for GetTeamMemberships func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { var err error @@ -10113,6 +10189,11 @@ type ClientWithResponsesInterface interface { // GetManagedDatabaseWithResponse request GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) + // RemoveTeamMembershipWithBodyWithResponse request with any body + RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) + + RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) + // GetTeamMembershipsWithResponse request GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) @@ -12173,6 +12254,32 @@ func (r GetManagedDatabaseResponse) StatusCode() int { return 0 } +type RemoveTeamMembershipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RemoveTeamMembershipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RemoveTeamMembershipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetTeamMembershipsResponse struct { Body []byte HTTPResponse *http.Response @@ -14457,6 +14564,23 @@ func (c *ClientWithResponses) GetManagedDatabaseWithResponse(ctx context.Context return ParseGetManagedDatabaseResponse(rsp) } +// RemoveTeamMembershipWithBodyWithResponse request with arbitrary body returning *RemoveTeamMembershipResponse +func (c *ClientWithResponses) RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { + rsp, err := c.RemoveTeamMembershipWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemoveTeamMembershipResponse(rsp) +} + +func (c *ClientWithResponses) RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { + rsp, err := c.RemoveTeamMembership(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemoveTeamMembershipResponse(rsp) +} + // GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) @@ -18904,6 +19028,60 @@ func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseRes return response, nil } +// ParseRemoveTeamMembershipResponse parses an HTTP response from a RemoveTeamMembershipWithResponse call +func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershipResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RemoveTeamMembershipResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 7c732e1..830532b 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1760,6 +1760,11 @@ type ReleaseURL struct { Url string `json:"url"` } +// RemoveTeamMembershipRequest defines model for RemoveTeamMembership_request. +type RemoveTeamMembershipRequest struct { + Email string `json:"email"` +} + // SpendSummary A spend summary for a team, summarizing the spend by each price category over a given time range. // Note that empty or all-zero values are not included in the response. type SpendSummary struct { @@ -2980,6 +2985,9 @@ type AcceptTeamInvitationJSONRequestBody = AcceptTeamInvitationRequest // CreateManagedDatabaseJSONRequestBody defines body for CreateManagedDatabase for application/json ContentType. type CreateManagedDatabaseJSONRequestBody = ManagedDatabaseCreate +// RemoveTeamMembershipJSONRequestBody defines body for RemoveTeamMembership for application/json ContentType. +type RemoveTeamMembershipJSONRequestBody = RemoveTeamMembershipRequest + // CreateSpendingLimitJSONRequestBody defines body for CreateSpendingLimit for application/json ContentType. type CreateSpendingLimitJSONRequestBody = SpendingLimitCreate diff --git a/spec.json b/spec.json index d52d1b8..b0f085c 100644 --- a/spec.json +++ b/spec.json @@ -2190,6 +2190,43 @@ } }, "/teams/{team_name}/memberships" : { + "delete" : { + "description" : "Remove a user from the team", + "operationId" : "RemoveTeamMembership", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RemoveTeamMembership_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, "get" : { "description" : "Get memberships to the team.", "operationId" : "GetTeamMemberships", @@ -2232,6 +2269,7 @@ }, "/teams/{team_name}/memberships/{email}" : { "delete" : { + "deprecated" : true, "description" : "Remove a user from the team", "operationId" : "DeleteTeamMembership", "parameters" : [ { @@ -8972,6 +9010,14 @@ }, "required" : [ "items", "metadata" ] }, + "RemoveTeamMembership_request" : { + "properties" : { + "email" : { + "type" : "string" + } + }, + "required" : [ "email" ] + }, "ListInvoicesByTeam_200_response" : { "properties" : { "items" : { From 99ac21b8ad9747624e74864b454b50a75fe9fa23 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:30:13 +0300 Subject: [PATCH 169/343] fix: Generate CloudQuery Go API Client from `spec.json` (#178) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 36 +++++++++++++++++- models.gen.go | 55 ++++++++++++++++++++++++++- spec.json | 100 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 186 insertions(+), 5 deletions(-) diff --git a/client.gen.go b/client.gen.go index f68e592..f8c05cc 100644 --- a/client.gen.go +++ b/client.gen.go @@ -5990,9 +5990,25 @@ func NewListConnectorsRequest(server string, teamName TeamName, params *ListConn } - if params.Type != nil { + if params.FilterType != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter_type", runtime.ParamLocationQuery, *params.FilterType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FilterPlugin != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter_plugin", runtime.ParamLocationQuery, *params.FilterPlugin); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -11792,6 +11808,7 @@ type ListConnectorsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ListConnectors200Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError @@ -11920,6 +11937,7 @@ type AuthenticateConnectorFinishResponse struct { HTTPResponse *http.Response JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError @@ -18091,6 +18109,13 @@ func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, e } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18347,6 +18372,13 @@ func ParseAuthenticateConnectorFinishResponse(rsp *http.Response) (*Authenticate } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 830532b..73ec5e0 100644 --- a/models.gen.go +++ b/models.gen.go @@ -559,18 +559,27 @@ type AddonVersionUpdate struct { type AuthenticateConnectorFinishRequest struct { // Aws AWS connector authentication request, filled in after the user has authenticated through AWS Aws *ConnectorAuthFinishRequestAWS `json:"aws,omitempty"` + + // Oauth OAuth connector authentication request, filled in after the user has authenticated through OAuth + Oauth *ConnectorAuthFinishRequestOAuth `json:"oauth,omitempty"` } // AuthenticateConnector200Response defines model for AuthenticateConnector_200_response. type AuthenticateConnector200Response struct { // Aws AWS connector authentication response to start the authentication process Aws *ConnectorAuthResponseAWS `json:"aws,omitempty"` + + // Oauth OAuth connector authentication response to start the authentication process + Oauth *ConnectorAuthResponseOAuth `json:"oauth,omitempty"` } // AuthenticateConnectorRequest defines model for AuthenticateConnector_request. type AuthenticateConnectorRequest struct { // Aws AWS connector authentication request to start the authentication process Aws *ConnectorAuthRequestAWS `json:"aws,omitempty"` + + // Oauth OAuth connector authentication request to start the authentication process + Oauth *ConnectorAuthRequestOAuth `json:"oauth,omitempty"` } // BasicError Basic Error @@ -606,6 +615,15 @@ type ConnectorAuthFinishRequestAWS struct { RoleARN string `json:"role_arn"` } +// ConnectorAuthFinishRequestOAuth OAuth connector authentication request, filled in after the user has authenticated through OAuth +type ConnectorAuthFinishRequestOAuth struct { + // AuthCode Auth code received from the OAuth provider + AuthCode string `json:"auth_code"` + + // State State value received from the OAuth provider + State *string `json:"state,omitempty"` +} + // ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process type ConnectorAuthRequestAWS struct { // AccountIds List of AWS account IDs to authenticate @@ -621,6 +639,21 @@ type ConnectorAuthRequestAWS struct { PluginTeam string `json:"plugin_team"` } +// ConnectorAuthRequestOAuth OAuth connector authentication request to start the authentication process +type ConnectorAuthRequestOAuth struct { + // BaseUrl Base of the URL the callback url will be constructed from + BaseURL string `json:"base_url"` + + // PluginKind Kind of the plugin + PluginKind string `json:"plugin_kind"` + + // PluginName Name of the plugin + PluginName string `json:"plugin_name"` + + // PluginTeam Team that owns the plugin we are authenticating the connector for + PluginTeam string `json:"plugin_team"` +} + // ConnectorAuthResponseAWS AWS connector authentication response to start the authentication process type ConnectorAuthResponseAWS struct { // RedirectUrl URL to redirect the user to, to authenticate @@ -636,6 +669,12 @@ type ConnectorAuthResponseAWS struct { SuggestedPolicyARNs []string `json:"suggested_policy_arns"` } +// ConnectorAuthResponseOAuth OAuth connector authentication response to start the authentication process +type ConnectorAuthResponseOAuth struct { + // RedirectUrl URL to redirect the user to, to authenticate + RedirectURL string `json:"redirect_url"` +} + // ConnectorCreate Connector creation request type ConnectorCreate struct { // Name Name of the connector @@ -655,6 +694,12 @@ type ConnectorCredentialsResponseAWS struct { Source string `json:"source"` } +// ConnectorCredentialsResponseOAuth OAuth connector credentials response +type ConnectorCredentialsResponseOAuth struct { + AccessToken string `json:"access_token"` + Expires *time.Time `json:"expires,omitempty"` +} + // ConnectorID ID of the Connector type ConnectorID = openapi_types.UUID @@ -839,6 +884,9 @@ type GetManagedDatabases200Response struct { type GetSyncRunConnectorCredentials200Response struct { // Aws AWS connector credentials response Aws *ConnectorCredentialsResponseAWS `json:"aws,omitempty"` + + // Oauth OAuth connector credentials response + Oauth *ConnectorCredentialsResponseOAuth `json:"oauth,omitempty"` } // GetSyncRunConnectorIdentity200Response defines model for GetSyncRunConnectorIdentity_200_response. @@ -2714,8 +2762,11 @@ type ListConnectorsParams struct { // Page Page number of the results to fetch Page *Page `form:"page,omitempty" json:"page,omitempty"` - // Type Filter connectors by a given type. - Type *string `form:"type,omitempty" json:"type,omitempty"` + // FilterType Filter connectors by a given type. + FilterType *string `form:"filter_type,omitempty" json:"filter_type,omitempty"` + + // FilterPlugin Filter connectors by a given plugin reference. Mutually exclusive with `type`. + FilterPlugin *string `form:"filter_plugin,omitempty" json:"filter_plugin,omitempty"` } // ListTeamInvitationsParams defines parameters for ListTeamInvitations. diff --git a/spec.json b/spec.json index b0f085c..debf1c5 100644 --- a/spec.json +++ b/spec.json @@ -5080,7 +5080,18 @@ "description" : "Filter connectors by a given type.", "explode" : true, "in" : "query", - "name" : "type", + "name" : "filter_type", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Filter connectors by a given plugin reference. Mutually exclusive with `type`.", + "example" : "cloudquery/source/googleanalytics", + "explode" : true, + "in" : "query", + "name" : "filter_plugin", "required" : false, "schema" : { "type" : "string" @@ -5098,6 +5109,9 @@ }, "description" : "Response" }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, @@ -5290,6 +5304,9 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "404" : { "$ref" : "#/components/responses/NotFound" }, @@ -8388,6 +8405,20 @@ }, "required" : [ "access_key_id", "can_expire", "expires", "secret_access_key", "session_token", "source" ] }, + "ConnectorCredentialsResponseOAuth" : { + "additionalProperties" : false, + "description" : "OAuth connector credentials response", + "properties" : { + "access_token" : { + "type" : "string" + }, + "expires" : { + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "access_token" ] + }, "ManagedDatabaseID" : { "description" : "The identifier for the managed database", "example" : "12345678-1234-1234-1234-1234567890ab", @@ -8521,6 +8552,34 @@ }, "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] }, + "ConnectorAuthRequestOAuth" : { + "additionalProperties" : false, + "description" : "OAuth connector authentication request to start the authentication process", + "properties" : { + "plugin_team" : { + "description" : "Team that owns the plugin we are authenticating the connector for", + "example" : "cloudquery", + "type" : "string" + }, + "plugin_kind" : { + "description" : "Kind of the plugin", + "example" : "source", + "type" : "string" + }, + "plugin_name" : { + "description" : "Name of the plugin", + "example" : "googleanalytics", + "type" : "string" + }, + "base_url" : { + "description" : "Base of the URL the callback url will be constructed from", + "example" : "https://cloud.cloudquery.io/oauth", + "type" : "string", + "x-go-name" : "BaseURL" + } + }, + "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] + }, "ConnectorAuthResponseAWS" : { "additionalProperties" : false, "description" : "AWS connector authentication response to start the authentication process", @@ -8551,6 +8610,18 @@ }, "required" : [ "redirect_url", "role_template_url", "suggested_external_id", "suggested_policy_arns" ] }, + "ConnectorAuthResponseOAuth" : { + "additionalProperties" : false, + "description" : "OAuth connector authentication response to start the authentication process", + "properties" : { + "redirect_url" : { + "description" : "URL to redirect the user to, to authenticate", + "type" : "string", + "x-go-name" : "RedirectURL" + } + }, + "required" : [ "redirect_url" ] + }, "ConnectorAuthFinishRequestAWS" : { "additionalProperties" : false, "description" : "AWS connector authentication request, filled in after the user has authenticated through AWS", @@ -8568,6 +8639,21 @@ }, "required" : [ "role_arn" ] }, + "ConnectorAuthFinishRequestOAuth" : { + "additionalProperties" : false, + "description" : "OAuth connector authentication request, filled in after the user has authenticated through OAuth", + "properties" : { + "auth_code" : { + "description" : "Auth code received from the OAuth provider", + "type" : "string" + }, + "state" : { + "description" : "State value received from the OAuth provider", + "type" : "string" + } + }, + "required" : [ "auth_code" ] + }, "ListPluginNotificationRequests_200_response" : { "properties" : { "items" : { @@ -9304,6 +9390,9 @@ "properties" : { "aws" : { "$ref" : "#/components/schemas/ConnectorCredentialsResponseAWS" + }, + "oauth" : { + "$ref" : "#/components/schemas/ConnectorCredentialsResponseOAuth" } } }, @@ -9357,6 +9446,9 @@ "properties" : { "aws" : { "$ref" : "#/components/schemas/ConnectorAuthRequestAWS" + }, + "oauth" : { + "$ref" : "#/components/schemas/ConnectorAuthRequestOAuth" } } }, @@ -9364,6 +9456,9 @@ "properties" : { "aws" : { "$ref" : "#/components/schemas/ConnectorAuthResponseAWS" + }, + "oauth" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" } } }, @@ -9371,6 +9466,9 @@ "properties" : { "aws" : { "$ref" : "#/components/schemas/ConnectorAuthFinishRequestAWS" + }, + "oauth" : { + "$ref" : "#/components/schemas/ConnectorAuthFinishRequestOAuth" } } }, From 0386cad9556e21bb60bf5435fef27d1e00507fa4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:51:02 +0300 Subject: [PATCH 170/343] fix: Generate CloudQuery Go API Client from `spec.json` (#179) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/models.gen.go b/models.gen.go index 73ec5e0..fc019e9 100644 --- a/models.gen.go +++ b/models.gen.go @@ -620,6 +620,9 @@ type ConnectorAuthFinishRequestOAuth struct { // AuthCode Auth code received from the OAuth provider AuthCode string `json:"auth_code"` + // BaseUrl Base of the URL the callback url was constructed from + BaseURL string `json:"base_url"` + // State State value received from the OAuth provider State *string `json:"state,omitempty"` } diff --git a/spec.json b/spec.json index debf1c5..73499fc 100644 --- a/spec.json +++ b/spec.json @@ -8647,12 +8647,18 @@ "description" : "Auth code received from the OAuth provider", "type" : "string" }, + "base_url" : { + "description" : "Base of the URL the callback url was constructed from", + "example" : "https://cloud.cloudquery.io/oauth", + "type" : "string", + "x-go-name" : "BaseURL" + }, "state" : { "description" : "State value received from the OAuth provider", "type" : "string" } }, - "required" : [ "auth_code" ] + "required" : [ "auth_code", "base_url" ] }, "ListPluginNotificationRequests_200_response" : { "properties" : { From a6ad88671b21578349f4c8c359b02fa187cb0043 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 21 Jun 2024 19:01:50 +0300 Subject: [PATCH 171/343] fix: Generate CloudQuery Go API Client from `spec.json` (#180) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 506 ++++++++++++++++++++++++++++++++++++++++++++------ models.gen.go | 41 +--- spec.json | 220 ++++++++++++++-------- 3 files changed, 599 insertions(+), 168 deletions(-) diff --git a/client.gen.go b/client.gen.go index f8c05cc..ea50d7e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -312,15 +312,25 @@ type ClientInterface interface { // RevokeConnector request RevokeConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - // AuthenticateConnectorFinishWithBody request with any body - AuthenticateConnectorFinishWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthenticateConnectorFinishAWSWithBody request with any body + AuthenticateConnectorFinishAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - AuthenticateConnectorFinish(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + AuthenticateConnectorFinishAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // AuthenticateConnectorWithBody request with any body - AuthenticateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthenticateConnectorAWSWithBody request with any body + AuthenticateConnectorAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - AuthenticateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + AuthenticateConnectorAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthenticateConnectorFinishOAuthWithBody request with any body + AuthenticateConnectorFinishOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AuthenticateConnectorFinishOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthenticateConnectorOAuthWithBody request with any body + AuthenticateConnectorOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AuthenticateConnectorOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateTeamImagesWithBody request with any body CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1525,8 +1535,56 @@ func (c *Client) RevokeConnector(ctx context.Context, teamName TeamName, connect return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorFinishWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorFinishRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) AuthenticateConnectorFinishAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorFinishAWSRequestWithBody(c.Server, teamName, connectorID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorFinishAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorFinishAWSRequest(c.Server, teamName, connectorID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorAWSRequestWithBody(c.Server, teamName, connectorID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorAWSRequest(c.Server, teamName, connectorID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorFinishOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorFinishOAuthRequestWithBody(c.Server, teamName, connectorID, contentType, body) if err != nil { return nil, err } @@ -1537,8 +1595,8 @@ func (c *Client) AuthenticateConnectorFinishWithBody(ctx context.Context, teamNa return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorFinish(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorFinishRequest(c.Server, teamName, connectorID, body) +func (c *Client) AuthenticateConnectorFinishOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorFinishOAuthRequest(c.Server, teamName, connectorID, body) if err != nil { return nil, err } @@ -1549,8 +1607,8 @@ func (c *Client) AuthenticateConnectorFinish(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) AuthenticateConnectorOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorOAuthRequestWithBody(c.Server, teamName, connectorID, contentType, body) if err != nil { return nil, err } @@ -1561,8 +1619,8 @@ func (c *Client) AuthenticateConnectorWithBody(ctx context.Context, teamName Tea return c.Client.Do(req) } -func (c *Client) AuthenticateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorRequest(c.Server, teamName, connectorID, body) +func (c *Client) AuthenticateConnectorOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorOAuthRequest(c.Server, teamName, connectorID, body) if err != nil { return nil, err } @@ -6216,19 +6274,19 @@ func NewRevokeConnectorRequest(server string, teamName TeamName, connectorID Con return req, nil } -// NewAuthenticateConnectorFinishRequest calls the generic AuthenticateConnectorFinish builder with application/json body -func NewAuthenticateConnectorFinishRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody) (*http.Request, error) { +// NewAuthenticateConnectorFinishAWSRequest calls the generic AuthenticateConnectorFinishAWS builder with application/json body +func NewAuthenticateConnectorFinishAWSRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAuthenticateConnectorFinishRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) + return NewAuthenticateConnectorFinishAWSRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) } -// NewAuthenticateConnectorFinishRequestWithBody generates requests for AuthenticateConnectorFinish with any type of body -func NewAuthenticateConnectorFinishRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewAuthenticateConnectorFinishAWSRequestWithBody generates requests for AuthenticateConnectorFinishAWS with any type of body +func NewAuthenticateConnectorFinishAWSRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6250,7 +6308,7 @@ func NewAuthenticateConnectorFinishRequestWithBody(server string, teamName TeamN return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/aws", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6270,19 +6328,19 @@ func NewAuthenticateConnectorFinishRequestWithBody(server string, teamName TeamN return req, nil } -// NewAuthenticateConnectorRequest calls the generic AuthenticateConnector builder with application/json body -func NewAuthenticateConnectorRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody) (*http.Request, error) { +// NewAuthenticateConnectorAWSRequest calls the generic AuthenticateConnectorAWS builder with application/json body +func NewAuthenticateConnectorAWSRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAuthenticateConnectorRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) + return NewAuthenticateConnectorAWSRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) } -// NewAuthenticateConnectorRequestWithBody generates requests for AuthenticateConnector with any type of body -func NewAuthenticateConnectorRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewAuthenticateConnectorAWSRequestWithBody generates requests for AuthenticateConnectorAWS with any type of body +func NewAuthenticateConnectorAWSRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6304,7 +6362,115 @@ func NewAuthenticateConnectorRequestWithBody(server string, teamName TeamName, c return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/aws", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAuthenticateConnectorFinishOAuthRequest calls the generic AuthenticateConnectorFinishOAuth builder with application/json body +func NewAuthenticateConnectorFinishOAuthRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAuthenticateConnectorFinishOAuthRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) +} + +// NewAuthenticateConnectorFinishOAuthRequestWithBody generates requests for AuthenticateConnectorFinishOAuth with any type of body +func NewAuthenticateConnectorFinishOAuthRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/oauth", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAuthenticateConnectorOAuthRequest calls the generic AuthenticateConnectorOAuth builder with application/json body +func NewAuthenticateConnectorOAuthRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAuthenticateConnectorOAuthRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) +} + +// NewAuthenticateConnectorOAuthRequestWithBody generates requests for AuthenticateConnectorOAuth with any type of body +func NewAuthenticateConnectorOAuthRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/oauth", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10152,15 +10318,25 @@ type ClientWithResponsesInterface interface { // RevokeConnectorWithResponse request RevokeConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*RevokeConnectorResponse, error) - // AuthenticateConnectorFinishWithBodyWithResponse request with any body - AuthenticateConnectorFinishWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) + // AuthenticateConnectorFinishAWSWithBodyWithResponse request with any body + AuthenticateConnectorFinishAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) + + AuthenticateConnectorFinishAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) + + // AuthenticateConnectorAWSWithBodyWithResponse request with any body + AuthenticateConnectorAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) - AuthenticateConnectorFinishWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) + AuthenticateConnectorAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) - // AuthenticateConnectorWithBodyWithResponse request with any body - AuthenticateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) + // AuthenticateConnectorFinishOAuthWithBodyWithResponse request with any body + AuthenticateConnectorFinishOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) - AuthenticateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) + AuthenticateConnectorFinishOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) + + // AuthenticateConnectorOAuthWithBodyWithResponse request with any body + AuthenticateConnectorOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) + + AuthenticateConnectorOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) // CreateTeamImagesWithBodyWithResponse request with any body CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) @@ -11932,7 +12108,61 @@ func (r RevokeConnectorResponse) StatusCode() int { return 0 } -type AuthenticateConnectorFinishResponse struct { +type AuthenticateConnectorFinishAWSResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AuthenticateConnectorFinishAWSResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthenticateConnectorFinishAWSResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AuthenticateConnectorAWSResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ConnectorAuthResponseAWS + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AuthenticateConnectorAWSResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthenticateConnectorAWSResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AuthenticateConnectorFinishOAuthResponse struct { Body []byte HTTPResponse *http.Response JSON400 *BadRequest @@ -11944,7 +12174,7 @@ type AuthenticateConnectorFinishResponse struct { } // Status returns HTTPResponse.Status -func (r AuthenticateConnectorFinishResponse) Status() string { +func (r AuthenticateConnectorFinishOAuthResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11952,17 +12182,17 @@ func (r AuthenticateConnectorFinishResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorFinishResponse) StatusCode() int { +func (r AuthenticateConnectorFinishOAuthResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type AuthenticateConnectorResponse struct { +type AuthenticateConnectorOAuthResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AuthenticateConnector200Response + JSON200 *ConnectorAuthResponseOAuth JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -11971,7 +12201,7 @@ type AuthenticateConnectorResponse struct { } // Status returns HTTPResponse.Status -func (r AuthenticateConnectorResponse) Status() string { +func (r AuthenticateConnectorOAuthResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11979,7 +12209,7 @@ func (r AuthenticateConnectorResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorResponse) StatusCode() int { +func (r AuthenticateConnectorOAuthResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -14409,38 +14639,72 @@ func (c *ClientWithResponses) RevokeConnectorWithResponse(ctx context.Context, t return ParseRevokeConnectorResponse(rsp) } -// AuthenticateConnectorFinishWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishResponse -func (c *ClientWithResponses) AuthenticateConnectorFinishWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) { - rsp, err := c.AuthenticateConnectorFinishWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) +// AuthenticateConnectorFinishAWSWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishAWSResponse +func (c *ClientWithResponses) AuthenticateConnectorFinishAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) { + rsp, err := c.AuthenticateConnectorFinishAWSWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorFinishAWSResponse(rsp) +} + +func (c *ClientWithResponses) AuthenticateConnectorFinishAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) { + rsp, err := c.AuthenticateConnectorFinishAWS(ctx, teamName, connectorID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorFinishAWSResponse(rsp) +} + +// AuthenticateConnectorAWSWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorAWSResponse +func (c *ClientWithResponses) AuthenticateConnectorAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) { + rsp, err := c.AuthenticateConnectorAWSWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorAWSResponse(rsp) +} + +func (c *ClientWithResponses) AuthenticateConnectorAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) { + rsp, err := c.AuthenticateConnectorAWS(ctx, teamName, connectorID, body, reqEditors...) if err != nil { return nil, err } - return ParseAuthenticateConnectorFinishResponse(rsp) + return ParseAuthenticateConnectorAWSResponse(rsp) } -func (c *ClientWithResponses) AuthenticateConnectorFinishWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishResponse, error) { - rsp, err := c.AuthenticateConnectorFinish(ctx, teamName, connectorID, body, reqEditors...) +// AuthenticateConnectorFinishOAuthWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishOAuthResponse +func (c *ClientWithResponses) AuthenticateConnectorFinishOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) { + rsp, err := c.AuthenticateConnectorFinishOAuthWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseAuthenticateConnectorFinishResponse(rsp) + return ParseAuthenticateConnectorFinishOAuthResponse(rsp) } -// AuthenticateConnectorWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorResponse -func (c *ClientWithResponses) AuthenticateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) { - rsp, err := c.AuthenticateConnectorWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) +func (c *ClientWithResponses) AuthenticateConnectorFinishOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) { + rsp, err := c.AuthenticateConnectorFinishOAuth(ctx, teamName, connectorID, body, reqEditors...) if err != nil { return nil, err } - return ParseAuthenticateConnectorResponse(rsp) + return ParseAuthenticateConnectorFinishOAuthResponse(rsp) } -func (c *ClientWithResponses) AuthenticateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorResponse, error) { - rsp, err := c.AuthenticateConnector(ctx, teamName, connectorID, body, reqEditors...) +// AuthenticateConnectorOAuthWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorOAuthResponse +func (c *ClientWithResponses) AuthenticateConnectorOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) { + rsp, err := c.AuthenticateConnectorOAuthWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseAuthenticateConnectorResponse(rsp) + return ParseAuthenticateConnectorOAuthResponse(rsp) +} + +func (c *ClientWithResponses) AuthenticateConnectorOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) { + rsp, err := c.AuthenticateConnectorOAuth(ctx, teamName, connectorID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorOAuthResponse(rsp) } // CreateTeamImagesWithBodyWithResponse request with arbitrary body returning *CreateTeamImagesResponse @@ -18344,15 +18608,137 @@ func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, return response, nil } -// ParseAuthenticateConnectorFinishResponse parses an HTTP response from a AuthenticateConnectorFinishWithResponse call -func ParseAuthenticateConnectorFinishResponse(rsp *http.Response) (*AuthenticateConnectorFinishResponse, error) { +// ParseAuthenticateConnectorFinishAWSResponse parses an HTTP response from a AuthenticateConnectorFinishAWSWithResponse call +func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*AuthenticateConnectorFinishAWSResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthenticateConnectorFinishAWSResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAuthenticateConnectorAWSResponse parses an HTTP response from a AuthenticateConnectorAWSWithResponse call +func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateConnectorAWSResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthenticateConnectorAWSResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorAuthResponseAWS + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAuthenticateConnectorFinishOAuthResponse parses an HTTP response from a AuthenticateConnectorFinishOAuthWithResponse call +func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*AuthenticateConnectorFinishOAuthResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorFinishResponse{ + response := &AuthenticateConnectorFinishOAuthResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -18405,22 +18791,22 @@ func ParseAuthenticateConnectorFinishResponse(rsp *http.Response) (*Authenticate return response, nil } -// ParseAuthenticateConnectorResponse parses an HTTP response from a AuthenticateConnectorWithResponse call -func ParseAuthenticateConnectorResponse(rsp *http.Response) (*AuthenticateConnectorResponse, error) { +// ParseAuthenticateConnectorOAuthResponse parses an HTTP response from a AuthenticateConnectorOAuthWithResponse call +func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateConnectorOAuthResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorResponse{ + response := &AuthenticateConnectorOAuthResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AuthenticateConnector200Response + var dest ConnectorAuthResponseOAuth if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index fc019e9..fd6861d 100644 --- a/models.gen.go +++ b/models.gen.go @@ -555,33 +555,6 @@ type AddonVersionUpdate struct { Retracted *bool `json:"retracted,omitempty"` } -// AuthenticateConnectorFinishRequest defines model for AuthenticateConnectorFinish_request. -type AuthenticateConnectorFinishRequest struct { - // Aws AWS connector authentication request, filled in after the user has authenticated through AWS - Aws *ConnectorAuthFinishRequestAWS `json:"aws,omitempty"` - - // Oauth OAuth connector authentication request, filled in after the user has authenticated through OAuth - Oauth *ConnectorAuthFinishRequestOAuth `json:"oauth,omitempty"` -} - -// AuthenticateConnector200Response defines model for AuthenticateConnector_200_response. -type AuthenticateConnector200Response struct { - // Aws AWS connector authentication response to start the authentication process - Aws *ConnectorAuthResponseAWS `json:"aws,omitempty"` - - // Oauth OAuth connector authentication response to start the authentication process - Oauth *ConnectorAuthResponseOAuth `json:"oauth,omitempty"` -} - -// AuthenticateConnectorRequest defines model for AuthenticateConnector_request. -type AuthenticateConnectorRequest struct { - // Aws AWS connector authentication request to start the authentication process - Aws *ConnectorAuthRequestAWS `json:"aws,omitempty"` - - // Oauth OAuth connector authentication request to start the authentication process - Oauth *ConnectorAuthRequestOAuth `json:"oauth,omitempty"` -} - // BasicError Basic Error type BasicError struct { Message string `json:"message"` @@ -3018,11 +2991,17 @@ type CreateConnectorJSONRequestBody = ConnectorCreate // UpdateConnectorJSONRequestBody defines body for UpdateConnector for application/json ContentType. type UpdateConnectorJSONRequestBody = ConnectorUpdate -// AuthenticateConnectorFinishJSONRequestBody defines body for AuthenticateConnectorFinish for application/json ContentType. -type AuthenticateConnectorFinishJSONRequestBody = AuthenticateConnectorFinishRequest +// AuthenticateConnectorFinishAWSJSONRequestBody defines body for AuthenticateConnectorFinishAWS for application/json ContentType. +type AuthenticateConnectorFinishAWSJSONRequestBody = ConnectorAuthFinishRequestAWS + +// AuthenticateConnectorAWSJSONRequestBody defines body for AuthenticateConnectorAWS for application/json ContentType. +type AuthenticateConnectorAWSJSONRequestBody = ConnectorAuthRequestAWS + +// AuthenticateConnectorFinishOAuthJSONRequestBody defines body for AuthenticateConnectorFinishOAuth for application/json ContentType. +type AuthenticateConnectorFinishOAuthJSONRequestBody = ConnectorAuthFinishRequestOAuth -// AuthenticateConnectorJSONRequestBody defines body for AuthenticateConnector for application/json ContentType. -type AuthenticateConnectorJSONRequestBody = AuthenticateConnectorRequest +// AuthenticateConnectorOAuthJSONRequestBody defines body for AuthenticateConnectorOAuth for application/json ContentType. +type AuthenticateConnectorOAuthJSONRequestBody = ConnectorAuthRequestOAuth // CreateTeamImagesJSONRequestBody defines body for CreateTeamImages for application/json ContentType. type CreateTeamImagesJSONRequestBody = CreateTeamImagesRequest diff --git a/spec.json b/spec.json index 73499fc..40ed8a5 100644 --- a/spec.json +++ b/spec.json @@ -5275,10 +5275,106 @@ }, "tags" : [ "syncs" ], "x-internal" : true + } + }, + "/teams/{team_name}/connectors/{connector_id}/authenticate/aws" : { + "patch" : { + "description" : "Complete authentication for the given AWS connector", + "operationId" : "AuthenticateConnectorFinishAWS", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthFinishRequestAWS" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Authentication is complete." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true }, + "post" : { + "description" : "Authenticate or reauthenticate the given AWS connector", + "operationId" : "AuthenticateConnectorAWS", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthRequestAWS" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseAWS" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ], + "x-internal" : true + } + }, + "/teams/{team_name}/connectors/{connector_id}/authenticate/oauth" : { "patch" : { - "description" : "Complete authentication for a given connector", - "operationId" : "AuthenticateConnectorFinish", + "description" : "Complete authentication for the given OAuth connector", + "operationId" : "AuthenticateConnectorFinishOAuth", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { @@ -5288,7 +5384,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AuthenticateConnectorFinish_request" + "$ref" : "#/components/schemas/ConnectorAuthFinishRequestOAuth" } } }, @@ -5321,8 +5417,8 @@ "x-internal" : true }, "post" : { - "description" : "Authenticate or reauthenticate the given connector", - "operationId" : "AuthenticateConnector", + "description" : "Authenticate or reauthenticate the given OAuth connector", + "operationId" : "AuthenticateConnectorOAuth", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { @@ -5332,7 +5428,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AuthenticateConnector_request" + "$ref" : "#/components/schemas/ConnectorAuthRequestOAuth" } } }, @@ -5343,7 +5439,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AuthenticateConnector_200_response" + "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" } } }, @@ -8552,34 +8648,6 @@ }, "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] }, - "ConnectorAuthRequestOAuth" : { - "additionalProperties" : false, - "description" : "OAuth connector authentication request to start the authentication process", - "properties" : { - "plugin_team" : { - "description" : "Team that owns the plugin we are authenticating the connector for", - "example" : "cloudquery", - "type" : "string" - }, - "plugin_kind" : { - "description" : "Kind of the plugin", - "example" : "source", - "type" : "string" - }, - "plugin_name" : { - "description" : "Name of the plugin", - "example" : "googleanalytics", - "type" : "string" - }, - "base_url" : { - "description" : "Base of the URL the callback url will be constructed from", - "example" : "https://cloud.cloudquery.io/oauth", - "type" : "string", - "x-go-name" : "BaseURL" - } - }, - "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] - }, "ConnectorAuthResponseAWS" : { "additionalProperties" : false, "description" : "AWS connector authentication response to start the authentication process", @@ -8610,18 +8678,6 @@ }, "required" : [ "redirect_url", "role_template_url", "suggested_external_id", "suggested_policy_arns" ] }, - "ConnectorAuthResponseOAuth" : { - "additionalProperties" : false, - "description" : "OAuth connector authentication response to start the authentication process", - "properties" : { - "redirect_url" : { - "description" : "URL to redirect the user to, to authenticate", - "type" : "string", - "x-go-name" : "RedirectURL" - } - }, - "required" : [ "redirect_url" ] - }, "ConnectorAuthFinishRequestAWS" : { "additionalProperties" : false, "description" : "AWS connector authentication request, filled in after the user has authenticated through AWS", @@ -8639,6 +8695,46 @@ }, "required" : [ "role_arn" ] }, + "ConnectorAuthRequestOAuth" : { + "additionalProperties" : false, + "description" : "OAuth connector authentication request to start the authentication process", + "properties" : { + "plugin_team" : { + "description" : "Team that owns the plugin we are authenticating the connector for", + "example" : "cloudquery", + "type" : "string" + }, + "plugin_kind" : { + "description" : "Kind of the plugin", + "example" : "source", + "type" : "string" + }, + "plugin_name" : { + "description" : "Name of the plugin", + "example" : "googleanalytics", + "type" : "string" + }, + "base_url" : { + "description" : "Base of the URL the callback url will be constructed from", + "example" : "https://cloud.cloudquery.io/oauth", + "type" : "string", + "x-go-name" : "BaseURL" + } + }, + "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] + }, + "ConnectorAuthResponseOAuth" : { + "additionalProperties" : false, + "description" : "OAuth connector authentication response to start the authentication process", + "properties" : { + "redirect_url" : { + "description" : "URL to redirect the user to, to authenticate", + "type" : "string", + "x-go-name" : "RedirectURL" + } + }, + "required" : [ "redirect_url" ] + }, "ConnectorAuthFinishRequestOAuth" : { "additionalProperties" : false, "description" : "OAuth connector authentication request, filled in after the user has authenticated through OAuth", @@ -9448,36 +9544,6 @@ }, "required" : [ "items", "metadata" ] }, - "AuthenticateConnector_request" : { - "properties" : { - "aws" : { - "$ref" : "#/components/schemas/ConnectorAuthRequestAWS" - }, - "oauth" : { - "$ref" : "#/components/schemas/ConnectorAuthRequestOAuth" - } - } - }, - "AuthenticateConnector_200_response" : { - "properties" : { - "aws" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseAWS" - }, - "oauth" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" - } - } - }, - "AuthenticateConnectorFinish_request" : { - "properties" : { - "aws" : { - "$ref" : "#/components/schemas/ConnectorAuthFinishRequestAWS" - }, - "oauth" : { - "$ref" : "#/components/schemas/ConnectorAuthFinishRequestOAuth" - } - } - }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From 03c744269ff40f8babfd670508a7f773417d8637 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:50:41 +0300 Subject: [PATCH 172/343] fix: Generate CloudQuery Go API Client from `spec.json` (#181) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 247 ++++++++++++++++++++++++++++++++++++++++++++++++-- spec.json | 31 ++++--- 2 files changed, 257 insertions(+), 21 deletions(-) diff --git a/models.gen.go b/models.gen.go index fd6861d..0d41ac3 100644 --- a/models.gen.go +++ b/models.gen.go @@ -591,13 +591,15 @@ type ConnectorAuthFinishRequestAWS struct { // ConnectorAuthFinishRequestOAuth OAuth connector authentication request, filled in after the user has authenticated through OAuth type ConnectorAuthFinishRequestOAuth struct { // AuthCode Auth code received from the OAuth provider - AuthCode string `json:"auth_code"` + AuthCode interface{} `json:"auth_code"` // BaseUrl Base of the URL the callback url was constructed from - BaseURL string `json:"base_url"` + BaseURL interface{} `json:"base_url"` + Spec *map[string]interface{} `json:"spec,omitempty"` // State State value received from the OAuth provider - State *string `json:"state,omitempty"` + State *interface{} `json:"state,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process @@ -618,16 +620,18 @@ type ConnectorAuthRequestAWS struct { // ConnectorAuthRequestOAuth OAuth connector authentication request to start the authentication process type ConnectorAuthRequestOAuth struct { // BaseUrl Base of the URL the callback url will be constructed from - BaseURL string `json:"base_url"` + BaseURL interface{} `json:"base_url"` // PluginKind Kind of the plugin - PluginKind string `json:"plugin_kind"` + PluginKind interface{} `json:"plugin_kind"` // PluginName Name of the plugin - PluginName string `json:"plugin_name"` + PluginName interface{} `json:"plugin_name"` // PluginTeam Team that owns the plugin we are authenticating the connector for - PluginTeam string `json:"plugin_team"` + PluginTeam interface{} `json:"plugin_team"` + Spec *map[string]interface{} `json:"spec,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // ConnectorAuthResponseAWS AWS connector authentication response to start the authentication process @@ -3069,6 +3073,235 @@ type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest +// Getter for additional properties for ConnectorAuthFinishRequestOAuth. Returns the specified +// element and whether it was found +func (a ConnectorAuthFinishRequestOAuth) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ConnectorAuthFinishRequestOAuth +func (a *ConnectorAuthFinishRequestOAuth) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ConnectorAuthFinishRequestOAuth to handle AdditionalProperties +func (a *ConnectorAuthFinishRequestOAuth) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["auth_code"]; found { + err = json.Unmarshal(raw, &a.AuthCode) + if err != nil { + return fmt.Errorf("error reading 'auth_code': %w", err) + } + delete(object, "auth_code") + } + + if raw, found := object["base_url"]; found { + err = json.Unmarshal(raw, &a.BaseUrl) + if err != nil { + return fmt.Errorf("error reading 'base_url': %w", err) + } + delete(object, "base_url") + } + + if raw, found := object["spec"]; found { + err = json.Unmarshal(raw, &a.Spec) + if err != nil { + return fmt.Errorf("error reading 'spec': %w", err) + } + delete(object, "spec") + } + + if raw, found := object["state"]; found { + err = json.Unmarshal(raw, &a.State) + if err != nil { + return fmt.Errorf("error reading 'state': %w", err) + } + delete(object, "state") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ConnectorAuthFinishRequestOAuth to handle AdditionalProperties +func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["auth_code"], err = json.Marshal(a.AuthCode) + if err != nil { + return nil, fmt.Errorf("error marshaling 'auth_code': %w", err) + } + + object["base_url"], err = json.Marshal(a.BaseUrl) + if err != nil { + return nil, fmt.Errorf("error marshaling 'base_url': %w", err) + } + + if a.Spec != nil { + object["spec"], err = json.Marshal(a.Spec) + if err != nil { + return nil, fmt.Errorf("error marshaling 'spec': %w", err) + } + } + + if a.State != nil { + object["state"], err = json.Marshal(a.State) + if err != nil { + return nil, fmt.Errorf("error marshaling 'state': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ConnectorAuthRequestOAuth. Returns the specified +// element and whether it was found +func (a ConnectorAuthRequestOAuth) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ConnectorAuthRequestOAuth +func (a *ConnectorAuthRequestOAuth) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ConnectorAuthRequestOAuth to handle AdditionalProperties +func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["base_url"]; found { + err = json.Unmarshal(raw, &a.BaseUrl) + if err != nil { + return fmt.Errorf("error reading 'base_url': %w", err) + } + delete(object, "base_url") + } + + if raw, found := object["plugin_kind"]; found { + err = json.Unmarshal(raw, &a.PluginKind) + if err != nil { + return fmt.Errorf("error reading 'plugin_kind': %w", err) + } + delete(object, "plugin_kind") + } + + if raw, found := object["plugin_name"]; found { + err = json.Unmarshal(raw, &a.PluginName) + if err != nil { + return fmt.Errorf("error reading 'plugin_name': %w", err) + } + delete(object, "plugin_name") + } + + if raw, found := object["plugin_team"]; found { + err = json.Unmarshal(raw, &a.PluginTeam) + if err != nil { + return fmt.Errorf("error reading 'plugin_team': %w", err) + } + delete(object, "plugin_team") + } + + if raw, found := object["spec"]; found { + err = json.Unmarshal(raw, &a.Spec) + if err != nil { + return fmt.Errorf("error reading 'spec': %w", err) + } + delete(object, "spec") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ConnectorAuthRequestOAuth to handle AdditionalProperties +func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["base_url"], err = json.Marshal(a.BaseUrl) + if err != nil { + return nil, fmt.Errorf("error marshaling 'base_url': %w", err) + } + + object["plugin_kind"], err = json.Marshal(a.PluginKind) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_kind': %w", err) + } + + object["plugin_name"], err = json.Marshal(a.PluginName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_name': %w", err) + } + + object["plugin_team"], err = json.Marshal(a.PluginTeam) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_team': %w", err) + } + + if a.Spec != nil { + object["spec"], err = json.Marshal(a.Spec) + if err != nil { + return nil, fmt.Errorf("error marshaling 'spec': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for CreateTeamRequest. Returns the specified // element and whether it was found func (a CreateTeamRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index 40ed8a5..b0227c2 100644 --- a/spec.json +++ b/spec.json @@ -8696,29 +8696,30 @@ "required" : [ "role_arn" ] }, "ConnectorAuthRequestOAuth" : { - "additionalProperties" : false, + "additionalProperties" : { }, "description" : "OAuth connector authentication request to start the authentication process", "properties" : { "plugin_team" : { "description" : "Team that owns the plugin we are authenticating the connector for", - "example" : "cloudquery", - "type" : "string" + "example" : "cloudquery" }, "plugin_kind" : { "description" : "Kind of the plugin", - "example" : "source", - "type" : "string" + "example" : "source" }, "plugin_name" : { "description" : "Name of the plugin", - "example" : "googleanalytics", - "type" : "string" + "example" : "googleanalytics" }, "base_url" : { "description" : "Base of the URL the callback url will be constructed from", "example" : "https://cloud.cloudquery.io/oauth", - "type" : "string", "x-go-name" : "BaseURL" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" } }, "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] @@ -8736,22 +8737,24 @@ "required" : [ "redirect_url" ] }, "ConnectorAuthFinishRequestOAuth" : { - "additionalProperties" : false, + "additionalProperties" : { }, "description" : "OAuth connector authentication request, filled in after the user has authenticated through OAuth", "properties" : { "auth_code" : { - "description" : "Auth code received from the OAuth provider", - "type" : "string" + "description" : "Auth code received from the OAuth provider" }, "base_url" : { "description" : "Base of the URL the callback url was constructed from", "example" : "https://cloud.cloudquery.io/oauth", - "type" : "string", "x-go-name" : "BaseURL" }, "state" : { - "description" : "State value received from the OAuth provider", - "type" : "string" + "description" : "State value received from the OAuth provider" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" } }, "required" : [ "auth_code", "base_url" ] From 4c194a72ebda5dd0f5412ab1e4d0af4d7c0ccf83 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Jul 2024 05:01:32 -0400 Subject: [PATCH 173/343] fix: Generate CloudQuery Go API Client from `spec.json` (#182) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 4 ++-- spec.json | 28 ++++++++++++++++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/models.gen.go b/models.gen.go index 0d41ac3..bcc45cc 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1308,7 +1308,7 @@ type PluginCreate struct { // Kind The kind of plugin, ie. source or destination. Kind PluginKind `json:"kind"` - // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... + // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. Logo string `json:"logo"` // Name The unique name for the plugin. @@ -1589,7 +1589,7 @@ type PluginUpdate struct { FreeRowsPerMonth *int64 `json:"free_rows_per_month,omitempty"` Homepage *string `json:"homepage,omitempty"` - // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... + // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. Logo *string `json:"logo,omitempty"` // PriceCategory Supported price categories for billing diff --git a/spec.json b/spec.json index b0227c2..2e7d4da 100644 --- a/spec.json +++ b/spec.json @@ -6088,7 +6088,7 @@ "type" : "string" }, "logo" : { - "example" : "https://images.cloudquery.io/logos/aws.png", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", "type" : "string" }, "display_name" : { @@ -6220,8 +6220,9 @@ "$ref" : "#/components/schemas/PluginReleaseStageCreate" }, "logo" : { - "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", - "example" : "https://images.cloudquery.io/logos/aws.png", + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", "type" : "string" }, "usd_per_row" : { @@ -6281,8 +6282,9 @@ "type" : "string" }, "logo" : { - "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", - "example" : "https://images.cloudquery.io/logos/aws.png", + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f9e8", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", "type" : "string" }, "public" : { @@ -6848,7 +6850,7 @@ "type" : "string" }, "logo" : { - "example" : "https://images.cloudquery.io/logos/aws.png", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", "type" : "string" }, "public" : { @@ -6931,7 +6933,8 @@ "type" : "string" }, "logo" : { - "example" : "https://images.cloudquery.io/logos/aws.png", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", "type" : "string" }, "public" : { @@ -6984,7 +6987,8 @@ "type" : "string" }, "logo" : { - "example" : "https://images.cloudquery.io/logos/aws.png", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", "type" : "string" }, "public" : { @@ -8785,7 +8789,7 @@ "created_at" : "2017-07-14T16:53:42Z", "updated_at" : "2017-07-14T16:53:42Z", "homepage" : "https://cloudquery.io", - "logo" : "https://images.cloudquery.io/logos/aws.png", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", "official" : true, "short_description" : "Sync data from AWS to any destination", "repository" : "https://github.com/cloudquery/cloudquery", @@ -8971,7 +8975,7 @@ "created_at" : "2017-07-14T16:53:42Z", "updated_at" : "2017-07-14T16:53:42Z", "homepage" : "https://cloudquery.io", - "logo" : "https://images.cloudquery.io/logos/aws.png", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", "official" : true, "short_description" : "Sync data from AWS to any destination", "repository" : "https://github.com/cloudquery/cloudquery", @@ -9112,7 +9116,7 @@ "created_at" : "2017-07-14T16:53:42Z", "updated_at" : "2017-07-14T16:53:42Z", "homepage" : "https://cloudquery.io", - "logo" : "https://images.cloudquery.io/logos/aws.png", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", "official" : true, "short_description" : "Sync data from AWS to any destination", "repository" : "https://github.com/cloudquery/cloudquery", @@ -9143,7 +9147,7 @@ "created_at" : "2017-07-14T16:53:42Z", "updated_at" : "2017-07-14T16:53:42Z", "homepage" : "https://cloudquery.io", - "logo" : "https://images.cloudquery.io/logos/aws.png", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", "official" : true, "short_description" : "AWS policies", "repository" : "https://github.com/cloudquery/cloudquery", From 6ac86009d72e9884ae48284ae428aba43d0eeb53 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Jul 2024 05:50:26 -0400 Subject: [PATCH 174/343] fix: Generate CloudQuery Go API Client from `spec.json` (#183) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 1030 +++++++++++++++++++++++++++++++++++++++++++------ models.gen.go | 81 +++- spec.json | 309 ++++++++++++++- 3 files changed, 1290 insertions(+), 130 deletions(-) diff --git a/client.gen.go b/client.gen.go index ea50d7e..4e772f2 100644 --- a/client.gen.go +++ b/client.gen.go @@ -495,6 +495,26 @@ type ClientInterface interface { // GetTestConnectionConnectorIdentity request GetTestConnectionConnectorIdentity(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSyncDestinationFromTestConnectionWithBody request with any body + CreateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSyncSourceFromTestConnectionWithBody request with any body + CreateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSyncDestinationFromTestConnectionWithBody request with any body + UpdateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSyncSourceFromTestConnectionWithBody request with any body + UpdateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteSync request DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2351,6 +2371,102 @@ func (c *Client) GetTestConnectionConnectorIdentity(ctx context.Context, teamNam return c.Client.Do(req) } +func (c *Client) CreateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncDestinationFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncDestinationFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncSourceFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncSourceFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncDestinationFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, syncDestinationName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncDestinationFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, syncDestinationName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncSourceFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, syncSourceName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncSourceFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, syncSourceName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncRequest(c.Server, teamName, syncName) if err != nil { @@ -8738,8 +8854,19 @@ func NewGetTestConnectionConnectorIdentityRequest(server string, teamName TeamNa return req, nil } -// NewDeleteSyncRequest generates requests for DeleteSync -func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewCreateSyncDestinationFromTestConnectionRequest calls the generic CreateSyncDestinationFromTestConnection builder with application/json body +func NewCreateSyncDestinationFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncDestinationFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) +} + +// NewCreateSyncDestinationFromTestConnectionRequestWithBody generates requests for CreateSyncDestinationFromTestConnection with any type of body +func NewCreateSyncDestinationFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8751,7 +8878,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) if err != nil { return nil, err } @@ -8761,7 +8888,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/new-destination", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8771,16 +8898,29 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetSyncRequest generates requests for GetSync -func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewCreateSyncSourceFromTestConnectionRequest calls the generic CreateSyncSourceFromTestConnection builder with application/json body +func NewCreateSyncSourceFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncSourceFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) +} + +// NewCreateSyncSourceFromTestConnectionRequestWithBody generates requests for CreateSyncSourceFromTestConnection with any type of body +func NewCreateSyncSourceFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8792,7 +8932,7 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) if err != nil { return nil, err } @@ -8802,7 +8942,7 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/new-source", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8812,27 +8952,29 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body -func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncDestinationFromTestConnectionRequest calls the generic UpdateSyncDestinationFromTestConnection builder with application/json body +func NewUpdateSyncDestinationFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) + return NewUpdateSyncDestinationFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, syncDestinationName, "application/json", bodyReader) } -// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body -func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncDestinationFromTestConnectionRequestWithBody generates requests for UpdateSyncDestinationFromTestConnection with any type of body +func NewUpdateSyncDestinationFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8844,7 +8986,14 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -8854,7 +9003,7 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/update-destination/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8874,8 +9023,19 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return req, nil } -// NewListSyncRunsRequest generates requests for ListSyncRuns -func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { +// NewUpdateSyncSourceFromTestConnectionRequest calls the generic UpdateSyncSourceFromTestConnection builder with application/json body +func NewUpdateSyncSourceFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncSourceFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, syncSourceName, "application/json", bodyReader) +} + +// NewUpdateSyncSourceFromTestConnectionRequestWithBody generates requests for UpdateSyncSourceFromTestConnection with any type of body +func NewUpdateSyncSourceFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8887,7 +9047,14 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) if err != nil { return nil, err } @@ -8897,7 +9064,7 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/update-source/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8907,54 +9074,18 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCreateSyncRunRequest generates requests for CreateSyncRun -func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewDeleteSyncRequest generates requests for DeleteSync +func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -8976,7 +9107,7 @@ func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8986,7 +9117,7 @@ func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -8994,8 +9125,8 @@ func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName return req, nil } -// NewGetSyncRunRequest generates requests for GetSyncRun -func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { +// NewGetSyncRequest generates requests for GetSync +func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -9012,19 +9143,12 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9042,19 +9166,19 @@ func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, s return req, nil } -// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body -func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body +func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) + return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) } -// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body -func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body +func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -9071,19 +9195,12 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9103,8 +9220,8 @@ func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName return req, nil } -// NewGetSyncRunConnectorCredentialsRequest generates requests for GetSyncRunConnectorCredentials -func NewGetSyncRunConnectorCredentialsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { +// NewListSyncRunsRequest generates requests for ListSyncRuns +func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { var err error var pathParam0 string @@ -9121,26 +9238,255 @@ func NewGetSyncRunConnectorCredentialsRequest(server string, teamName TeamName, return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - serverURL, err := url.Parse(server) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/connector/%s/credentials", pathParam0, pathParam1, pathParam2, pathParam3) + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateSyncRunRequest generates requests for CreateSyncRun +func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetSyncRunRequest generates requests for GetSyncRun +func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body +func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) +} + +// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body +func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSyncRunConnectorCredentialsRequest generates requests for GetSyncRunConnectorCredentials +func NewGetSyncRunConnectorCredentialsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/connector/%s/credentials", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10501,6 +10847,26 @@ type ClientWithResponsesInterface interface { // GetTestConnectionConnectorIdentityWithResponse request GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) + // CreateSyncDestinationFromTestConnectionWithBodyWithResponse request with any body + CreateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) + + CreateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) + + // CreateSyncSourceFromTestConnectionWithBodyWithResponse request with any body + CreateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) + + CreateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) + + // UpdateSyncDestinationFromTestConnectionWithBodyWithResponse request with any body + UpdateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) + + UpdateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) + + // UpdateSyncSourceFromTestConnectionWithBodyWithResponse request with any body + UpdateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) + + UpdateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) + // DeleteSyncWithResponse request DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) @@ -13340,6 +13706,114 @@ func (r GetTestConnectionConnectorIdentityResponse) StatusCode() int { return 0 } +type CreateSyncDestinationFromTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncDestination + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncDestinationFromTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncDestinationFromTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSyncSourceFromTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncSource + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncSourceFromTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncSourceFromTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncDestinationFromTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncDestination + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncDestinationFromTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncDestinationFromTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncSourceFromTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncSource + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncSourceFromTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncSourceFromTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteSyncResponse struct { Body []byte HTTPResponse *http.Response @@ -15175,59 +15649,127 @@ func (c *ClientWithResponses) CreateSyncWithBodyWithResponse(ctx context.Context if err != nil { return nil, err } - return ParseCreateSyncResponse(rsp) + return ParseCreateSyncResponse(rsp) +} + +func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { + rsp, err := c.CreateSync(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncResponse(rsp) +} + +// GetSyncTestConnectionWithResponse request returning *GetSyncTestConnectionResponse +func (c *ClientWithResponses) GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) { + rsp, err := c.GetSyncTestConnection(ctx, teamName, syncTestConnectionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncTestConnectionResponse(rsp) +} + +// UpdateSyncTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionResponse +func (c *ClientWithResponses) UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { + rsp, err := c.UpdateSyncTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { + rsp, err := c.UpdateSyncTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionResponse(rsp) +} + +// GetTestConnectionConnectorCredentialsWithResponse request returning *GetTestConnectionConnectorCredentialsResponse +func (c *ClientWithResponses) GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) { + rsp, err := c.GetTestConnectionConnectorCredentials(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTestConnectionConnectorCredentialsResponse(rsp) +} + +// GetTestConnectionConnectorIdentityWithResponse request returning *GetTestConnectionConnectorIdentityResponse +func (c *ClientWithResponses) GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) { + rsp, err := c.GetTestConnectionConnectorIdentity(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTestConnectionConnectorIdentityResponse(rsp) +} + +// CreateSyncDestinationFromTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncDestinationFromTestConnectionResponse +func (c *ClientWithResponses) CreateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) { + rsp, err := c.CreateSyncDestinationFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncDestinationFromTestConnectionResponse(rsp) +} + +func (c *ClientWithResponses) CreateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) { + rsp, err := c.CreateSyncDestinationFromTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncDestinationFromTestConnectionResponse(rsp) } -func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { - rsp, err := c.CreateSync(ctx, teamName, body, reqEditors...) +// CreateSyncSourceFromTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncSourceFromTestConnectionResponse +func (c *ClientWithResponses) CreateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) { + rsp, err := c.CreateSyncSourceFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateSyncResponse(rsp) + return ParseCreateSyncSourceFromTestConnectionResponse(rsp) } -// GetSyncTestConnectionWithResponse request returning *GetSyncTestConnectionResponse -func (c *ClientWithResponses) GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) { - rsp, err := c.GetSyncTestConnection(ctx, teamName, syncTestConnectionId, reqEditors...) +func (c *ClientWithResponses) CreateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) { + rsp, err := c.CreateSyncSourceFromTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) if err != nil { return nil, err } - return ParseGetSyncTestConnectionResponse(rsp) + return ParseCreateSyncSourceFromTestConnectionResponse(rsp) } -// UpdateSyncTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionResponse -func (c *ClientWithResponses) UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { - rsp, err := c.UpdateSyncTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) +// UpdateSyncDestinationFromTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncDestinationFromTestConnectionResponse +func (c *ClientWithResponses) UpdateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) { + rsp, err := c.UpdateSyncDestinationFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, syncDestinationName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateSyncTestConnectionResponse(rsp) + return ParseUpdateSyncDestinationFromTestConnectionResponse(rsp) } -func (c *ClientWithResponses) UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { - rsp, err := c.UpdateSyncTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) +func (c *ClientWithResponses) UpdateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) { + rsp, err := c.UpdateSyncDestinationFromTestConnection(ctx, teamName, syncTestConnectionId, syncDestinationName, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateSyncTestConnectionResponse(rsp) + return ParseUpdateSyncDestinationFromTestConnectionResponse(rsp) } -// GetTestConnectionConnectorCredentialsWithResponse request returning *GetTestConnectionConnectorCredentialsResponse -func (c *ClientWithResponses) GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) { - rsp, err := c.GetTestConnectionConnectorCredentials(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) +// UpdateSyncSourceFromTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncSourceFromTestConnectionResponse +func (c *ClientWithResponses) UpdateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) { + rsp, err := c.UpdateSyncSourceFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, syncSourceName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetTestConnectionConnectorCredentialsResponse(rsp) + return ParseUpdateSyncSourceFromTestConnectionResponse(rsp) } -// GetTestConnectionConnectorIdentityWithResponse request returning *GetTestConnectionConnectorIdentityResponse -func (c *ClientWithResponses) GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) { - rsp, err := c.GetTestConnectionConnectorIdentity(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) +func (c *ClientWithResponses) UpdateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) { + rsp, err := c.UpdateSyncSourceFromTestConnection(ctx, teamName, syncTestConnectionId, syncSourceName, body, reqEditors...) if err != nil { return nil, err } - return ParseGetTestConnectionConnectorIdentityResponse(rsp) + return ParseUpdateSyncSourceFromTestConnectionResponse(rsp) } // DeleteSyncWithResponse request returning *DeleteSyncResponse @@ -21216,6 +21758,250 @@ func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTe return response, nil } +// ParseCreateSyncDestinationFromTestConnectionResponse parses an HTTP response from a CreateSyncDestinationFromTestConnectionWithResponse call +func ParseCreateSyncDestinationFromTestConnectionResponse(rsp *http.Response) (*CreateSyncDestinationFromTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSyncDestinationFromTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncDestination + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateSyncSourceFromTestConnectionResponse parses an HTTP response from a CreateSyncSourceFromTestConnectionWithResponse call +func ParseCreateSyncSourceFromTestConnectionResponse(rsp *http.Response) (*CreateSyncSourceFromTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSyncSourceFromTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateSyncDestinationFromTestConnectionResponse parses an HTTP response from a UpdateSyncDestinationFromTestConnectionWithResponse call +func ParseUpdateSyncDestinationFromTestConnectionResponse(rsp *http.Response) (*UpdateSyncDestinationFromTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSyncDestinationFromTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncDestination + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateSyncSourceFromTestConnectionResponse parses an HTTP response from a UpdateSyncSourceFromTestConnectionWithResponse call +func ParseUpdateSyncSourceFromTestConnectionResponse(rsp *http.Response) (*UpdateSyncSourceFromTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSyncSourceFromTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteSyncResponse parses an HTTP response from a DeleteSyncWithResponse call func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index bcc45cc..76cab91 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1961,10 +1961,25 @@ type SyncDestinationCreate struct { WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } +// SyncDestinationCreateFromTestConnection Sync Destination from Test Connection Definition +type SyncDestinationCreateFromTestConnection struct { + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + + // MigrateMode Migrate mode for the destination + MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` + + // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // WriteMode Write mode for the destination + WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` +} + // SyncDestinationMigrateMode Migrate mode for the destination type SyncDestinationMigrateMode string -// SyncDestinationUpdate Sync Destination Definition +// SyncDestinationUpdate Sync Destination Update Definition type SyncDestinationUpdate struct { // ConnectorId ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` @@ -1989,6 +2004,18 @@ type SyncDestinationUpdate struct { WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } +// SyncDestinationUpdateFromTestConnection Sync Destination Update from Test Connection Definition +type SyncDestinationUpdateFromTestConnection struct { + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + + // MigrateMode Migrate mode for the destination + MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` + + // WriteMode Write mode for the destination + WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` +} + // SyncDestinationWriteMode Write mode for the destination type SyncDestinationWriteMode string @@ -2153,6 +2180,21 @@ type SyncSourceCreate struct { Version string `json:"version"` } +// SyncSourceCreateFromTestConnection Sync Source from Test Connection Definition +type SyncSourceCreateFromTestConnection struct { + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + + // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. + SkipTables *[]string `json:"skip_tables,omitempty"` + + // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. + Tables []string `json:"tables"` +} + // SyncSourceUpdate Sync Source Update Definition type SyncSourceUpdate struct { // ConnectorId ID of the Connector @@ -2178,12 +2220,24 @@ type SyncSourceUpdate struct { Version *string `json:"version,omitempty"` } +// SyncSourceUpdateFromTestConnection Sync Source Update from Test Connection Definition +type SyncSourceUpdateFromTestConnection struct { + // LastUpdateSource How was the source or destination been created or updated last + LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` + + // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. + SkipTables *[]string `json:"skip_tables,omitempty"` + + // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. + Tables *[]string `json:"tables,omitempty"` +} + // SyncTestConnection defines model for SyncTestConnection. type SyncTestConnection struct { - // CompletedAt Cron schedule for the sync + // CompletedAt Time the test connection was completed CompletedAt *time.Time `json:"completed_at,omitempty"` - // CreatedAt Whether the sync is disabled + // CreatedAt Time the test connection was created CreatedAt time.Time `json:"created_at"` // FailureCode Code for failure @@ -2195,6 +2249,15 @@ type SyncTestConnection struct { // Id unique ID of the test connection ID ID `json:"id"` + // PluginKind The kind of plugin, ie. source or destination. + PluginKind *PluginKind `json:"plugin_kind,omitempty"` + + // PluginPath Plugin path in CloudQuery registry + PluginPath *SyncPluginPath `json:"plugin_path,omitempty"` + + // PluginVersion The version in semantic version format. + PluginVersion *VersionName `json:"plugin_version,omitempty"` + // Status The status of the sync run Status SyncTestConnectionStatus `json:"status"` } @@ -3058,6 +3121,18 @@ type CreateSyncJSONRequestBody = SyncCreate // UpdateSyncTestConnectionJSONRequestBody defines body for UpdateSyncTestConnection for application/json ContentType. type UpdateSyncTestConnectionJSONRequestBody = UpdateSyncTestConnectionRequest +// CreateSyncDestinationFromTestConnectionJSONRequestBody defines body for CreateSyncDestinationFromTestConnection for application/json ContentType. +type CreateSyncDestinationFromTestConnectionJSONRequestBody = SyncDestinationCreateFromTestConnection + +// CreateSyncSourceFromTestConnectionJSONRequestBody defines body for CreateSyncSourceFromTestConnection for application/json ContentType. +type CreateSyncSourceFromTestConnectionJSONRequestBody = SyncSourceCreateFromTestConnection + +// UpdateSyncDestinationFromTestConnectionJSONRequestBody defines body for UpdateSyncDestinationFromTestConnection for application/json ContentType. +type UpdateSyncDestinationFromTestConnectionJSONRequestBody = SyncDestinationUpdateFromTestConnection + +// UpdateSyncSourceFromTestConnectionJSONRequestBody defines body for UpdateSyncSourceFromTestConnection for application/json ContentType. +type UpdateSyncSourceFromTestConnectionJSONRequestBody = SyncSourceUpdateFromTestConnection + // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. type UpdateSyncJSONRequestBody = SyncUpdate diff --git a/spec.json b/spec.json index 2e7d4da..b59febc 100644 --- a/spec.json +++ b/spec.json @@ -4826,6 +4826,206 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-source" : { + "post" : { + "description" : "Create new Sync Source definition from a test connection.", + "operationId" : "CreateSyncSourceFromTestConnection", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSourceCreateFromTestConnection" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSource" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-destination" : { + "post" : { + "description" : "Create new Sync Destination definition from a test connection.", + "operationId" : "CreateSyncDestinationFromTestConnection", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationCreateFromTestConnection" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-source/{sync_source_name}" : { + "patch" : { + "description" : "Update Sync Source definition from a test connection.", + "operationId" : "UpdateSyncSourceFromTestConnection", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + }, { + "$ref" : "#/components/parameters/sync_source_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSourceUpdateFromTestConnection" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSource" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-destination/{sync_destination_name}" : { + "patch" : { + "description" : "Update Sync Destination definition from a test connection.", + "operationId" : "UpdateSyncDestinationFromTestConnection", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationUpdateFromTestConnection" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/identity" : { "get" : { "description" : "Get connector identity for a test connection.", @@ -8039,16 +8239,25 @@ "type" : "string" }, "created_at" : { - "description" : "Whether the sync is disabled", + "description" : "Time the test connection was created", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, "completed_at" : { - "description" : "Cron schedule for the sync", + "description" : "Time the test connection was completed", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" + }, + "plugin_path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "plugin_version" : { + "$ref" : "#/components/schemas/VersionName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" } }, "required" : [ "created_at", "id", "status" ] @@ -8097,7 +8306,7 @@ "$ref" : "#/components/schemas/ConnectorID" } }, - "title" : "Sync Source definition for creating a new source" + "title" : "Sync Source definition for updating a source" }, "SyncDestinationWriteMode" : { "default" : "overwrite-delete-stale", @@ -8185,7 +8394,7 @@ } ] }, "SyncDestinationUpdate" : { - "description" : "Sync Destination Definition", + "description" : "Sync Destination Update Definition", "properties" : { "path" : { "$ref" : "#/components/schemas/SyncPluginPath" @@ -8220,7 +8429,7 @@ "$ref" : "#/components/schemas/ConnectorID" } }, - "title" : "Sync Destination definition for creating a new destination" + "title" : "Sync Destination definition for updating a destination" }, "Sync" : { "description" : "Managed Sync definition", @@ -8519,6 +8728,96 @@ }, "required" : [ "access_token" ] }, + "SyncSourceCreateFromTestConnection" : { + "description" : "Sync Source from Test Connection Definition", + "properties" : { + "name" : { + "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-source-definition", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "tables" : { + "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "skip_tables" : { + "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "required" : [ "name", "tables" ], + "title" : "Sync Source definition for creating a new source from a test connection" + }, + "SyncDestinationCreateFromTestConnection" : { + "description" : "Sync Destination from Test Connection Definition", + "properties" : { + "name" : { + "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-destination-definition", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" + }, + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" + }, + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "required" : [ "name" ], + "title" : "Sync Destination definition for creating a new destination from a test connection" + }, + "SyncSourceUpdateFromTestConnection" : { + "description" : "Sync Source Update from Test Connection Definition", + "properties" : { + "tables" : { + "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "skip_tables" : { + "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "title" : "Sync Source definition for updating a source from a test connection" + }, + "SyncDestinationUpdateFromTestConnection" : { + "description" : "Sync Destination Update from Test Connection Definition", + "properties" : { + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" + }, + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "title" : "Sync Destination definition for updating a destination from a test connection" + }, "ManagedDatabaseID" : { "description" : "The identifier for the managed database", "example" : "12345678-1234-1234-1234-1234567890ab", From bef70d4b346f1361de5bac3110eee4c567118594 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:34:50 -0400 Subject: [PATCH 175/343] fix: Generate CloudQuery Go API Client from `spec.json` (#184) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 40 ++++++++++++++++++++++++++++++++++++++-- spec.json | 12 ++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index 76cab91..f90d60f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -594,8 +594,11 @@ type ConnectorAuthFinishRequestOAuth struct { AuthCode interface{} `json:"auth_code"` // BaseUrl Base of the URL the callback url was constructed from - BaseURL interface{} `json:"base_url"` - Spec *map[string]interface{} `json:"spec,omitempty"` + BaseURL interface{} `json:"base_url"` + + // Env Environment variables used in the spec. + Env *interface{} `json:"env,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` // State State value received from the OAuth provider State *interface{} `json:"state,omitempty"` @@ -622,6 +625,9 @@ type ConnectorAuthRequestOAuth struct { // BaseUrl Base of the URL the callback url will be constructed from BaseURL interface{} `json:"base_url"` + // Env Environment variables used in the spec. + Env *interface{} `json:"env,omitempty"` + // PluginKind Kind of the plugin PluginKind interface{} `json:"plugin_kind"` @@ -3189,6 +3195,14 @@ func (a *ConnectorAuthFinishRequestOAuth) UnmarshalJSON(b []byte) error { delete(object, "base_url") } + if raw, found := object["env"]; found { + err = json.Unmarshal(raw, &a.Env) + if err != nil { + return fmt.Errorf("error reading 'env': %w", err) + } + delete(object, "env") + } + if raw, found := object["spec"]; found { err = json.Unmarshal(raw, &a.Spec) if err != nil { @@ -3234,6 +3248,13 @@ func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'base_url': %w", err) } + if a.Env != nil { + object["env"], err = json.Marshal(a.Env) + if err != nil { + return nil, fmt.Errorf("error marshaling 'env': %w", err) + } + } + if a.Spec != nil { object["spec"], err = json.Marshal(a.Spec) if err != nil { @@ -3290,6 +3311,14 @@ func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { delete(object, "base_url") } + if raw, found := object["env"]; found { + err = json.Unmarshal(raw, &a.Env) + if err != nil { + return fmt.Errorf("error reading 'env': %w", err) + } + delete(object, "env") + } + if raw, found := object["plugin_kind"]; found { err = json.Unmarshal(raw, &a.PluginKind) if err != nil { @@ -3346,6 +3375,13 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'base_url': %w", err) } + if a.Env != nil { + object["env"], err = json.Marshal(a.Env) + if err != nil { + return nil, fmt.Errorf("error marshaling 'env': %w", err) + } + } + object["plugin_kind"], err = json.Marshal(a.PluginKind) if err != nil { return nil, fmt.Errorf("error marshaling 'plugin_kind': %w", err) diff --git a/spec.json b/spec.json index b59febc..d8037fc 100644 --- a/spec.json +++ b/spec.json @@ -9023,6 +9023,12 @@ "additionalProperties" : false, "format" : "Plugin parameters, specific to each plugin", "type" : "object" + }, + "env" : { + "description" : "Environment variables used in the spec.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + } } }, "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] @@ -9058,6 +9064,12 @@ "additionalProperties" : false, "format" : "Plugin parameters, specific to each plugin", "type" : "object" + }, + "env" : { + "description" : "Environment variables used in the spec.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + } } }, "required" : [ "auth_code", "base_url" ] From e2b4aba01a86951a9ee955beb32d1ce2bd11fd6e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:11:31 -0400 Subject: [PATCH 176/343] fix: Generate CloudQuery Go API Client from `spec.json` (#185) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ spec.json | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/client.gen.go b/client.gen.go index 4e772f2..314202d 100644 --- a/client.gen.go +++ b/client.gen.go @@ -13297,6 +13297,7 @@ type TestSyncDestinationResponse struct { JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } @@ -13453,6 +13454,7 @@ type TestSyncSourceResponse struct { JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } @@ -20936,6 +20938,13 @@ func ParseTestSyncDestinationResponse(rsp *http.Response) (*TestSyncDestinationR } response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21260,6 +21269,13 @@ func ParseTestSyncSourceResponse(rsp *http.Response) (*TestSyncSourceResponse, e } response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/spec.json b/spec.json index d8037fc..774cdef 100644 --- a/spec.json +++ b/spec.json @@ -3854,6 +3854,9 @@ "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, "500" : { "$ref" : "#/components/responses/InternalError" } @@ -4088,6 +4091,9 @@ "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, "500" : { "$ref" : "#/components/responses/InternalError" } From 170ae888837baaec7559710390801f0b1bf22822 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:37:06 -0400 Subject: [PATCH 177/343] fix: Generate CloudQuery Go API Client from `spec.json` (#186) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 398 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 46 ++++++ spec.json | 169 +++++++++++++++++++++ 3 files changed, 613 insertions(+) diff --git a/client.gen.go b/client.gen.go index 314202d..61b1ff0 100644 --- a/client.gen.go +++ b/client.gen.go @@ -240,6 +240,16 @@ type ClientInterface interface { // GetPluginVersionTable request GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) + // UploadPluginUIAssetsWithBody request with any body + UploadPluginUIAssetsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UploadPluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // FinalizePluginUIAssetUploadWithBody request with any body + FinalizePluginUIAssetUploadWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + FinalizePluginUIAssetUpload(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthRegistryRequest request AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1243,6 +1253,54 @@ func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } +func (c *Client) UploadPluginUIAssetsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadPluginUIAssetsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UploadPluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadPluginUIAssetsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) FinalizePluginUIAssetUploadWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFinalizePluginUIAssetUploadRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) FinalizePluginUIAssetUpload(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFinalizePluginUIAssetUploadRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthRegistryRequestRequest(c.Server, params) if err != nil { @@ -5257,6 +5315,142 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return req, nil } +// NewUploadPluginUIAssetsRequest calls the generic UploadPluginUIAssets builder with application/json body +func NewUploadPluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUploadPluginUIAssetsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewUploadPluginUIAssetsRequestWithBody generates requests for UploadPluginUIAssets with any type of body +func NewUploadPluginUIAssetsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewFinalizePluginUIAssetUploadRequest calls the generic FinalizePluginUIAssetUpload builder with application/json body +func NewFinalizePluginUIAssetUploadRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewFinalizePluginUIAssetUploadRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewFinalizePluginUIAssetUploadRequestWithBody generates requests for FinalizePluginUIAssetUpload with any type of body +func NewFinalizePluginUIAssetUploadRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewAuthRegistryRequestRequest generates requests for AuthRegistryRequest func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestParams) (*http.Request, error) { var err error @@ -10592,6 +10786,16 @@ type ClientWithResponsesInterface interface { // GetPluginVersionTableWithResponse request GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + // UploadPluginUIAssetsWithBodyWithResponse request with any body + UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) + + UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) + + // FinalizePluginUIAssetUploadWithBodyWithResponse request with any body + FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) + + FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) + // AuthRegistryRequestWithResponse request AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) @@ -11952,6 +12156,58 @@ func (r GetPluginVersionTableResponse) StatusCode() int { return 0 } +type UploadPluginUIAssetsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *UploadPluginUIAssets201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UploadPluginUIAssetsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UploadPluginUIAssetsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type FinalizePluginUIAssetUploadResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r FinalizePluginUIAssetUploadResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r FinalizePluginUIAssetUploadResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type AuthRegistryRequestResponse struct { Body []byte HTTPResponse *http.Response @@ -14887,6 +15143,40 @@ func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Cont return ParseGetPluginVersionTableResponse(rsp) } +// UploadPluginUIAssetsWithBodyWithResponse request with arbitrary body returning *UploadPluginUIAssetsResponse +func (c *ClientWithResponses) UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { + rsp, err := c.UploadPluginUIAssetsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadPluginUIAssetsResponse(rsp) +} + +func (c *ClientWithResponses) UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { + rsp, err := c.UploadPluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadPluginUIAssetsResponse(rsp) +} + +// FinalizePluginUIAssetUploadWithBodyWithResponse request with arbitrary body returning *FinalizePluginUIAssetUploadResponse +func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { + rsp, err := c.FinalizePluginUIAssetUploadWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseFinalizePluginUIAssetUploadResponse(rsp) +} + +func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { + rsp, err := c.FinalizePluginUIAssetUpload(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseFinalizePluginUIAssetUploadResponse(rsp) +} + // AuthRegistryRequestWithResponse request returning *AuthRegistryRequestResponse func (c *ClientWithResponses) AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) { rsp, err := c.AuthRegistryRequest(ctx, params, reqEditors...) @@ -18058,6 +18348,114 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } +// ParseUploadPluginUIAssetsResponse parses an HTTP response from a UploadPluginUIAssetsWithResponse call +func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAssetsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UploadPluginUIAssetsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest UploadPluginUIAssets201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseFinalizePluginUIAssetUploadResponse parses an HTTP response from a FinalizePluginUIAssetUploadWithResponse call +func ParseFinalizePluginUIAssetUploadResponse(rsp *http.Response) (*FinalizePluginUIAssetUploadResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &FinalizePluginUIAssetUploadResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index f90d60f..01c7e9f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -854,6 +854,12 @@ type FieldError struct { Status int `json:"status"` } +// FinalizePluginUIAssetUploadRequest defines model for FinalizePluginUIAssetUpload_request. +type FinalizePluginUIAssetUploadRequest struct { + // UiId ID representing the finished upload + UIID string `json:"ui_id"` +} + // GetCurrentUserMemberships200Response defines model for GetCurrentUserMemberships_200_response. type GetCurrentUserMemberships200Response struct { Items []MembershipWithTeam `json:"items"` @@ -1582,6 +1588,24 @@ type PluginTableName = string // - open-core: This option is deprecated, values will either be free or paid. type PluginTier string +// PluginUIAsset CloudQuery Plugin UI Asset +type PluginUIAsset struct { + // Name The path and name of the asset + Name string `json:"name"` + + // UploadUrl URL to upload the asset to + UploadURL string `json:"upload_url"` +} + +// PluginUIAssetUploadRequest CloudQuery Plugin UI Asset Upload Request +type PluginUIAssetUploadRequest struct { + // ContentType Content-type of the asset + ContentType *string `json:"content_type,omitempty"` + + // Name The path and name of the asset + Name string `json:"name"` +} + // PluginUpdate defines model for PluginUpdate. type PluginUpdate struct { // Category Supported categories for plugins @@ -1746,6 +1770,9 @@ type PluginVersionDetails struct { // SupportedTargets The targets supported by this plugin version, formatted as _ SupportedTargets []string `json:"supported_targets"` + + // UiBaseUrl Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. + UIBaseURL *string `json:"ui_base_url,omitempty"` } // PluginVersionList CloudQuery Plugin Version @@ -2423,6 +2450,19 @@ type UpdateTeamRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// UploadPluginUIAssets201Response defines model for UploadPluginUIAssets_201_response. +type UploadPluginUIAssets201Response struct { + Assets []PluginUIAsset `json:"assets"` + + // UiId ID representing this upload + UIID string `json:"ui_id"` +} + +// UploadPluginUIAssetsRequest defines model for UploadPluginUIAssets_request. +type UploadPluginUIAssetsRequest struct { + Assets []PluginUIAssetUploadRequest `json:"assets"` +} + // UsageCurrent The usage of a plugin within the current calendar month. type UsageCurrent struct { // PluginKind The kind of plugin, ie. source or destination. @@ -3046,6 +3086,12 @@ type DeletePluginVersionTablesJSONRequestBody = DeletePluginVersionTablesRequest // CreatePluginVersionTablesJSONRequestBody defines body for CreatePluginVersionTables for application/json ContentType. type CreatePluginVersionTablesJSONRequestBody = CreatePluginVersionTablesRequest +// UploadPluginUIAssetsJSONRequestBody defines body for UploadPluginUIAssets for application/json ContentType. +type UploadPluginUIAssetsJSONRequestBody = UploadPluginUIAssetsRequest + +// FinalizePluginUIAssetUploadJSONRequestBody defines body for FinalizePluginUIAssetUpload for application/json ContentType. +type FinalizePluginUIAssetUploadJSONRequestBody = FinalizePluginUIAssetUploadRequest + // CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType. type CreateTeamJSONRequestBody = CreateTeamRequest diff --git a/spec.json b/spec.json index 774cdef..4ef97d3 100644 --- a/spec.json +++ b/spec.json @@ -1213,6 +1213,98 @@ "tags" : [ "plugins" ] } }, + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/uiassets" : { + "post" : { + "description" : "Get URLs to upload UI assets for a given plugin version", + "operationId" : "UploadPluginUIAssets", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadPluginUIAssets_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadPluginUIAssets_201_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "put" : { + "description" : "Finalize UI asset upload", + "operationId" : "FinalizePluginUIAssetUpload", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FinalizePluginUIAssetUpload_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + } + }, "/addons" : { "get" : { "description" : "List all addons", @@ -6687,6 +6779,11 @@ "example_config" : { "description" : "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format.", "type" : "string" + }, + "ui_base_url" : { + "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", + "type" : "string", + "x-go-name" : "UIBaseURL" } }, "required" : [ "example_config" ] @@ -6974,6 +7071,41 @@ }, "required" : [ "url" ] }, + "PluginUIAssetUploadRequest" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin UI Asset Upload Request", + "properties" : { + "name" : { + "description" : "The path and name of the asset", + "example" : "scripts/main.js", + "type" : "string" + }, + "content_type" : { + "description" : "Content-type of the asset", + "example" : "application/json", + "type" : "string" + } + }, + "required" : [ "name" ], + "title" : "CloudQuery Plugin UI Asset Upload Request" + }, + "PluginUIAsset" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin UI Asset", + "properties" : { + "name" : { + "description" : "The path and name of the asset", + "type" : "string" + }, + "upload_url" : { + "description" : "URL to upload the asset to", + "type" : "string", + "x-go-name" : "UploadURL" + } + }, + "required" : [ "name", "upload_url" ], + "title" : "CloudQuery Plugin UI Asset" + }, "AddonName" : { "description" : "The unique name for the addon.", "example" : "aws-policy", @@ -9281,6 +9413,43 @@ }, "required" : [ "names" ] }, + "FinalizePluginUIAssetUpload_request" : { + "properties" : { + "ui_id" : { + "description" : "ID representing the finished upload", + "type" : "string", + "x-go-name" : "UIID" + } + }, + "required" : [ "ui_id" ] + }, + "UploadPluginUIAssets_request" : { + "properties" : { + "assets" : { + "items" : { + "$ref" : "#/components/schemas/PluginUIAssetUploadRequest" + }, + "type" : "array" + } + }, + "required" : [ "assets" ] + }, + "UploadPluginUIAssets_201_response" : { + "properties" : { + "ui_id" : { + "description" : "ID representing this upload", + "type" : "string", + "x-go-name" : "UIID" + }, + "assets" : { + "items" : { + "$ref" : "#/components/schemas/PluginUIAsset" + }, + "type" : "array" + } + }, + "required" : [ "assets", "ui_id" ] + }, "ListAddons_200_response" : { "properties" : { "items" : { From 63205b94db002ba554b7924d2469cde5d29a0096 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:04:22 -0400 Subject: [PATCH 178/343] fix: Generate CloudQuery Go API Client from `spec.json` (#187) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` From 3ebded6d6ca274eb8a7e0538ce94fd3851f77ecf Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:34:05 -0400 Subject: [PATCH 179/343] fix: Generate CloudQuery Go API Client from `spec.json` (#188) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/spec.json b/spec.json index 4ef97d3..2c36d50 100644 --- a/spec.json +++ b/spec.json @@ -5420,8 +5420,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] }, "post" : { "description" : "Create new connector", @@ -5463,8 +5462,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] } }, "/teams/{team_name}/connectors/{connector_id}" : { @@ -5497,8 +5495,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] }, "patch" : { "description" : "Update a connector", @@ -5541,8 +5538,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] } }, "/teams/{team_name}/connectors/{connector_id}/authenticate" : { @@ -5571,8 +5567,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] } }, "/teams/{team_name}/connectors/{connector_id}/authenticate/aws" : { @@ -5617,8 +5612,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] }, "post" : { "description" : "Authenticate or reauthenticate the given AWS connector", @@ -5665,8 +5659,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] } }, "/teams/{team_name}/connectors/{connector_id}/authenticate/oauth" : { @@ -5711,8 +5704,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] }, "post" : { "description" : "Authenticate or reauthenticate the given OAuth connector", @@ -5759,8 +5751,7 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] } } }, From b478180b847da753d6283533479381ae008bd974 Mon Sep 17 00:00:00 2001 From: Kemal <223029+disq@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:24:40 +0100 Subject: [PATCH 180/343] feat: Upgrade oapi-codegen version (#189) * feat: Upgrade oapi-codegen version * go generate * generate again using openapi-generator before the go generate --------- Co-authored-by: Kemal Hadimli --- client.gen.go | 20 +- client.go | 4 +- go.mod | 70 +----- go.sum | 236 +----------------- models.gen.go | 676 +++++++------------------------------------------- 5 files changed, 107 insertions(+), 899 deletions(-) diff --git a/client.gen.go b/client.gen.go index 61b1ff0..69766d6 100644 --- a/client.gen.go +++ b/client.gen.go @@ -1,6 +1,6 @@ // Package cloudquery_api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.3 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package cloudquery_api import ( @@ -13,8 +13,8 @@ import ( "net/url" "strings" - "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/hashicorp/go-retryablehttp" + "github.com/oapi-codegen/runtime" ) // RequestEditorFn is the function signature for the RequestEditor callback function @@ -301,7 +301,7 @@ type ClientInterface interface { CreateTeamAPIKey(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTeamAPIKey request - DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteTeamAPIKey(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) // ListConnectors request ListConnectors(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1517,8 +1517,8 @@ func (c *Client) CreateTeamAPIKey(ctx context.Context, teamName TeamName, body C return c.Client.Do(req) } -func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, aPIKeyID) +func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, apiKeyID) if err != nil { return nil, err } @@ -6257,7 +6257,7 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten } // NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey -func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyID APIKeyID) (*http.Request, error) { +func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, apiKeyID APIKeyID) (*http.Request, error) { var err error var pathParam0 string @@ -6269,7 +6269,7 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, aPIKeyID APIKe var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_id", runtime.ParamLocationPath, aPIKeyID) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_id", runtime.ParamLocationPath, apiKeyID) if err != nil { return nil, err } @@ -10847,7 +10847,7 @@ type ClientWithResponsesInterface interface { CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) // ListConnectorsWithResponse request ListConnectorsWithResponse(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*ListConnectorsResponse, error) @@ -15336,8 +15336,8 @@ func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, } // DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse -func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, aPIKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { - rsp, err := c.DeleteTeamAPIKey(ctx, teamName, aPIKeyID, reqEditors...) +func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { + rsp, err := c.DeleteTeamAPIKey(ctx, teamName, apiKeyID, reqEditors...) if err != nil { return nil, err } diff --git a/client.go b/client.go index 50d8c5e..f4165f4 100644 --- a/client.go +++ b/client.go @@ -1,3 +1,3 @@ -//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.13.3 --config=./models.yaml ./spec.json -//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.13.3 --config=./client.yaml ./spec.json +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config=./models.yaml ./spec.json +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config=./client.yaml ./spec.json package cloudquery_api diff --git a/go.mod b/go.mod index f5118f9..f7512df 100644 --- a/go.mod +++ b/go.mod @@ -4,79 +4,19 @@ go 1.21.0 require ( github.com/adrg/xdg v0.4.0 - github.com/deepmap/oapi-codegen v1.15.0 github.com/hashicorp/go-retryablehttp v0.7.5 + github.com/oapi-codegen/runtime v1.1.1 github.com/stretchr/testify v1.8.4 ) require ( - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect - github.com/CloudyKit/jet/v6 v6.2.0 // indirect - github.com/Joker/jade v1.1.3 // indirect - github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect - github.com/andybalholm/brotli v1.0.5 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect - github.com/aymerick/douceur v0.2.0 // indirect - github.com/bytedance/sonic v1.9.1 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/structs v1.1.0 // indirect - github.com/flosch/pongo2/v4 v4.0.2 // indirect - github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gin-contrib/sse v0.1.0 // indirect - github.com/gin-gonic/gin v1.9.1 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/gorilla/css v1.0.0 // indirect + github.com/google/uuid v1.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/iris-contrib/schema v0.0.6 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kataras/blocks v0.0.7 // indirect - github.com/kataras/golog v0.1.9 // indirect - github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 // indirect - github.com/kataras/pio v0.0.12 // indirect - github.com/kataras/sitemap v0.0.6 // indirect - github.com/kataras/tunnel v0.0.4 // indirect - github.com/klauspost/compress v1.16.7 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect - github.com/labstack/echo/v4 v4.11.1 // indirect - github.com/labstack/gommon v0.4.0 // indirect - github.com/leodido/go-urn v1.2.4 // indirect - github.com/mailgun/raymond/v2 v2.0.48 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/microcosm-cc/bluemonday v1.0.25 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/schollz/closestmatch v2.1.0+incompatible // indirect - github.com/sirupsen/logrus v1.8.1 // indirect - github.com/tdewolff/minify/v2 v2.12.9 // indirect - github.com/tdewolff/parse/v2 v2.6.8 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect - github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.2 // indirect - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect - github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/yosssi/ace v0.0.5 // indirect - golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect + golang.org/x/sys v0.15.0 // indirect + gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index def0426..c6d51f1 100644 --- a/go.sum +++ b/go.sum @@ -1,267 +1,43 @@ -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= -github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= -github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= -github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= -github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= -github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= -github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepmap/oapi-codegen v1.15.0 h1:SQqViaeb4k2vMul8gx12oDOIadEtoRqTdLkxjzqtQ90= -github.com/deepmap/oapi-codegen v1.15.0/go.mod h1:a6KoHV7lMRwsPoEg2C6NDHiXYV3EQfiFocOlJ8dgJQE= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= -github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= -github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= -github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/iris-contrib/httpexpect/v2 v2.15.2 h1:T9THsdP1woyAqKHwjkEsbCnMefsAFvk8iJJKokcJ3Go= -github.com/iris-contrib/httpexpect/v2 v2.15.2/go.mod h1:JLDgIqnFy5loDSUv1OA2j0mb6p/rDhiCqigP22Uq9xE= -github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= -github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= -github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= -github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk= -github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY= -github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 h1:Vx8kDVhO2qepK8w44lBtp+RzN3ld743i+LYPzODJSpQ= -github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9/go.mod h1:ldkoR3iXABBeqlTibQ3MYaviA1oSlPvim6f55biwBh4= -github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w= -github.com/kataras/pio v0.0.12/go.mod h1:ODK/8XBhhQ5WqrAhKy+9lTPS7sBf6O3KcLhc9klfRcY= -github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= -github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= -github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= -github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= -github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= -github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= -github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= -github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= -github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= -github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= -github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= +github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= -github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= -github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= -github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= -github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= -github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= -github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0= -github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= -github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= -github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= -github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= -golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= -moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/models.gen.go b/models.gen.go index 01c7e9f..8120949 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1,6 +1,6 @@ // Package cloudquery_api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.3 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package cloudquery_api import ( @@ -8,7 +8,7 @@ import ( "fmt" "time" - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + openapi_types "github.com/oapi-codegen/runtime/types" ) const ( @@ -204,6 +204,12 @@ const ( TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" ) +// Defines values for UsageSummaryMetadataAggregationPeriod. +const ( + UsageSummaryMetadataAggregationPeriodDay UsageSummaryMetadataAggregationPeriod = "day" + UsageSummaryMetadataAggregationPeriodMonth UsageSummaryMetadataAggregationPeriod = "month" +) + // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -299,7 +305,7 @@ type APIKey struct { // ExpiresAt Timestamp at which API key will stop working ExpiresAt time.Time `json:"expires_at"` - // Id ID of the API key + // APIKeyID ID of the API key APIKeyID APIKeyID `json:"id"` // Key API key. Will be shown only in the response when creating the key. @@ -349,7 +355,7 @@ type Addon struct { // Official True if the addon is maintained by CloudQuery, false otherwise Official bool `json:"official"` - // PriceUsd The price for 6 months + // PriceUSD The price for 6 months PriceUSD string `json:"price_usd"` // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. @@ -396,7 +402,7 @@ type AddonCreate struct { // Name The unique name for the addon. Name AddonName `json:"name"` - // PriceUsd The price for 6 months + // PriceUSD The price for 6 months PriceUSD *string `json:"price_usd,omitempty"` // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. @@ -429,11 +435,11 @@ type AddonOrder struct { AddonType AddonType `json:"addon_type"` CompletedAt *time.Time `json:"completed_at,omitempty"` - // CompletionUrl Stripe URL for completing purchase. Only shown in response to POST request. + // CompletionURL Stripe URL for completing purchase. Only shown in response to POST request. CompletionURL *string `json:"completion_url,omitempty"` CreatedAt time.Time `json:"created_at"` - // Id ID of the addon order + // AddonOrderID ID of the addon order AddonOrderID AddonOrderID `json:"id"` Status AddonOrderStatus `json:"status"` @@ -486,7 +492,7 @@ type AddonUpdate struct { Homepage *string `json:"homepage,omitempty"` Logo *string `json:"logo,omitempty"` - // PriceUsd The price for 6 months in USD + // PriceUSD The price for 6 months in USD PriceUSD *string `json:"price_usd,omitempty"` // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. @@ -566,7 +572,7 @@ type Connector struct { // CreatedAt Time the connector was created CreatedAt time.Time `json:"created_at"` - // Id unique ID of the connector + // ID unique ID of the connector ID openapi_types.UUID `json:"id"` // Name Name of the connector @@ -581,10 +587,10 @@ type Connector struct { // ConnectorAuthFinishRequestAWS AWS connector authentication request, filled in after the user has authenticated through AWS type ConnectorAuthFinishRequestAWS struct { - // ExternalId External ID in the role definition. Optional. If not provided the previously suggested external ID will be used. Empty string will remove the external ID. + // ExternalID External ID in the role definition. Optional. If not provided the previously suggested external ID will be used. Empty string will remove the external ID. ExternalID *string `json:"external_id,omitempty"` - // RoleArn ARN of role created by the user + // RoleARN ARN of role created by the user RoleARN string `json:"role_arn"` } @@ -593,7 +599,7 @@ type ConnectorAuthFinishRequestOAuth struct { // AuthCode Auth code received from the OAuth provider AuthCode interface{} `json:"auth_code"` - // BaseUrl Base of the URL the callback url was constructed from + // BaseURL Base of the URL the callback url was constructed from BaseURL interface{} `json:"base_url"` // Env Environment variables used in the spec. @@ -607,7 +613,7 @@ type ConnectorAuthFinishRequestOAuth struct { // ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process type ConnectorAuthRequestAWS struct { - // AccountIds List of AWS account IDs to authenticate + // AccountIDs List of AWS account IDs to authenticate AccountIDs *[]string `json:"account_ids,omitempty"` // PluginKind Kind of the plugin @@ -622,7 +628,7 @@ type ConnectorAuthRequestAWS struct { // ConnectorAuthRequestOAuth OAuth connector authentication request to start the authentication process type ConnectorAuthRequestOAuth struct { - // BaseUrl Base of the URL the callback url will be constructed from + // BaseURL Base of the URL the callback url will be constructed from BaseURL interface{} `json:"base_url"` // Env Environment variables used in the spec. @@ -642,22 +648,22 @@ type ConnectorAuthRequestOAuth struct { // ConnectorAuthResponseAWS AWS connector authentication response to start the authentication process type ConnectorAuthResponseAWS struct { - // RedirectUrl URL to redirect the user to, to authenticate + // RedirectURL URL to redirect the user to, to authenticate RedirectURL string `json:"redirect_url"` - // RoleTemplateUrl URL to the role template, to present to the user + // RoleTemplateURL URL to the role template, to present to the user RoleTemplateURL string `json:"role_template_url"` - // SuggestedExternalId External ID suggested to enter into the role definition + // SuggestedExternalID External ID suggested to enter into the role definition SuggestedExternalID string `json:"suggested_external_id"` - // SuggestedPolicyArns List of AWS policy ARNs suggested to grant inside the role definition + // SuggestedPolicyARNs List of AWS policy ARNs suggested to grant inside the role definition SuggestedPolicyARNs []string `json:"suggested_policy_arns"` } // ConnectorAuthResponseOAuth OAuth connector authentication response to start the authentication process type ConnectorAuthResponseOAuth struct { - // RedirectUrl URL to redirect the user to, to authenticate + // RedirectURL URL to redirect the user to, to authenticate RedirectURL string `json:"redirect_url"` } @@ -691,10 +697,10 @@ type ConnectorID = openapi_types.UUID // ConnectorIdentityResponseAWS AWS connector identity response type ConnectorIdentityResponseAWS struct { - // AccountIds List of AWS account IDs + // AccountIDs List of AWS account IDs AccountIDs []string `json:"account_ids"` - // RoleArn Role ARN to assume + // RoleARN Role ARN to assume RoleARN string `json:"role_arn"` } @@ -806,12 +812,10 @@ type CreateTeamImagesRequest struct { // CreateTeamRequest defines model for CreateTeam_request. type CreateTeamRequest struct { - // DisplayName The team's display name DisplayName interface{} `json:"display_name"` // Name The unique name for the team. - Name TeamName `json:"name"` - AdditionalProperties map[string]interface{} `json:"-"` + Name TeamName `json:"name"` } // DeletePluginVersionDocsRequest defines model for DeletePluginVersionDocs_request. @@ -856,7 +860,7 @@ type FieldError struct { // FinalizePluginUIAssetUploadRequest defines model for FinalizePluginUIAssetUpload_request. type FinalizePluginUIAssetUploadRequest struct { - // UiId ID representing the finished upload + // UIID ID representing the finished upload UIID string `json:"ui_id"` } @@ -929,7 +933,7 @@ type Invoice struct { CreatedAt time.Time `json:"created_at"` Currency string `json:"currency"` - // InvoicePdf The link to download the PDF for the invoice. + // InvoicePDF The link to download the PDF for the invoice. InvoicePDF string `json:"invoice_pdf"` // Paid Whether or not payment was successfully collected for this invoice. @@ -962,7 +966,7 @@ type ListAddon struct { // Official True if the addon is maintained by CloudQuery, false otherwise Official bool `json:"official"` - // PriceUsd The price for 6 months + // PriceUSD The price for 6 months PriceUSD string `json:"price_usd"` // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. @@ -1083,7 +1087,7 @@ type ListPlugin struct { Tier PluginTier `json:"tier"` UpdatedAt time.Time `json:"updated_at"` - // UsdPerRow Deprecated. Refer to `price_category` instead. + // USDPerRow Deprecated. Refer to `price_category` instead. // Deprecated: USDPerRow string `json:"usd_per_row"` } @@ -1201,7 +1205,7 @@ type ManagedDatabase struct { // Expiration Time the managed database should expire Expiration *time.Time `json:"expiration,omitempty"` - // Id The identifier for the managed database + // ManagedDatabaseID The identifier for the managed database ManagedDatabaseID ManagedDatabaseID `json:"id"` // Status The status of the managed database @@ -1287,7 +1291,7 @@ type Plugin struct { Tier PluginTier `json:"tier"` UpdatedAt time.Time `json:"updated_at"` - // UsdPerRow Deprecated. Refer to `price_category` instead. + // USDPerRow Deprecated. Refer to `price_category` instead. // Deprecated: USDPerRow string `json:"usd_per_row"` } @@ -1354,7 +1358,7 @@ type PluginCreate struct { // Deprecated: Tier *PluginTier `json:"tier,omitempty"` - // UsdPerRow Deprecated. Use `price_category` instead. + // USDPerRow Deprecated. Use `price_category` instead. // Deprecated: USDPerRow *string `json:"usd_per_row,omitempty"` } @@ -1430,10 +1434,10 @@ type PluginPrice struct { // FreeRowsPerMonth The number of rows that can be synced for free each month. FreeRowsPerMonth int64 `json:"free_rows_per_month"` - // Id ID of the price change + // ID ID of the price change ID openapi_types.UUID `json:"id"` - // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + // USDPerRow The price per row in USD. This is used to calculate the price of a sync. USDPerRow string `json:"usd_per_row"` } @@ -1448,7 +1452,7 @@ type PluginPriceCreate struct { // FreeRowsPerMonth The number of rows that can be synced for free each month. FreeRowsPerMonth int64 `json:"free_rows_per_month"` - // UsdPerRow The price per row in USD. This is used to calculate the price of a sync. + // USDPerRow The price per row in USD. This is used to calculate the price of a sync. USDPerRow string `json:"usd_per_row"` } @@ -1593,7 +1597,7 @@ type PluginUIAsset struct { // Name The path and name of the asset Name string `json:"name"` - // UploadUrl URL to upload the asset to + // UploadURL URL to upload the asset to UploadURL string `json:"upload_url"` } @@ -1647,7 +1651,7 @@ type PluginUpdate struct { // Deprecated: Tier *PluginTier `json:"tier,omitempty"` - // UsdPerRow Deprecated. Update `price_category` instead. + // USDPerRow Deprecated. Update `price_category` instead. // Deprecated: USDPerRow *string `json:"usd_per_row,omitempty"` } @@ -1771,7 +1775,7 @@ type PluginVersionDetails struct { // SupportedTargets The targets supported by this plugin version, formatted as _ SupportedTargets []string `json:"supported_targets"` - // UiBaseUrl Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. + // UIBaseURL Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. UIBaseURL *string `json:"ui_base_url,omitempty"` } @@ -1803,13 +1807,6 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } -// PriceCategorySpend Spend by price category for a defined period. -type PriceCategorySpend struct { - // Category Supported price categories for billing - Category PluginPriceCategory `json:"category"` - Total string `json:"total"` -} - // RegistryAuthToken JWT token for the image registry type RegistryAuthToken struct { AccessToken string `json:"access_token"` @@ -1830,28 +1827,13 @@ type RemoveTeamMembershipRequest struct { // Note that empty or all-zero values are not included in the response. type SpendSummary struct { // Metadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. - Metadata SpendSummaryMetadata `json:"metadata"` - Values interface{} `json:"values"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// SpendSummaryValue A spend summary value. -type SpendSummaryValue struct { - ByCategory []PriceCategorySpend `json:"by_category"` - - // Date The timestamp for the spend summary. - Date time.Time `json:"date"` - - // Total Total spend for the period in USD. - Total string `json:"total"` + Metadata SpendSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` } // SpendSummaryMetadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. type SpendSummaryMetadata struct { - // End The exclusive end of the query time range. - End interface{} `json:"end"` - - // Start The inclusive start of the query time range. + End interface{} `json:"end"` Start interface{} `json:"start"` } @@ -1863,25 +1845,25 @@ type SpendingLimit struct { // UpdatedAt The date and time the team limit was last updated. UpdatedAt *time.Time `json:"updated_at,omitempty"` - // Usd The maximum USD amount the team is allowed to use within a calendar month. + // USD The maximum USD amount the team is allowed to use within a calendar month. USD *int `json:"usd,omitempty"` } // SpendingLimitCreate A configurable monthly limit for team usage. type SpendingLimitCreate struct { - // Usd The maximum USD amount the team is allowed to use within a calendar month. + // USD The maximum USD amount the team is allowed to use within a calendar month. USD int `json:"usd"` } // SpendingLimitUpdate A configurable spending limit for the team. type SpendingLimitUpdate struct { - // Usd The maximum USD amount the team is allowed to use within a calendar month. + // USD The maximum USD amount the team is allowed to use within a calendar month. USD int `json:"usd"` } // Sync Managed Sync definition type Sync struct { - // Cpu CPU quota for the sync + // CPU CPU quota for the sync CPU string `json:"cpu"` // CreatedAt Time when the sync was created @@ -1912,7 +1894,7 @@ type Sync struct { // SyncCreate Managed Sync definition type SyncCreate struct { - // Cpu CPU quota for the sync + // CPU CPU quota for the sync CPU *string `json:"cpu,omitempty"` Destinations []string `json:"destinations"` @@ -1934,7 +1916,7 @@ type SyncCreate struct { // SyncDestination defines model for SyncDestination. type SyncDestination struct { - // ConnectorId ID of the Connector + // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` // CreatedAt Time when the source was created @@ -1968,7 +1950,7 @@ type SyncDestination struct { // SyncDestinationCreate Sync Destination Definition type SyncDestinationCreate struct { - // ConnectorId ID of the Connector + // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` // Env Environment variables for the plugin. All environment variables will be stored as secrets. @@ -2014,7 +1996,7 @@ type SyncDestinationMigrateMode string // SyncDestinationUpdate Sync Destination Update Definition type SyncDestinationUpdate struct { - // ConnectorId ID of the Connector + // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` // Env Environment variables for the plugin. All environment variables will be stored as secrets. @@ -2084,7 +2066,7 @@ type SyncRun struct { // Errors Number of errors encountered during the sync Errors int64 `json:"errors"` - // Id unique ID of the run + // ID unique ID of the run ID openapi_types.UUID `json:"id"` // Status The status of the sync run @@ -2108,7 +2090,7 @@ type SyncRunDetails struct { // CompletedAt Time the sync run was completed CompletedAt *time.Time `json:"completed_at,omitempty"` - // CpuSeconds Total CPU seconds utilized during this sync run + // CPUSeconds Total CPU seconds utilized during this sync run CPUSeconds *float64 `json:"cpu_seconds,omitempty"` // CreatedAt Time the sync run was created @@ -2117,7 +2099,7 @@ type SyncRunDetails struct { // Errors Number of errors encountered during the sync Errors int64 `json:"errors"` - // Id unique ID of the run + // ID unique ID of the run ID openapi_types.UUID `json:"id"` // MemoryByteSeconds Total memory byte seconds utilized during this sync run @@ -2153,7 +2135,7 @@ type SyncRunStatusReason string // SyncSource defines model for SyncSource. type SyncSource struct { - // ConnectorId ID of the Connector + // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` // CreatedAt Time when the source was created @@ -2187,7 +2169,7 @@ type SyncSource struct { // SyncSourceCreate Sync Source Definition type SyncSourceCreate struct { - // ConnectorId ID of the Connector + // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` // Env Environment variables for the plugin. All environment variables will be stored as secrets. @@ -2230,7 +2212,7 @@ type SyncSourceCreateFromTestConnection struct { // SyncSourceUpdate Sync Source Update Definition type SyncSourceUpdate struct { - // ConnectorId ID of the Connector + // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` // Env Environment variables for the plugin. All environment variables will be stored as secrets. @@ -2279,7 +2261,7 @@ type SyncTestConnection struct { // FailureReason Reason for failure FailureReason *string `json:"failure_reason,omitempty"` - // Id unique ID of the test connection + // ID unique ID of the test connection ID ID `json:"id"` // PluginKind The kind of plugin, ie. source or destination. @@ -2303,7 +2285,7 @@ type SyncTestConnectionStatus string // SyncUpdate Managed Sync definition type SyncUpdate struct { - // Cpu CPU quota for the sync + // CPU CPU quota for the sync CPU *string `json:"cpu,omitempty"` Destinations *[]string `json:"destinations,omitempty"` @@ -2325,9 +2307,7 @@ type SyncUpdate struct { // SyncRunLogs defines model for Sync_Run_Logs. type SyncRunLogs struct { - // Location The location to download the sync run logs from - Location interface{} `json:"location"` - AdditionalProperties map[string]interface{} `json:"-"` + Location interface{} `json:"location"` } // Team CloudQuery Team @@ -2355,10 +2335,10 @@ type TeamImage struct { // Name Name of image Name string `json:"name"` - // UploadUrl URL to upload image + // UploadURL URL to upload image UploadURL *string `json:"upload_url,omitempty"` - // Url URL to download image + // URL URL to download image URL string `json:"url"` } @@ -2381,11 +2361,11 @@ type TeamPlan string type TeamSubscriptionOrder struct { CompletedAt *time.Time `json:"completed_at,omitempty"` - // CompletionUrl Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected. + // CompletionURL Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected. CompletionURL *string `json:"completion_url,omitempty"` CreatedAt time.Time `json:"created_at"` - // Id ID of the team subscription order + // TeamSubscriptionOrderID ID of the team subscription order TeamSubscriptionOrderID TeamSubscriptionOrderID `json:"id"` // Plan The plan the team is on (trial is deprecated) @@ -2417,9 +2397,7 @@ type TeamSubscriptionOrderStatus string // UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. type UpdateCurrentUserRequest struct { - // Name The user's name - Name *interface{} `json:"name,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + Name *interface{} `json:"name,omitempty"` } // UpdateSyncRunRequest defines model for UpdateSyncRun_request. @@ -2445,16 +2423,14 @@ type UpdateSyncTestConnectionRequest struct { // UpdateTeamRequest defines model for UpdateTeam_request. type UpdateTeamRequest struct { - // DisplayName The team's display name - DisplayName *interface{} `json:"display_name,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + DisplayName *interface{} `json:"display_name,omitempty"` } // UploadPluginUIAssets201Response defines model for UploadPluginUIAssets_201_response. type UploadPluginUIAssets201Response struct { Assets []PluginUIAsset `json:"assets"` - // UiId ID representing this upload + // UIID ID representing this upload UIID string `json:"ui_id"` } @@ -2478,14 +2454,14 @@ type UsageCurrent struct { // Deprecated: RemainingRows *int64 `json:"remaining_rows,omitempty"` - // RemainingUsd The remaining USD amount in the plugin's quota for the calendar month. + // RemainingUSD The remaining USD amount in the plugin's quota for the calendar month. // Deprecated: RemainingUSD *string `json:"remaining_usd,omitempty"` // Rows The number of rows used by the plugin in the calendar month. Rows int64 `json:"rows"` - // Usd The USD amount used by the plugin in the calendar month, rounded to two decimal places. + // USD The USD amount used by the plugin in the calendar month, rounded to two decimal places. // Deprecated: USD string `json:"usd"` } @@ -2521,63 +2497,31 @@ type UsageIncreaseTablesInner struct { // UsageSummary A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range. // Note that empty or all-zero values are not included in the response. type UsageSummary struct { - // Groups The groups of the usage summary. Every group will have a corresponding value at the same index in the values array. Groups interface{} `json:"groups"` // Metadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. - Metadata UsageSummaryMetadata `json:"metadata"` - Values interface{} `json:"values"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// UsageSummaryGroup A usage summary group. -type UsageSummaryGroup struct { - // Name The name of the group. - Name string `json:"name"` - - // Value The value of the group at this index. - Value string `json:"value"` -} - -// UsageSummaryValue A usage summary value. -type UsageSummaryValue struct { - // CloudEgressBytes Egress bytes consumed in this period, one per group. - CloudEgressBytes *[]int64 `json:"cloud_egress_bytes,omitempty"` - - // CloudVcpuSeconds vCPU/seconds consumed in this period, one per group. - CloudVcpuSeconds *[]int64 `json:"cloud_vcpu_seconds,omitempty"` - - // CloudVramByteSeconds vRAM/byte-seconds consumed in this period, one per group. - CloudVramByteSeconds *[]int64 `json:"cloud_vram_byte_seconds,omitempty"` - - // PaidRows The paid rows that were synced in this period, one per group. - PaidRows *[]int64 `json:"paid_rows,omitempty"` - - // Timestamp The timestamp marking the start of a period. - Timestamp time.Time `json:"timestamp"` + Metadata UsageSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` } // UsageSummaryMetadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. type UsageSummaryMetadata struct { // AggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. - AggregationPeriod interface{} `json:"aggregation_period"` - - // End The exclusive end of the query time range. - End interface{} `json:"end"` - - // Metrics List of metrics included in the response. - Metrics interface{} `json:"metrics"` - - // Start The inclusive start of the query time range. - Start interface{} `json:"start"` + AggregationPeriod UsageSummaryMetadataAggregationPeriod `json:"aggregation_period"` + End interface{} `json:"end"` + Metrics interface{} `json:"metrics"` + Start interface{} `json:"start"` } +// UsageSummaryMetadataAggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. +type UsageSummaryMetadataAggregationPeriod string + // User CloudQuery User type User struct { CreatedAt *time.Time `json:"created_at,omitempty"` Email string `json:"email"` - // Id ID of the User + // ID ID of the User ID openapi_types.UUID `json:"id"` // Name The unique name for the user. @@ -3234,7 +3178,7 @@ func (a *ConnectorAuthFinishRequestOAuth) UnmarshalJSON(b []byte) error { } if raw, found := object["base_url"]; found { - err = json.Unmarshal(raw, &a.BaseUrl) + err = json.Unmarshal(raw, &a.BaseURL) if err != nil { return fmt.Errorf("error reading 'base_url': %w", err) } @@ -3289,7 +3233,7 @@ func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'auth_code': %w", err) } - object["base_url"], err = json.Marshal(a.BaseUrl) + object["base_url"], err = json.Marshal(a.BaseURL) if err != nil { return nil, fmt.Errorf("error marshaling 'base_url': %w", err) } @@ -3350,7 +3294,7 @@ func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { } if raw, found := object["base_url"]; found { - err = json.Unmarshal(raw, &a.BaseUrl) + err = json.Unmarshal(raw, &a.BaseURL) if err != nil { return fmt.Errorf("error reading 'base_url': %w", err) } @@ -3416,7 +3360,7 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) - object["base_url"], err = json.Marshal(a.BaseUrl) + object["base_url"], err = json.Marshal(a.BaseURL) if err != nil { return nil, fmt.Errorf("error marshaling 'base_url': %w", err) } @@ -3458,455 +3402,3 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { } return json.Marshal(object) } - -// Getter for additional properties for CreateTeamRequest. Returns the specified -// element and whether it was found -func (a CreateTeamRequest) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for CreateTeamRequest -func (a *CreateTeamRequest) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties -func (a *CreateTeamRequest) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["display_name"]; found { - err = json.Unmarshal(raw, &a.DisplayName) - if err != nil { - return fmt.Errorf("error reading 'display_name': %w", err) - } - delete(object, "display_name") - } - - if raw, found := object["name"]; found { - err = json.Unmarshal(raw, &a.Name) - if err != nil { - return fmt.Errorf("error reading 'name': %w", err) - } - delete(object, "name") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties -func (a CreateTeamRequest) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["display_name"], err = json.Marshal(a.DisplayName) - if err != nil { - return nil, fmt.Errorf("error marshaling 'display_name': %w", err) - } - - object["name"], err = json.Marshal(a.Name) - if err != nil { - return nil, fmt.Errorf("error marshaling 'name': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for SpendSummary. Returns the specified -// element and whether it was found -func (a SpendSummary) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for SpendSummary -func (a *SpendSummary) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for SpendSummary to handle AdditionalProperties -func (a *SpendSummary) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["metadata"]; found { - err = json.Unmarshal(raw, &a.Metadata) - if err != nil { - return fmt.Errorf("error reading 'metadata': %w", err) - } - delete(object, "metadata") - } - - if raw, found := object["values"]; found { - err = json.Unmarshal(raw, &a.Values) - if err != nil { - return fmt.Errorf("error reading 'values': %w", err) - } - delete(object, "values") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for SpendSummary to handle AdditionalProperties -func (a SpendSummary) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["metadata"], err = json.Marshal(a.Metadata) - if err != nil { - return nil, fmt.Errorf("error marshaling 'metadata': %w", err) - } - - object["values"], err = json.Marshal(a.Values) - if err != nil { - return nil, fmt.Errorf("error marshaling 'values': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for SyncRunLogs. Returns the specified -// element and whether it was found -func (a SyncRunLogs) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for SyncRunLogs -func (a *SyncRunLogs) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for SyncRunLogs to handle AdditionalProperties -func (a *SyncRunLogs) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["location"]; found { - err = json.Unmarshal(raw, &a.Location) - if err != nil { - return fmt.Errorf("error reading 'location': %w", err) - } - delete(object, "location") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for SyncRunLogs to handle AdditionalProperties -func (a SyncRunLogs) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["location"], err = json.Marshal(a.Location) - if err != nil { - return nil, fmt.Errorf("error marshaling 'location': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for UpdateCurrentUserRequest. Returns the specified -// element and whether it was found -func (a UpdateCurrentUserRequest) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for UpdateCurrentUserRequest -func (a *UpdateCurrentUserRequest) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties -func (a *UpdateCurrentUserRequest) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["name"]; found { - err = json.Unmarshal(raw, &a.Name) - if err != nil { - return fmt.Errorf("error reading 'name': %w", err) - } - delete(object, "name") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties -func (a UpdateCurrentUserRequest) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - if a.Name != nil { - object["name"], err = json.Marshal(a.Name) - if err != nil { - return nil, fmt.Errorf("error marshaling 'name': %w", err) - } - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for UpdateTeamRequest. Returns the specified -// element and whether it was found -func (a UpdateTeamRequest) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for UpdateTeamRequest -func (a *UpdateTeamRequest) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties -func (a *UpdateTeamRequest) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["display_name"]; found { - err = json.Unmarshal(raw, &a.DisplayName) - if err != nil { - return fmt.Errorf("error reading 'display_name': %w", err) - } - delete(object, "display_name") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties -func (a UpdateTeamRequest) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - if a.DisplayName != nil { - object["display_name"], err = json.Marshal(a.DisplayName) - if err != nil { - return nil, fmt.Errorf("error marshaling 'display_name': %w", err) - } - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for UsageSummary. Returns the specified -// element and whether it was found -func (a UsageSummary) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for UsageSummary -func (a *UsageSummary) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for UsageSummary to handle AdditionalProperties -func (a *UsageSummary) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["groups"]; found { - err = json.Unmarshal(raw, &a.Groups) - if err != nil { - return fmt.Errorf("error reading 'groups': %w", err) - } - delete(object, "groups") - } - - if raw, found := object["metadata"]; found { - err = json.Unmarshal(raw, &a.Metadata) - if err != nil { - return fmt.Errorf("error reading 'metadata': %w", err) - } - delete(object, "metadata") - } - - if raw, found := object["values"]; found { - err = json.Unmarshal(raw, &a.Values) - if err != nil { - return fmt.Errorf("error reading 'values': %w", err) - } - delete(object, "values") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for UsageSummary to handle AdditionalProperties -func (a UsageSummary) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["groups"], err = json.Marshal(a.Groups) - if err != nil { - return nil, fmt.Errorf("error marshaling 'groups': %w", err) - } - - object["metadata"], err = json.Marshal(a.Metadata) - if err != nil { - return nil, fmt.Errorf("error marshaling 'metadata': %w", err) - } - - object["values"], err = json.Marshal(a.Values) - if err != nil { - return nil, fmt.Errorf("error marshaling 'values': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} From f001dc4f6b6471f57d7184e64b452da3dd92c1eb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:31:19 -0400 Subject: [PATCH 181/343] chore(main): Release v1.12.0 (#171) --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74a7649..63233a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [1.12.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.3...v1.12.0) (2024-07-03) + + +### Features + +* Upgrade oapi-codegen version ([#189](https://github.com/cloudquery/cloudquery-api-go/issues/189)) ([b478180](https://github.com/cloudquery/cloudquery-api-go/commit/b478180b847da753d6283533479381ae008bd974)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#170](https://github.com/cloudquery/cloudquery-api-go/issues/170)) ([cfc4eed](https://github.com/cloudquery/cloudquery-api-go/commit/cfc4eed76e9122d702c6e249cb9ab5acaca17ee3)) +* Generate CloudQuery Go API Client from `spec.json` ([#172](https://github.com/cloudquery/cloudquery-api-go/issues/172)) ([0557f6e](https://github.com/cloudquery/cloudquery-api-go/commit/0557f6e7c60b1cdf45d65005046af2a282f957da)) +* Generate CloudQuery Go API Client from `spec.json` ([#173](https://github.com/cloudquery/cloudquery-api-go/issues/173)) ([ded4693](https://github.com/cloudquery/cloudquery-api-go/commit/ded46932fad761ed5e8ecee8a05170e111c302d4)) +* Generate CloudQuery Go API Client from `spec.json` ([#174](https://github.com/cloudquery/cloudquery-api-go/issues/174)) ([f42ea7f](https://github.com/cloudquery/cloudquery-api-go/commit/f42ea7f7c639fe22dff6b90cc7c4b4fb92550dc4)) +* Generate CloudQuery Go API Client from `spec.json` ([#175](https://github.com/cloudquery/cloudquery-api-go/issues/175)) ([e7930cc](https://github.com/cloudquery/cloudquery-api-go/commit/e7930cc35a92f93527e916c2b0bd4d5cf04ce11f)) +* Generate CloudQuery Go API Client from `spec.json` ([#176](https://github.com/cloudquery/cloudquery-api-go/issues/176)) ([58bf785](https://github.com/cloudquery/cloudquery-api-go/commit/58bf785bbb8ca97a1f604cabd7ffd7b5d4b3afec)) +* Generate CloudQuery Go API Client from `spec.json` ([#177](https://github.com/cloudquery/cloudquery-api-go/issues/177)) ([fd9a4ef](https://github.com/cloudquery/cloudquery-api-go/commit/fd9a4efb75db2ab775257ce98e84547c70889556)) +* Generate CloudQuery Go API Client from `spec.json` ([#178](https://github.com/cloudquery/cloudquery-api-go/issues/178)) ([99ac21b](https://github.com/cloudquery/cloudquery-api-go/commit/99ac21b8ad9747624e74864b454b50a75fe9fa23)) +* Generate CloudQuery Go API Client from `spec.json` ([#179](https://github.com/cloudquery/cloudquery-api-go/issues/179)) ([0386cad](https://github.com/cloudquery/cloudquery-api-go/commit/0386cad9556e21bb60bf5435fef27d1e00507fa4)) +* Generate CloudQuery Go API Client from `spec.json` ([#180](https://github.com/cloudquery/cloudquery-api-go/issues/180)) ([a6ad886](https://github.com/cloudquery/cloudquery-api-go/commit/a6ad88671b21578349f4c8c359b02fa187cb0043)) +* Generate CloudQuery Go API Client from `spec.json` ([#181](https://github.com/cloudquery/cloudquery-api-go/issues/181)) ([03c7442](https://github.com/cloudquery/cloudquery-api-go/commit/03c744269ff40f8babfd670508a7f773417d8637)) +* Generate CloudQuery Go API Client from `spec.json` ([#182](https://github.com/cloudquery/cloudquery-api-go/issues/182)) ([4c194a7](https://github.com/cloudquery/cloudquery-api-go/commit/4c194a72ebda5dd0f5412ab1e4d0af4d7c0ccf83)) +* Generate CloudQuery Go API Client from `spec.json` ([#183](https://github.com/cloudquery/cloudquery-api-go/issues/183)) ([6ac8600](https://github.com/cloudquery/cloudquery-api-go/commit/6ac86009d72e9884ae48284ae428aba43d0eeb53)) +* Generate CloudQuery Go API Client from `spec.json` ([#184](https://github.com/cloudquery/cloudquery-api-go/issues/184)) ([bef70d4](https://github.com/cloudquery/cloudquery-api-go/commit/bef70d4b346f1361de5bac3110eee4c567118594)) +* Generate CloudQuery Go API Client from `spec.json` ([#185](https://github.com/cloudquery/cloudquery-api-go/issues/185)) ([e2b4aba](https://github.com/cloudquery/cloudquery-api-go/commit/e2b4aba01a86951a9ee955beb32d1ce2bd11fd6e)) +* Generate CloudQuery Go API Client from `spec.json` ([#186](https://github.com/cloudquery/cloudquery-api-go/issues/186)) ([170ae88](https://github.com/cloudquery/cloudquery-api-go/commit/170ae888837baaec7559710390801f0b1bf22822)) +* Generate CloudQuery Go API Client from `spec.json` ([#187](https://github.com/cloudquery/cloudquery-api-go/issues/187)) ([63205b9](https://github.com/cloudquery/cloudquery-api-go/commit/63205b94db002ba554b7924d2469cde5d29a0096)) +* Generate CloudQuery Go API Client from `spec.json` ([#188](https://github.com/cloudquery/cloudquery-api-go/issues/188)) ([3ebded6](https://github.com/cloudquery/cloudquery-api-go/commit/3ebded6d6ca274eb8a7e0538ce94fd3851f77ecf)) + ## [1.11.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.2...v1.11.3) (2024-05-30) From ecacca723f46efdd4bbbeaf9d1f1aed8f95fecb7 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jul 2024 06:10:59 -0400 Subject: [PATCH 182/343] fix: Generate CloudQuery Go API Client from `spec.json` (#190) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 154 ++++++++++++++ models.gen.go | 552 ++++++++++++++++++++++++++++++++++++++++++++++++-- spec.json | 31 +++ 3 files changed, 715 insertions(+), 22 deletions(-) diff --git a/client.gen.go b/client.gen.go index 69766d6..c723f51 100644 --- a/client.gen.go +++ b/client.gen.go @@ -240,6 +240,9 @@ type ClientInterface interface { // GetPluginVersionTable request GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) + // RemovePluginUIAssets request + RemovePluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + // UploadPluginUIAssetsWithBody request with any body UploadPluginUIAssetsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1253,6 +1256,18 @@ func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } +func (c *Client) RemovePluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemovePluginUIAssetsRequest(c.Server, teamName, pluginKind, pluginName, versionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) UploadPluginUIAssetsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewUploadPluginUIAssetsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { @@ -5315,6 +5330,61 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return req, nil } +// NewRemovePluginUIAssetsRequest generates requests for RemovePluginUIAssets +func NewRemovePluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewUploadPluginUIAssetsRequest calls the generic UploadPluginUIAssets builder with application/json body func NewUploadPluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -10786,6 +10856,9 @@ type ClientWithResponsesInterface interface { // GetPluginVersionTableWithResponse request GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + // RemovePluginUIAssetsWithResponse request + RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) + // UploadPluginUIAssetsWithBodyWithResponse request with any body UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) @@ -12156,6 +12229,31 @@ func (r GetPluginVersionTableResponse) StatusCode() int { return 0 } +type RemovePluginUIAssetsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RemovePluginUIAssetsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RemovePluginUIAssetsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type UploadPluginUIAssetsResponse struct { Body []byte HTTPResponse *http.Response @@ -15143,6 +15241,15 @@ func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Cont return ParseGetPluginVersionTableResponse(rsp) } +// RemovePluginUIAssetsWithResponse request returning *RemovePluginUIAssetsResponse +func (c *ClientWithResponses) RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) { + rsp, err := c.RemovePluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemovePluginUIAssetsResponse(rsp) +} + // UploadPluginUIAssetsWithBodyWithResponse request with arbitrary body returning *UploadPluginUIAssetsResponse func (c *ClientWithResponses) UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { rsp, err := c.UploadPluginUIAssetsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) @@ -18348,6 +18455,53 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } +// ParseRemovePluginUIAssetsResponse parses an HTTP response from a RemovePluginUIAssetsWithResponse call +func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAssetsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RemovePluginUIAssetsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseUploadPluginUIAssetsResponse parses an HTTP response from a UploadPluginUIAssetsWithResponse call func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAssetsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 8120949..ce0563d 100644 --- a/models.gen.go +++ b/models.gen.go @@ -204,12 +204,6 @@ const ( TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" ) -// Defines values for UsageSummaryMetadataAggregationPeriod. -const ( - UsageSummaryMetadataAggregationPeriodDay UsageSummaryMetadataAggregationPeriod = "day" - UsageSummaryMetadataAggregationPeriodMonth UsageSummaryMetadataAggregationPeriod = "month" -) - // Defines values for AddonSortBy. const ( AddonSortByCreatedAt AddonSortBy = "created_at" @@ -812,10 +806,12 @@ type CreateTeamImagesRequest struct { // CreateTeamRequest defines model for CreateTeam_request. type CreateTeamRequest struct { + // DisplayName The team's display name DisplayName interface{} `json:"display_name"` // Name The unique name for the team. - Name TeamName `json:"name"` + Name TeamName `json:"name"` + AdditionalProperties map[string]interface{} `json:"-"` } // DeletePluginVersionDocsRequest defines model for DeletePluginVersionDocs_request. @@ -1807,6 +1803,13 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } +// PriceCategorySpend Spend by price category for a defined period. +type PriceCategorySpend struct { + // Category Supported price categories for billing + Category PluginPriceCategory `json:"category"` + Total string `json:"total"` +} + // RegistryAuthToken JWT token for the image registry type RegistryAuthToken struct { AccessToken string `json:"access_token"` @@ -1827,13 +1830,28 @@ type RemoveTeamMembershipRequest struct { // Note that empty or all-zero values are not included in the response. type SpendSummary struct { // Metadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. - Metadata SpendSummaryMetadata `json:"metadata"` - Values interface{} `json:"values"` + Metadata SpendSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// SpendSummaryValue A spend summary value. +type SpendSummaryValue struct { + ByCategory []PriceCategorySpend `json:"by_category"` + + // Date The timestamp for the spend summary. + Date time.Time `json:"date"` + + // Total Total spend for the period in USD. + Total string `json:"total"` } // SpendSummaryMetadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. type SpendSummaryMetadata struct { - End interface{} `json:"end"` + // End The exclusive end of the query time range. + End interface{} `json:"end"` + + // Start The inclusive start of the query time range. Start interface{} `json:"start"` } @@ -2307,7 +2325,9 @@ type SyncUpdate struct { // SyncRunLogs defines model for Sync_Run_Logs. type SyncRunLogs struct { - Location interface{} `json:"location"` + // Location The location to download the sync run logs from + Location interface{} `json:"location"` + AdditionalProperties map[string]interface{} `json:"-"` } // Team CloudQuery Team @@ -2397,7 +2417,9 @@ type TeamSubscriptionOrderStatus string // UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. type UpdateCurrentUserRequest struct { - Name *interface{} `json:"name,omitempty"` + // Name The user's name + Name *interface{} `json:"name,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UpdateSyncRunRequest defines model for UpdateSyncRun_request. @@ -2423,7 +2445,9 @@ type UpdateSyncTestConnectionRequest struct { // UpdateTeamRequest defines model for UpdateTeam_request. type UpdateTeamRequest struct { - DisplayName *interface{} `json:"display_name,omitempty"` + // DisplayName The team's display name + DisplayName *interface{} `json:"display_name,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UploadPluginUIAssets201Response defines model for UploadPluginUIAssets_201_response. @@ -2497,24 +2521,56 @@ type UsageIncreaseTablesInner struct { // UsageSummary A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range. // Note that empty or all-zero values are not included in the response. type UsageSummary struct { + // Groups The groups of the usage summary. Every group will have a corresponding value at the same index in the values array. Groups interface{} `json:"groups"` // Metadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. - Metadata UsageSummaryMetadata `json:"metadata"` - Values interface{} `json:"values"` + Metadata UsageSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// UsageSummaryGroup A usage summary group. +type UsageSummaryGroup struct { + // Name The name of the group. + Name string `json:"name"` + + // Value The value of the group at this index. + Value string `json:"value"` +} + +// UsageSummaryValue A usage summary value. +type UsageSummaryValue struct { + // CloudEgressBytes Egress bytes consumed in this period, one per group. + CloudEgressBytes *[]int64 `json:"cloud_egress_bytes,omitempty"` + + // CloudVcpuSeconds vCPU/seconds consumed in this period, one per group. + CloudVcpuSeconds *[]int64 `json:"cloud_vcpu_seconds,omitempty"` + + // CloudVramByteSeconds vRAM/byte-seconds consumed in this period, one per group. + CloudVramByteSeconds *[]int64 `json:"cloud_vram_byte_seconds,omitempty"` + + // PaidRows The paid rows that were synced in this period, one per group. + PaidRows *[]int64 `json:"paid_rows,omitempty"` + + // Timestamp The timestamp marking the start of a period. + Timestamp time.Time `json:"timestamp"` } // UsageSummaryMetadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. type UsageSummaryMetadata struct { // AggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. - AggregationPeriod UsageSummaryMetadataAggregationPeriod `json:"aggregation_period"` - End interface{} `json:"end"` - Metrics interface{} `json:"metrics"` - Start interface{} `json:"start"` -} + AggregationPeriod interface{} `json:"aggregation_period"` -// UsageSummaryMetadataAggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. -type UsageSummaryMetadataAggregationPeriod string + // End The exclusive end of the query time range. + End interface{} `json:"end"` + + // Metrics List of metrics included in the response. + Metrics interface{} `json:"metrics"` + + // Start The inclusive start of the query time range. + Start interface{} `json:"start"` +} // User CloudQuery User type User struct { @@ -3402,3 +3458,455 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { } return json.Marshal(object) } + +// Getter for additional properties for CreateTeamRequest. Returns the specified +// element and whether it was found +func (a CreateTeamRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for CreateTeamRequest +func (a *CreateTeamRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties +func (a *CreateTeamRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["display_name"]; found { + err = json.Unmarshal(raw, &a.DisplayName) + if err != nil { + return fmt.Errorf("error reading 'display_name': %w", err) + } + delete(object, "display_name") + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties +func (a CreateTeamRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["display_name"], err = json.Marshal(a.DisplayName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'display_name': %w", err) + } + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SpendSummary. Returns the specified +// element and whether it was found +func (a SpendSummary) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SpendSummary +func (a *SpendSummary) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SpendSummary to handle AdditionalProperties +func (a *SpendSummary) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["metadata"]; found { + err = json.Unmarshal(raw, &a.Metadata) + if err != nil { + return fmt.Errorf("error reading 'metadata': %w", err) + } + delete(object, "metadata") + } + + if raw, found := object["values"]; found { + err = json.Unmarshal(raw, &a.Values) + if err != nil { + return fmt.Errorf("error reading 'values': %w", err) + } + delete(object, "values") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SpendSummary to handle AdditionalProperties +func (a SpendSummary) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["metadata"], err = json.Marshal(a.Metadata) + if err != nil { + return nil, fmt.Errorf("error marshaling 'metadata': %w", err) + } + + object["values"], err = json.Marshal(a.Values) + if err != nil { + return nil, fmt.Errorf("error marshaling 'values': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SyncRunLogs. Returns the specified +// element and whether it was found +func (a SyncRunLogs) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SyncRunLogs +func (a *SyncRunLogs) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SyncRunLogs to handle AdditionalProperties +func (a *SyncRunLogs) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["location"]; found { + err = json.Unmarshal(raw, &a.Location) + if err != nil { + return fmt.Errorf("error reading 'location': %w", err) + } + delete(object, "location") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SyncRunLogs to handle AdditionalProperties +func (a SyncRunLogs) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["location"], err = json.Marshal(a.Location) + if err != nil { + return nil, fmt.Errorf("error marshaling 'location': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateCurrentUserRequest. Returns the specified +// element and whether it was found +func (a UpdateCurrentUserRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateCurrentUserRequest +func (a *UpdateCurrentUserRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties +func (a *UpdateCurrentUserRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties +func (a UpdateCurrentUserRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Name != nil { + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateTeamRequest. Returns the specified +// element and whether it was found +func (a UpdateTeamRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateTeamRequest +func (a *UpdateTeamRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties +func (a *UpdateTeamRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["display_name"]; found { + err = json.Unmarshal(raw, &a.DisplayName) + if err != nil { + return fmt.Errorf("error reading 'display_name': %w", err) + } + delete(object, "display_name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties +func (a UpdateTeamRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.DisplayName != nil { + object["display_name"], err = json.Marshal(a.DisplayName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'display_name': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UsageSummary. Returns the specified +// element and whether it was found +func (a UsageSummary) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UsageSummary +func (a *UsageSummary) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UsageSummary to handle AdditionalProperties +func (a *UsageSummary) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["groups"]; found { + err = json.Unmarshal(raw, &a.Groups) + if err != nil { + return fmt.Errorf("error reading 'groups': %w", err) + } + delete(object, "groups") + } + + if raw, found := object["metadata"]; found { + err = json.Unmarshal(raw, &a.Metadata) + if err != nil { + return fmt.Errorf("error reading 'metadata': %w", err) + } + delete(object, "metadata") + } + + if raw, found := object["values"]; found { + err = json.Unmarshal(raw, &a.Values) + if err != nil { + return fmt.Errorf("error reading 'values': %w", err) + } + delete(object, "values") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UsageSummary to handle AdditionalProperties +func (a UsageSummary) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["groups"], err = json.Marshal(a.Groups) + if err != nil { + return nil, fmt.Errorf("error marshaling 'groups': %w", err) + } + + object["metadata"], err = json.Marshal(a.Metadata) + if err != nil { + return nil, fmt.Errorf("error marshaling 'metadata': %w", err) + } + + object["values"], err = json.Marshal(a.Values) + if err != nil { + return nil, fmt.Errorf("error marshaling 'values': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} diff --git a/spec.json b/spec.json index 2c36d50..524a448 100644 --- a/spec.json +++ b/spec.json @@ -1214,6 +1214,37 @@ } }, "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/uiassets" : { + "delete" : { + "description" : "Remove UI assets for a given plugin version", + "operationId" : "RemovePluginUIAssets", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, "post" : { "description" : "Get URLs to upload UI assets for a given plugin version", "operationId" : "UploadPluginUIAssets", From e427c4a81f1c8d1fee239d594e3f1280dd9eda52 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:06:12 -0400 Subject: [PATCH 183/343] fix: Generate CloudQuery Go API Client from `spec.json` (#192) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 4 ++-- spec.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/models.gen.go b/models.gen.go index ce0563d..892a628 100644 --- a/models.gen.go +++ b/models.gen.go @@ -391,7 +391,7 @@ type AddonCreate struct { // DisplayName The addon's display name DisplayName string `json:"display_name"` Homepage *string `json:"homepage,omitempty"` - Logo string `json:"logo"` + Logo *string `json:"logo,omitempty"` // Name The unique name for the addon. Name AddonName `json:"name"` @@ -1321,7 +1321,7 @@ type PluginCreate struct { Kind PluginKind `json:"kind"` // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. - Logo string `json:"logo"` + Logo *string `json:"logo,omitempty"` // Name The unique name for the plugin. Name PluginName `json:"name"` diff --git a/spec.json b/spec.json index 524a448..93cc3e8 100644 --- a/spec.json +++ b/spec.json @@ -6561,7 +6561,7 @@ "type" : "integer" } }, - "required" : [ "category", "display_name", "kind", "logo", "name", "public", "short_description", "team_name" ] + "required" : [ "category", "display_name", "kind", "name", "public", "short_description", "team_name" ] }, "PluginReleaseStageUpdate" : { "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", @@ -6604,7 +6604,7 @@ "logo" : { "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f9e8", - "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", + "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", "type" : "string" }, "public" : { @@ -7302,7 +7302,7 @@ "type" : "boolean" } }, - "required" : [ "addon_format", "addon_type", "category", "display_name", "logo", "name", "public", "short_description", "team_name", "tier" ], + "required" : [ "addon_format", "addon_type", "category", "display_name", "name", "public", "short_description", "team_name", "tier" ], "title" : "CloudQuery Addon" }, "AddonUpdate" : { @@ -7348,7 +7348,7 @@ }, "logo" : { "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", - "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", + "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", "type" : "string" }, "public" : { From 5c45a4749b5e4b2b244836be81e63b9a5b6f465e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jul 2024 07:07:48 -0400 Subject: [PATCH 184/343] chore(main): Release v1.12.1 (#191) :robot: I have created a release *beep* *boop* --- ## [1.12.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.0...v1.12.1) (2024-07-04) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#190](https://github.com/cloudquery/cloudquery-api-go/issues/190)) ([ecacca7](https://github.com/cloudquery/cloudquery-api-go/commit/ecacca723f46efdd4bbbeaf9d1f1aed8f95fecb7)) * Generate CloudQuery Go API Client from `spec.json` ([#192](https://github.com/cloudquery/cloudquery-api-go/issues/192)) ([e427c4a](https://github.com/cloudquery/cloudquery-api-go/commit/e427c4a81f1c8d1fee239d594e3f1280dd9eda52)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63233a2..0b51615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.12.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.0...v1.12.1) (2024-07-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#190](https://github.com/cloudquery/cloudquery-api-go/issues/190)) ([ecacca7](https://github.com/cloudquery/cloudquery-api-go/commit/ecacca723f46efdd4bbbeaf9d1f1aed8f95fecb7)) +* Generate CloudQuery Go API Client from `spec.json` ([#192](https://github.com/cloudquery/cloudquery-api-go/issues/192)) ([e427c4a](https://github.com/cloudquery/cloudquery-api-go/commit/e427c4a81f1c8d1fee239d594e3f1280dd9eda52)) + ## [1.12.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.3...v1.12.0) (2024-07-03) From d07c9cf04b16f73d0068bd095b9cc650012f87c3 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Wed, 10 Jul 2024 20:10:21 +0100 Subject: [PATCH 185/343] chore: Switch to `googleapis/release-please-action` (#193) Part of https://github.com/cloudquery/cloudquery-issues/issues/1985 (internal issue). `google-github-actions/release-please-action` was archived and moved to `googleapis/release-please-action` --- .github/workflows/release-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index e19ba21..cb02b05 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: google-github-actions/release-please-action@v3 + - uses: googleapis/release-please-action@v3 id: release with: release-type: go From 28d4679c5f825d92857967e099f2b3b6038ea635 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 11 Jul 2024 07:44:27 -0400 Subject: [PATCH 186/343] fix: Generate CloudQuery Go API Client from `spec.json` (#194) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 1264 +++++++++++++++++++++++++++++++++++++++++++++---- models.gen.go | 28 ++ spec.json | 354 +++++++++++++- 3 files changed, 1520 insertions(+), 126 deletions(-) diff --git a/client.gen.go b/client.gen.go index c723f51..cc1e5bd 100644 --- a/client.gen.go +++ b/client.gen.go @@ -462,6 +462,17 @@ type ClientInterface interface { UpdateSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateTestConnectionForSyncDestinationWithBody request with any body + CreateTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTestConnectionForSyncDestination request + GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PromoteTestConnectionForSyncDestination request + PromoteTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncSources request ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -486,6 +497,17 @@ type ClientInterface interface { UpdateSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateTestConnectionForSyncSourceWithBody request with any body + CreateTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTestConnectionForSyncSource request + GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PromoteTestConnectionForSyncSource request + PromoteTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncs request ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2240,6 +2262,54 @@ func (c *Client) UpdateSyncDestination(ctx context.Context, teamName TeamName, s return c.Client.Do(req) } +func (c *Client) CreateTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTestConnectionForSyncDestinationRequestWithBody(c.Server, teamName, syncDestinationName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, syncTestConnectionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PromoteTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPromoteTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, syncTestConnectionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSyncSourcesRequest(c.Server, teamName, params) if err != nil { @@ -2348,6 +2418,54 @@ func (c *Client) UpdateSyncSource(ctx context.Context, teamName TeamName, syncSo return c.Client.Do(req) } +func (c *Client) CreateTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTestConnectionForSyncSourceRequestWithBody(c.Server, teamName, syncSourceName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, syncTestConnectionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PromoteTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPromoteTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, syncTestConnectionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSyncsRequest(c.Server, teamName, params) if err != nil { @@ -8506,6 +8624,156 @@ func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, s return req, nil } +// NewCreateTestConnectionForSyncDestinationRequest calls the generic CreateTestConnectionForSyncDestination builder with application/json body +func NewCreateTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTestConnectionForSyncDestinationRequestWithBody(server, teamName, syncDestinationName, "application/json", bodyReader) +} + +// NewCreateTestConnectionForSyncDestinationRequestWithBody generates requests for CreateTestConnectionForSyncDestination with any type of body +func NewCreateTestConnectionForSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/test-connections", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTestConnectionForSyncDestinationRequest generates requests for GetTestConnectionForSyncDestination +func NewGetTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/test-connections/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPromoteTestConnectionForSyncDestinationRequest generates requests for PromoteTestConnectionForSyncDestination +func NewPromoteTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/test-connections/%s/promote", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListSyncSourcesRequest generates requests for ListSyncSources func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyncSourcesParams) (*http.Request, error) { var err error @@ -8808,8 +9076,19 @@ func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSo return req, nil } -// NewListSyncsRequest generates requests for ListSyncs -func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { +// NewCreateTestConnectionForSyncSourceRequest calls the generic CreateTestConnectionForSyncSource builder with application/json body +func NewCreateTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTestConnectionForSyncSourceRequestWithBody(server, teamName, syncSourceName, "application/json", bodyReader) +} + +// NewCreateTestConnectionForSyncSourceRequestWithBody generates requests for CreateTestConnectionForSyncSource with any type of body +func NewCreateTestConnectionForSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8819,12 +9098,19 @@ func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsPara return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/test-connections", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8834,17 +9120,149 @@ func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsPara return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.PerPage != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { + return req, nil +} + +// NewGetTestConnectionForSyncSourceRequest generates requests for GetTestConnectionForSyncSource +func NewGetTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/test-connections/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPromoteTestConnectionForSyncSourceRequest generates requests for PromoteTestConnectionForSyncSource +func NewPromoteTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/test-connections/%s/promote", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListSyncsRequest generates requests for ListSyncs +func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { for _, v2 := range v { queryValues.Add(k, v2) } @@ -11078,6 +11496,17 @@ type ClientWithResponsesInterface interface { UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + // CreateTestConnectionForSyncDestinationWithBodyWithResponse request with any body + CreateTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) + + CreateTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) + + // GetTestConnectionForSyncDestinationWithResponse request + GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) + + // PromoteTestConnectionForSyncDestinationWithResponse request + PromoteTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncDestinationResponse, error) + // ListSyncSourcesWithResponse request ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) @@ -11102,6 +11531,17 @@ type ClientWithResponsesInterface interface { UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + // CreateTestConnectionForSyncSourceWithBodyWithResponse request with any body + CreateTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) + + CreateTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) + + // GetTestConnectionForSyncSourceWithResponse request + GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) + + // PromoteTestConnectionForSyncSourceWithResponse request + PromoteTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncSourceResponse, error) + // ListSyncsWithResponse request ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) @@ -13748,17 +14188,20 @@ func (r UpdateSyncDestinationResponse) StatusCode() int { return 0 } -type ListSyncSourcesResponse struct { +type CreateTestConnectionForSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListSyncSources200Response + JSON201 *SyncTestConnection + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSyncSourcesResponse) Status() string { +func (r CreateTestConnectionForSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13766,26 +14209,25 @@ func (r ListSyncSourcesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSyncSourcesResponse) StatusCode() int { +func (r CreateTestConnectionForSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncSourceResponse struct { +type GetTestConnectionForSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncSource + JSON200 *SyncTestConnection JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncSourceResponse) Status() string { +func (r GetTestConnectionForSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13793,17 +14235,17 @@ func (r CreateSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncSourceResponse) StatusCode() int { +func (r GetTestConnectionForSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type TestSyncSourceResponse struct { +type PromoteTestConnectionForSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncTestConnection + JSON200 *SyncDestination JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -13813,7 +14255,7 @@ type TestSyncSourceResponse struct { } // Status returns HTTPResponse.Status -func (r TestSyncSourceResponse) Status() string { +func (r PromoteTestConnectionForSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13821,24 +14263,24 @@ func (r TestSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r TestSyncSourceResponse) StatusCode() int { +func (r PromoteTestConnectionForSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSyncSourceResponse struct { +type ListSyncSourcesResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListSyncSources200Response JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteSyncSourceResponse) Status() string { +func (r ListSyncSourcesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13846,24 +14288,26 @@ func (r DeleteSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncSourceResponse) StatusCode() int { +func (r ListSyncSourcesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncSourceResponse struct { +type CreateSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource + JSON201 *SyncSource + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncSourceResponse) Status() string { +func (r CreateSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13871,26 +14315,27 @@ func (r GetSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncSourceResponse) StatusCode() int { +func (r CreateSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncSourceResponse struct { +type TestSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource + JSON201 *SyncTestConnection JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncSourceResponse) Status() string { +func (r TestSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13898,24 +14343,24 @@ func (r UpdateSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncSourceResponse) StatusCode() int { +func (r TestSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSyncsResponse struct { +type DeleteSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListSyncs200Response JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSyncsResponse) Status() string { +func (r DeleteSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13923,25 +14368,24 @@ func (r ListSyncsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSyncsResponse) StatusCode() int { +func (r DeleteSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncResponse struct { +type GetSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *Sync - JSON400 *BadRequest + JSON200 *SyncSource JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity + JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncResponse) Status() string { +func (r GetSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13949,24 +14393,26 @@ func (r CreateSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncResponse) StatusCode() int { +func (r GetSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncTestConnectionResponse struct { +type UpdateSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncTestConnection + JSON200 *SyncSource + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncTestConnectionResponse) Status() string { +func (r UpdateSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -13974,26 +14420,27 @@ func (r GetSyncTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncTestConnectionResponse) StatusCode() int { +func (r UpdateSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncTestConnectionResponse struct { +type CreateTestConnectionForSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncTestConnection + JSON201 *SyncTestConnection JSON400 *BadRequest - JSON403 *Forbidden + JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncTestConnectionResponse) Status() string { +func (r CreateTestConnectionForSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14001,26 +14448,25 @@ func (r UpdateSyncTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncTestConnectionResponse) StatusCode() int { +func (r CreateTestConnectionForSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTestConnectionConnectorCredentialsResponse struct { +type GetTestConnectionForSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorCredentials200Response + JSON200 *SyncTestConnection JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetTestConnectionConnectorCredentialsResponse) Status() string { +func (r GetTestConnectionForSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14028,26 +14474,27 @@ func (r GetTestConnectionConnectorCredentialsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionConnectorCredentialsResponse) StatusCode() int { +func (r GetTestConnectionForSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTestConnectionConnectorIdentityResponse struct { +type PromoteTestConnectionForSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorIdentity200Response + JSON200 *SyncSource JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetTestConnectionConnectorIdentityResponse) Status() string { +func (r PromoteTestConnectionForSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14055,26 +14502,24 @@ func (r GetTestConnectionConnectorIdentityResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionConnectorIdentityResponse) StatusCode() int { +func (r PromoteTestConnectionForSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncDestinationFromTestConnectionResponse struct { +type ListSyncsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncDestination - JSON400 *BadRequest + JSON200 *ListSyncs200Response JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncDestinationFromTestConnectionResponse) Status() string { +func (r ListSyncsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14082,26 +14527,25 @@ func (r CreateSyncDestinationFromTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncDestinationFromTestConnectionResponse) StatusCode() int { +func (r ListSyncsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncSourceFromTestConnectionResponse struct { +type CreateSyncResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncSource + JSON201 *Sync JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncSourceFromTestConnectionResponse) Status() string { +func (r CreateSyncResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14109,21 +14553,181 @@ func (r CreateSyncSourceFromTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncSourceFromTestConnectionResponse) StatusCode() int { +func (r CreateSyncResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncDestinationFromTestConnectionResponse struct { +type GetSyncTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncDestination - JSON400 *BadRequest + JSON200 *SyncTestConnection JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncTestConnection + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTestConnectionConnectorCredentialsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetSyncRunConnectorCredentials200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTestConnectionConnectorCredentialsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTestConnectionConnectorCredentialsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTestConnectionConnectorIdentityResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetSyncRunConnectorIdentity200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTestConnectionConnectorIdentityResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTestConnectionConnectorIdentityResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSyncDestinationFromTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncDestination + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncDestinationFromTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncDestinationFromTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSyncSourceFromTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncSource + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncSourceFromTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncSourceFromTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncDestinationFromTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncDestination + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -15955,6 +16559,41 @@ func (c *ClientWithResponses) UpdateSyncDestinationWithResponse(ctx context.Cont return ParseUpdateSyncDestinationResponse(rsp) } +// CreateTestConnectionForSyncDestinationWithBodyWithResponse request with arbitrary body returning *CreateTestConnectionForSyncDestinationResponse +func (c *ClientWithResponses) CreateTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) { + rsp, err := c.CreateTestConnectionForSyncDestinationWithBody(ctx, teamName, syncDestinationName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTestConnectionForSyncDestinationResponse(rsp) +} + +func (c *ClientWithResponses) CreateTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) { + rsp, err := c.CreateTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTestConnectionForSyncDestinationResponse(rsp) +} + +// GetTestConnectionForSyncDestinationWithResponse request returning *GetTestConnectionForSyncDestinationResponse +func (c *ClientWithResponses) GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) { + rsp, err := c.GetTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, syncTestConnectionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTestConnectionForSyncDestinationResponse(rsp) +} + +// PromoteTestConnectionForSyncDestinationWithResponse request returning *PromoteTestConnectionForSyncDestinationResponse +func (c *ClientWithResponses) PromoteTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncDestinationResponse, error) { + rsp, err := c.PromoteTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, syncTestConnectionId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePromoteTestConnectionForSyncDestinationResponse(rsp) +} + // ListSyncSourcesWithResponse request returning *ListSyncSourcesResponse func (c *ClientWithResponses) ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) { rsp, err := c.ListSyncSources(ctx, teamName, params, reqEditors...) @@ -16033,6 +16672,41 @@ func (c *ClientWithResponses) UpdateSyncSourceWithResponse(ctx context.Context, return ParseUpdateSyncSourceResponse(rsp) } +// CreateTestConnectionForSyncSourceWithBodyWithResponse request with arbitrary body returning *CreateTestConnectionForSyncSourceResponse +func (c *ClientWithResponses) CreateTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) { + rsp, err := c.CreateTestConnectionForSyncSourceWithBody(ctx, teamName, syncSourceName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTestConnectionForSyncSourceResponse(rsp) +} + +func (c *ClientWithResponses) CreateTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) { + rsp, err := c.CreateTestConnectionForSyncSource(ctx, teamName, syncSourceName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTestConnectionForSyncSourceResponse(rsp) +} + +// GetTestConnectionForSyncSourceWithResponse request returning *GetTestConnectionForSyncSourceResponse +func (c *ClientWithResponses) GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) { + rsp, err := c.GetTestConnectionForSyncSource(ctx, teamName, syncSourceName, syncTestConnectionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTestConnectionForSyncSourceResponse(rsp) +} + +// PromoteTestConnectionForSyncSourceWithResponse request returning *PromoteTestConnectionForSyncSourceResponse +func (c *ClientWithResponses) PromoteTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncSourceResponse, error) { + rsp, err := c.PromoteTestConnectionForSyncSource(ctx, teamName, syncSourceName, syncTestConnectionId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePromoteTestConnectionForSyncSourceResponse(rsp) +} + // ListSyncsWithResponse request returning *ListSyncsResponse func (c *ClientWithResponses) ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) { rsp, err := c.ListSyncs(ctx, teamName, params, reqEditors...) @@ -21664,26 +22338,33 @@ func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinat return response, nil } -// ParseListSyncSourcesResponse parses an HTTP response from a ListSyncSourcesWithResponse call -func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, error) { +// ParseCreateTestConnectionForSyncDestinationResponse parses an HTTP response from a CreateTestConnectionForSyncDestinationWithResponse call +func ParseCreateTestConnectionForSyncDestinationResponse(rsp *http.Response) (*CreateTestConnectionForSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncSourcesResponse{ + response := &CreateTestConnectionForSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncSources200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -21699,6 +22380,20 @@ func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21711,26 +22406,26 @@ func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, return response, nil } -// ParseCreateSyncSourceResponse parses an HTTP response from a CreateSyncSourceWithResponse call -func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceResponse, error) { +// ParseGetTestConnectionForSyncDestinationResponse parses an HTTP response from a GetTestConnectionForSyncDestinationWithResponse call +func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetTestConnectionForSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncSourceResponse{ + response := &GetTestConnectionForSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncSource + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -21753,13 +22448,6 @@ func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceRespons } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21772,26 +22460,202 @@ func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceRespons return response, nil } -// ParseTestSyncSourceResponse parses an HTTP response from a TestSyncSourceWithResponse call -func ParseTestSyncSourceResponse(rsp *http.Response) (*TestSyncSourceResponse, error) { +// ParsePromoteTestConnectionForSyncDestinationResponse parses an HTTP response from a PromoteTestConnectionForSyncDestinationWithResponse call +func ParsePromoteTestConnectionForSyncDestinationResponse(rsp *http.Response) (*PromoteTestConnectionForSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &TestSyncSourceResponse{ + response := &PromoteTestConnectionForSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncTestConnection + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncDestination if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListSyncSourcesResponse parses an HTTP response from a ListSyncSourcesWithResponse call +func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListSyncSourcesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListSyncSources200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateSyncSourceResponse parses an HTTP response from a CreateSyncSourceWithResponse call +func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseTestSyncSourceResponse parses an HTTP response from a TestSyncSourceWithResponse call +func ParseTestSyncSourceResponse(rsp *http.Response) (*TestSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &TestSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -21995,6 +22859,196 @@ func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceRespons return response, nil } +// ParseCreateTestConnectionForSyncSourceResponse parses an HTTP response from a CreateTestConnectionForSyncSourceWithResponse call +func ParseCreateTestConnectionForSyncSourceResponse(rsp *http.Response) (*CreateTestConnectionForSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTestConnectionForSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetTestConnectionForSyncSourceResponse parses an HTTP response from a GetTestConnectionForSyncSourceWithResponse call +func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestConnectionForSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTestConnectionForSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePromoteTestConnectionForSyncSourceResponse parses an HTTP response from a PromoteTestConnectionForSyncSourceWithResponse call +func ParsePromoteTestConnectionForSyncSourceResponse(rsp *http.Response) (*PromoteTestConnectionForSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PromoteTestConnectionForSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListSyncsResponse parses an HTTP response from a ListSyncsWithResponse call func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 892a628..9f709dc 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1940,6 +1940,9 @@ type SyncDestination struct { // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` + // Draft If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID. + Draft bool `json:"draft"` + // Env Environment variables for the plugin. Env []SyncEnv `json:"env"` @@ -2159,6 +2162,9 @@ type SyncSource struct { // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` + // Draft If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID. + Draft bool `json:"draft"` + // Env Environment variables for the plugin. Env []SyncEnv `json:"env"` @@ -2295,6 +2301,22 @@ type SyncTestConnection struct { Status SyncTestConnectionStatus `json:"status"` } +// SyncTestConnectionCreate defines model for SyncTestConnectionCreate. +type SyncTestConnectionCreate struct { + // ConnectorID ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env *[]SyncEnvCreate `json:"env,omitempty"` + + // Path Plugin path in CloudQuery registry + Path SyncPluginPath `json:"path"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Version Version of the plugin + Version string `json:"version"` +} + // ID unique ID of the test connection type ID = openapi_types.UUID @@ -3158,6 +3180,9 @@ type TestSyncDestinationJSONRequestBody = SyncDestinationCreate // UpdateSyncDestinationJSONRequestBody defines body for UpdateSyncDestination for application/json ContentType. type UpdateSyncDestinationJSONRequestBody = SyncDestinationUpdate +// CreateTestConnectionForSyncDestinationJSONRequestBody defines body for CreateTestConnectionForSyncDestination for application/json ContentType. +type CreateTestConnectionForSyncDestinationJSONRequestBody = SyncTestConnectionCreate + // CreateSyncSourceJSONRequestBody defines body for CreateSyncSource for application/json ContentType. type CreateSyncSourceJSONRequestBody = SyncSourceCreate @@ -3167,6 +3192,9 @@ type TestSyncSourceJSONRequestBody = SyncSourceCreate // UpdateSyncSourceJSONRequestBody defines body for UpdateSyncSource for application/json ContentType. type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate +// CreateTestConnectionForSyncSourceJSONRequestBody defines body for CreateTestConnectionForSyncSource for application/json ContentType. +type CreateTestConnectionForSyncSourceJSONRequestBody = SyncTestConnectionCreate + // CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. type CreateSyncJSONRequestBody = SyncCreate diff --git a/spec.json b/spec.json index 93cc3e8..3d6995b 100644 --- a/spec.json +++ b/spec.json @@ -3892,7 +3892,7 @@ "tags" : [ "syncs" ] }, "post" : { - "description" : "Create new Sync Source definition.", + "description" : "Create new draft Sync Source definition.", "operationId" : "CreateSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -3939,7 +3939,8 @@ }, "/teams/{team_name}/sync-sources/test" : { "post" : { - "description" : "Test a Sync Source definition.", + "deprecated" : true, + "description" : "DEPRECATED. Test a Sync Source definition. Use CreateTestConnectionForSyncSource instead.", "operationId" : "TestSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -4094,6 +4095,140 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections" : { + "post" : { + "description" : "Create a test connection for sync source.", + "operationId" : "CreateTestConnectionForSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnectionCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}" : { + "get" : { + "description" : "Get test connection details for sync source.", + "operationId" : "GetTestConnectionForSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}/promote" : { + "post" : { + "description" : "Promote a test connection for sync source.", + "operationId" : "PromoteTestConnectionForSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSource" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, "/teams/{team_name}/sync-destinations" : { "get" : { "description" : "List all sync destination definitions.", @@ -4129,7 +4264,7 @@ "tags" : [ "syncs" ] }, "post" : { - "description" : "Create new Sync Destination definition.", + "description" : "Create new draft Sync Destination definition.", "operationId" : "CreateSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -4176,7 +4311,8 @@ }, "/teams/{team_name}/sync-destinations/test" : { "post" : { - "description" : "Test a Sync Destination definition.", + "deprecated" : true, + "description" : "DEPRECATED. Test a Sync Destination definition. Use CreateTestConnectionForSyncDestination instead.", "operationId" : "TestSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -4331,6 +4467,140 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections" : { + "post" : { + "description" : "Create a test connection for sync destination.", + "operationId" : "CreateTestConnectionForSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnectionCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}" : { + "get" : { + "description" : "Get test connection details for sync destination.", + "operationId" : "GetTestConnectionForSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}/promote" : { + "post" : { + "description" : "Promote a test connection for sync destination.", + "operationId" : "PromoteTestConnectionForSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, "/teams/{team_name}/syncs" : { "get" : { "description" : "List all Syncs.", @@ -4878,7 +5148,8 @@ }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { "get" : { - "description" : "Get a Sync Test Connection", + "deprecated" : true, + "description" : "DEPRECATED. Get a Sync Test Connection. Use GetTestConnectionForSyncSource or GetTestConnectionForSyncDestination instead.", "operationId" : "GetSyncTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -4957,7 +5228,8 @@ }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-source" : { "post" : { - "description" : "Create new Sync Source definition from a test connection.", + "deprecated" : true, + "description" : "DEPRECATED. Create new Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource instead.", "operationId" : "CreateSyncSourceFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -5006,7 +5278,8 @@ }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-destination" : { "post" : { - "description" : "Create new Sync Destination definition from a test connection.", + "deprecated" : true, + "description" : "DEPRECATED. Create new Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination instead.", "operationId" : "CreateSyncDestinationFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -5055,7 +5328,8 @@ }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-source/{sync_source_name}" : { "patch" : { - "description" : "Update Sync Source definition from a test connection.", + "deprecated" : true, + "description" : "DEPRECATED. Update Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource and/or UpdateSyncSource instead.", "operationId" : "UpdateSyncSourceFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -5106,7 +5380,8 @@ }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-destination/{sync_destination_name}" : { "patch" : { - "description" : "Update Sync Destination definition from a test connection.", + "deprecated" : true, + "description" : "DEPRECATED. Update Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination and/or UpdateSyncDestination instead.", "operationId" : "UpdateSyncDestinationFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -6044,6 +6319,16 @@ }, "style" : "simple" }, + "sync_test_connection_id" : { + "explode" : false, + "in" : "path", + "name" : "sync_test_connection_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnectionID" + }, + "style" : "simple" + }, "sync_destination_name" : { "explode" : false, "in" : "path", @@ -6091,16 +6376,6 @@ "style" : "simple", "x-go-name" : "ConnectorID" }, - "sync_test_connection_id" : { - "explode" : false, - "in" : "path", - "name" : "sync_test_connection_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnectionID" - }, - "style" : "simple" - }, "managed_database_id" : { "explode" : false, "in" : "path", @@ -8363,9 +8638,13 @@ "$ref" : "#/components/schemas/SyncEnv" }, "type" : "array" + }, + "draft" : { + "description" : "If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", + "type" : "boolean" } }, - "required" : [ "created_at", "env", "updated_at" ] + "required" : [ "created_at", "draft", "env", "updated_at" ] } ] }, "SyncTestConnectionID" : { @@ -8468,6 +8747,35 @@ }, "title" : "Sync Source definition for updating a source" }, + "SyncTestConnectionCreate" : { + "properties" : { + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", + "type" : "string" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" + } + }, + "required" : [ "path", "version" ], + "title" : "Sync Test Connection creation definition" + }, "SyncDestinationWriteMode" : { "default" : "overwrite-delete-stale", "description" : "Write mode for the destination", @@ -8548,9 +8856,13 @@ "$ref" : "#/components/schemas/SyncEnv" }, "type" : "array" + }, + "draft" : { + "description" : "If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", + "type" : "boolean" } }, - "required" : [ "created_at", "env", "updated_at" ] + "required" : [ "created_at", "draft", "env", "updated_at" ] } ] }, "SyncDestinationUpdate" : { From 612e02fc917d594356df918c87928cb33bdfd707 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 17 Jul 2024 09:36:51 -0400 Subject: [PATCH 187/343] fix: Generate CloudQuery Go API Client from `spec.json` (#197) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/models.gen.go b/models.gen.go index 9f709dc..1b32db1 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1520,6 +1520,9 @@ type PluginTableColumn struct { // Type Arrow Type of the column Type string `json:"type"` + // TypeSchema For columns of type JSON, the schema of the JSON object + TypeSchema *string `json:"type_schema,omitempty"` + // Unique Whether the column has a unique constraint Unique bool `json:"unique"` } diff --git a/spec.json b/spec.json index 3d6995b..1ef5d9c 100644 --- a/spec.json +++ b/spec.json @@ -7243,6 +7243,10 @@ "description" : "Arrow Type of the column", "type" : "string" }, + "type_schema" : { + "description" : "For columns of type JSON, the schema of the JSON object", + "type" : "string" + }, "unique" : { "description" : "Whether the column has a unique constraint", "type" : "boolean" From 62f0c0407033903e41d0f36cb0bf5b2b2310eb8c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 17 Jul 2024 09:41:51 -0400 Subject: [PATCH 188/343] chore(main): Release v1.12.2 (#195) :robot: I have created a release *beep* *boop* --- ## [1.12.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.1...v1.12.2) (2024-07-17) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#194](https://github.com/cloudquery/cloudquery-api-go/issues/194)) ([28d4679](https://github.com/cloudquery/cloudquery-api-go/commit/28d4679c5f825d92857967e099f2b3b6038ea635)) * Generate CloudQuery Go API Client from `spec.json` ([#197](https://github.com/cloudquery/cloudquery-api-go/issues/197)) ([612e02f](https://github.com/cloudquery/cloudquery-api-go/commit/612e02fc917d594356df918c87928cb33bdfd707)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b51615..98c0058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.12.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.1...v1.12.2) (2024-07-17) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#194](https://github.com/cloudquery/cloudquery-api-go/issues/194)) ([28d4679](https://github.com/cloudquery/cloudquery-api-go/commit/28d4679c5f825d92857967e099f2b3b6038ea635)) +* Generate CloudQuery Go API Client from `spec.json` ([#197](https://github.com/cloudquery/cloudquery-api-go/issues/197)) ([612e02f](https://github.com/cloudquery/cloudquery-api-go/commit/612e02fc917d594356df918c87928cb33bdfd707)) + ## [1.12.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.0...v1.12.1) (2024-07-04) From 7045185d92d7590880a563cf6c61112216cdbfaf Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 18 Jul 2024 04:32:05 -0400 Subject: [PATCH 189/343] fix: Generate CloudQuery Go API Client from `spec.json` (#198) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 1166 ++++++++++++++++++++++- models.gen.go | 140 +++ spec.json | 2484 ++++++++++++++++++++++++++++++------------------- 3 files changed, 2769 insertions(+), 1021 deletions(-) diff --git a/client.gen.go b/client.gen.go index cc1e5bd..bc2d02b 100644 --- a/client.gen.go +++ b/client.gen.go @@ -438,6 +438,19 @@ type ClientInterface interface { // GetSubscriptionOrderByTeam request GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSyncDestinationTestConnectionWithBody request with any body + CreateSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSyncDestinationTestConnection(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSyncDestinationTestConnection request + GetSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PromoteSyncDestinationTestConnectionWithBody request with any body + PromoteSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PromoteSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncDestinations request ListSyncDestinations(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -473,6 +486,19 @@ type ClientInterface interface { // PromoteTestConnectionForSyncDestination request PromoteTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSyncSourceTestConnectionWithBody request with any body + CreateSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSyncSourceTestConnection(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSyncSourceTestConnection request + GetSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PromoteSyncSourceTestConnectionWithBody request with any body + PromoteSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PromoteSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncSources request ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2154,6 +2180,66 @@ func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamNa return c.Client.Do(req) } +func (c *Client) CreateSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncDestinationTestConnectionRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncDestinationTestConnection(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncDestinationTestConnectionRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncDestinationTestConnectionRequest(c.Server, teamName, syncDestinationTestConnectionID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PromoteSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPromoteSyncDestinationTestConnectionRequestWithBody(c.Server, teamName, syncDestinationTestConnectionID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PromoteSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPromoteSyncDestinationTestConnectionRequest(c.Server, teamName, syncDestinationTestConnectionID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListSyncDestinations(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSyncDestinationsRequest(c.Server, teamName, params) if err != nil { @@ -2310,6 +2396,66 @@ func (c *Client) PromoteTestConnectionForSyncDestination(ctx context.Context, te return c.Client.Do(req) } +func (c *Client) CreateSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncSourceTestConnectionRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateSyncSourceTestConnection(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSyncSourceTestConnectionRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSyncSourceTestConnectionRequest(c.Server, teamName, syncSourceTestConnectionID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PromoteSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPromoteSyncSourceTestConnectionRequestWithBody(c.Server, teamName, syncSourceTestConnectionID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PromoteSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPromoteSyncSourceTestConnectionRequest(c.Server, teamName, syncSourceTestConnectionID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSyncSourcesRequest(c.Server, teamName, params) if err != nil { @@ -8322,6 +8468,148 @@ func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, team return req, nil } +// NewCreateSyncDestinationTestConnectionRequest calls the generic CreateSyncDestinationTestConnection builder with application/json body +func NewCreateSyncDestinationTestConnectionRequest(server string, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncDestinationTestConnectionRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateSyncDestinationTestConnectionRequestWithBody generates requests for CreateSyncDestinationTestConnection with any type of body +func NewCreateSyncDestinationTestConnectionRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSyncDestinationTestConnectionRequest generates requests for GetSyncDestinationTestConnection +func NewGetSyncDestinationTestConnectionRequest(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_test_connection_id", runtime.ParamLocationPath, syncDestinationTestConnectionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPromoteSyncDestinationTestConnectionRequest calls the generic PromoteSyncDestinationTestConnection builder with application/json body +func NewPromoteSyncDestinationTestConnectionRequest(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPromoteSyncDestinationTestConnectionRequestWithBody(server, teamName, syncDestinationTestConnectionID, "application/json", bodyReader) +} + +// NewPromoteSyncDestinationTestConnectionRequestWithBody generates requests for PromoteSyncDestinationTestConnection with any type of body +func NewPromoteSyncDestinationTestConnectionRequestWithBody(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_test_connection_id", runtime.ParamLocationPath, syncDestinationTestConnectionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections/%s/promote", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListSyncDestinationsRequest generates requests for ListSyncDestinations func NewListSyncDestinationsRequest(server string, teamName TeamName, params *ListSyncDestinationsParams) (*http.Request, error) { var err error @@ -8774,8 +9062,19 @@ func NewPromoteTestConnectionForSyncDestinationRequest(server string, teamName T return req, nil } -// NewListSyncSourcesRequest generates requests for ListSyncSources -func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyncSourcesParams) (*http.Request, error) { +// NewCreateSyncSourceTestConnectionRequest calls the generic CreateSyncSourceTestConnection builder with application/json body +func NewCreateSyncSourceTestConnectionRequest(server string, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSyncSourceTestConnectionRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateSyncSourceTestConnectionRequestWithBody generates requests for CreateSyncSourceTestConnection with any type of body +func NewCreateSyncSourceTestConnectionRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -8790,7 +9089,7 @@ func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyn return nil, err } - operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8800,13 +9099,144 @@ func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyn return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.PerPage != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err + return req, nil +} + +// NewGetSyncSourceTestConnectionRequest generates requests for GetSyncSourceTestConnection +func NewGetSyncSourceTestConnectionRequest(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_test_connection_id", runtime.ParamLocationPath, syncSourceTestConnectionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPromoteSyncSourceTestConnectionRequest calls the generic PromoteSyncSourceTestConnection builder with application/json body +func NewPromoteSyncSourceTestConnectionRequest(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPromoteSyncSourceTestConnectionRequestWithBody(server, teamName, syncSourceTestConnectionID, "application/json", bodyReader) +} + +// NewPromoteSyncSourceTestConnectionRequestWithBody generates requests for PromoteSyncSourceTestConnection with any type of body +func NewPromoteSyncSourceTestConnectionRequestWithBody(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_test_connection_id", runtime.ParamLocationPath, syncSourceTestConnectionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections/%s/promote", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListSyncSourcesRequest generates requests for ListSyncSources +func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyncSourcesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err } else { @@ -11472,6 +11902,19 @@ type ClientWithResponsesInterface interface { // GetSubscriptionOrderByTeamWithResponse request GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + // CreateSyncDestinationTestConnectionWithBodyWithResponse request with any body + CreateSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) + + CreateSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) + + // GetSyncDestinationTestConnectionWithResponse request + GetSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncDestinationTestConnectionResponse, error) + + // PromoteSyncDestinationTestConnectionWithBodyWithResponse request with any body + PromoteSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) + + PromoteSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) + // ListSyncDestinationsWithResponse request ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) @@ -11507,6 +11950,19 @@ type ClientWithResponsesInterface interface { // PromoteTestConnectionForSyncDestinationWithResponse request PromoteTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncDestinationResponse, error) + // CreateSyncSourceTestConnectionWithBodyWithResponse request with any body + CreateSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) + + CreateSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) + + // GetSyncSourceTestConnectionWithResponse request + GetSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncSourceTestConnectionResponse, error) + + // PromoteSyncSourceTestConnectionWithBodyWithResponse request with any body + PromoteSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) + + PromoteSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) + // ListSyncSourcesWithResponse request ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) @@ -14031,6 +14487,88 @@ func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { return 0 } +type CreateSyncDestinationTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncDestinationTestConnection + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSyncDestinationTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSyncDestinationTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncDestinationTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncDestinationTestConnection + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncDestinationTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncDestinationTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PromoteSyncDestinationTestConnectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncDestination + JSON201 *SyncDestination + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r PromoteSyncDestinationTestConnectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PromoteSyncDestinationTestConnectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListSyncDestinationsResponse struct { Body []byte HTTPResponse *http.Response @@ -14270,17 +14808,20 @@ func (r PromoteTestConnectionForSyncDestinationResponse) StatusCode() int { return 0 } -type ListSyncSourcesResponse struct { +type CreateSyncSourceTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListSyncSources200Response + JSON201 *SyncSourceTestConnection + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSyncSourcesResponse) Status() string { +func (r CreateSyncSourceTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14288,26 +14829,25 @@ func (r ListSyncSourcesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSyncSourcesResponse) StatusCode() int { +func (r CreateSyncSourceTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncSourceResponse struct { +type GetSyncSourceTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncSource - JSON400 *BadRequest + JSON200 *SyncSourceTestConnection JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncSourceResponse) Status() string { +func (r GetSyncSourceTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14315,27 +14855,27 @@ func (r CreateSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncSourceResponse) StatusCode() int { +func (r GetSyncSourceTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type TestSyncSourceResponse struct { +type PromoteSyncSourceTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncTestConnection + JSON200 *SyncSource + JSON201 *SyncSource JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r TestSyncSourceResponse) Status() string { +func (r PromoteSyncSourceTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14343,24 +14883,24 @@ func (r TestSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r TestSyncSourceResponse) StatusCode() int { +func (r PromoteSyncSourceTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSyncSourceResponse struct { +type ListSyncSourcesResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ListSyncSources200Response JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteSyncSourceResponse) Status() string { +func (r ListSyncSourcesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14368,24 +14908,26 @@ func (r DeleteSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncSourceResponse) StatusCode() int { +func (r ListSyncSourcesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncSourceResponse struct { +type CreateSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource + JSON201 *SyncSource + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncSourceResponse) Status() string { +func (r CreateSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14393,26 +14935,27 @@ func (r GetSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncSourceResponse) StatusCode() int { +func (r CreateSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncSourceResponse struct { +type TestSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource + JSON201 *SyncTestConnection JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncSourceResponse) Status() string { +func (r TestSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14420,27 +14963,104 @@ func (r UpdateSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncSourceResponse) StatusCode() int { +func (r TestSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTestConnectionForSyncSourceResponse struct { +type DeleteSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncTestConnection - JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateTestConnectionForSyncSourceResponse) Status() string { +func (r DeleteSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncSource + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncSource + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateTestConnectionForSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SyncTestConnection + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateTestConnectionForSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -16481,6 +17101,49 @@ func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context return ParseGetSubscriptionOrderByTeamResponse(rsp) } +// CreateSyncDestinationTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncDestinationTestConnectionResponse +func (c *ClientWithResponses) CreateSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) { + rsp, err := c.CreateSyncDestinationTestConnectionWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncDestinationTestConnectionResponse(rsp) +} + +func (c *ClientWithResponses) CreateSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) { + rsp, err := c.CreateSyncDestinationTestConnection(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncDestinationTestConnectionResponse(rsp) +} + +// GetSyncDestinationTestConnectionWithResponse request returning *GetSyncDestinationTestConnectionResponse +func (c *ClientWithResponses) GetSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncDestinationTestConnectionResponse, error) { + rsp, err := c.GetSyncDestinationTestConnection(ctx, teamName, syncDestinationTestConnectionID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncDestinationTestConnectionResponse(rsp) +} + +// PromoteSyncDestinationTestConnectionWithBodyWithResponse request with arbitrary body returning *PromoteSyncDestinationTestConnectionResponse +func (c *ClientWithResponses) PromoteSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) { + rsp, err := c.PromoteSyncDestinationTestConnectionWithBody(ctx, teamName, syncDestinationTestConnectionID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePromoteSyncDestinationTestConnectionResponse(rsp) +} + +func (c *ClientWithResponses) PromoteSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) { + rsp, err := c.PromoteSyncDestinationTestConnection(ctx, teamName, syncDestinationTestConnectionID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePromoteSyncDestinationTestConnectionResponse(rsp) +} + // ListSyncDestinationsWithResponse request returning *ListSyncDestinationsResponse func (c *ClientWithResponses) ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) { rsp, err := c.ListSyncDestinations(ctx, teamName, params, reqEditors...) @@ -16594,6 +17257,49 @@ func (c *ClientWithResponses) PromoteTestConnectionForSyncDestinationWithRespons return ParsePromoteTestConnectionForSyncDestinationResponse(rsp) } +// CreateSyncSourceTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncSourceTestConnectionResponse +func (c *ClientWithResponses) CreateSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) { + rsp, err := c.CreateSyncSourceTestConnectionWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncSourceTestConnectionResponse(rsp) +} + +func (c *ClientWithResponses) CreateSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) { + rsp, err := c.CreateSyncSourceTestConnection(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSyncSourceTestConnectionResponse(rsp) +} + +// GetSyncSourceTestConnectionWithResponse request returning *GetSyncSourceTestConnectionResponse +func (c *ClientWithResponses) GetSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncSourceTestConnectionResponse, error) { + rsp, err := c.GetSyncSourceTestConnection(ctx, teamName, syncSourceTestConnectionID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSyncSourceTestConnectionResponse(rsp) +} + +// PromoteSyncSourceTestConnectionWithBodyWithResponse request with arbitrary body returning *PromoteSyncSourceTestConnectionResponse +func (c *ClientWithResponses) PromoteSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) { + rsp, err := c.PromoteSyncSourceTestConnectionWithBody(ctx, teamName, syncSourceTestConnectionID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePromoteSyncSourceTestConnectionResponse(rsp) +} + +func (c *ClientWithResponses) PromoteSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) { + rsp, err := c.PromoteSyncSourceTestConnection(ctx, teamName, syncSourceTestConnectionID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePromoteSyncSourceTestConnectionResponse(rsp) +} + // ListSyncSourcesWithResponse request returning *ListSyncSourcesResponse func (c *ClientWithResponses) ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) { rsp, err := c.ListSyncSources(ctx, teamName, params, reqEditors...) @@ -22007,6 +22713,196 @@ func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscripti return response, nil } +// ParseCreateSyncDestinationTestConnectionResponse parses an HTTP response from a CreateSyncDestinationTestConnectionWithResponse call +func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*CreateSyncDestinationTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSyncDestinationTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncDestinationTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetSyncDestinationTestConnectionResponse parses an HTTP response from a GetSyncDestinationTestConnectionWithResponse call +func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSyncDestinationTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncDestinationTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncDestinationTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePromoteSyncDestinationTestConnectionResponse parses an HTTP response from a PromoteSyncDestinationTestConnectionWithResponse call +func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*PromoteSyncDestinationTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PromoteSyncDestinationTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncDestination + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncDestination + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListSyncDestinationsResponse parses an HTTP response from a ListSyncDestinationsWithResponse call func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestinationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -22528,6 +23424,196 @@ func ParsePromoteTestConnectionForSyncDestinationResponse(rsp *http.Response) (* return response, nil } +// ParseCreateSyncSourceTestConnectionResponse parses an HTTP response from a CreateSyncSourceTestConnectionWithResponse call +func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyncSourceTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateSyncSourceTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncSourceTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetSyncSourceTestConnectionResponse parses an HTTP response from a GetSyncSourceTestConnectionWithResponse call +func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourceTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncSourceTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncSourceTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePromoteSyncSourceTestConnectionResponse parses an HTTP response from a PromoteSyncSourceTestConnectionWithResponse call +func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteSyncSourceTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PromoteSyncSourceTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListSyncSourcesResponse parses an HTTP response from a ListSyncSourcesWithResponse call func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 1b32db1..e14346a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1813,6 +1813,30 @@ type PriceCategorySpend struct { Total string `json:"total"` } +// PromoteSyncDestinationTestConnection Sync Destination Definition +type PromoteSyncDestinationTestConnection struct { + // MigrateMode Migrate mode for the destination + MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` + + // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // WriteMode Write mode for the destination + WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` +} + +// PromoteSyncSourceTestConnection Sync Source Definition +type PromoteSyncSourceTestConnection struct { + // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. + Name string `json:"name"` + + // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. + SkipTables *[]string `json:"skip_tables,omitempty"` + + // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. + Tables []string `json:"tables"` +} + // RegistryAuthToken JWT token for the image registry type RegistryAuthToken struct { AccessToken string `json:"access_token"` @@ -2018,6 +2042,61 @@ type SyncDestinationCreateFromTestConnection struct { // SyncDestinationMigrateMode Migrate mode for the destination type SyncDestinationMigrateMode string +// SyncDestinationTestConnection defines model for SyncDestinationTestConnection. +type SyncDestinationTestConnection struct { + // CompletedAt Time the test connection was completed + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CreatedAt Time the test connection was created + CreatedAt time.Time `json:"created_at"` + + // FailureCode Code for failure + FailureCode *string `json:"failure_code,omitempty"` + + // FailureReason Reason for failure + FailureReason *string `json:"failure_reason,omitempty"` + + // ID unique ID of the test connection + ID ID `json:"id"` + + // PluginPath Plugin path in CloudQuery registry + PluginPath *SyncPluginPath `json:"plugin_path,omitempty"` + + // PluginVersion The version in semantic version format. + PluginVersion *VersionName `json:"plugin_version,omitempty"` + + // Status The status of the sync run + Status SyncTestConnectionStatus `json:"status"` +} + +// SyncDestinationTestConnectionCreate defines model for SyncDestinationTestConnectionCreate. +type SyncDestinationTestConnectionCreate struct { + // ConnectorID ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + + // DestinationName Name of an existing destination + DestinationName *string `json:"destination_name,omitempty"` + + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env *[]SyncEnvCreate `json:"env,omitempty"` + + // MigrateMode Migrate mode for the destination + MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` + + // Path Plugin path in CloudQuery registry + Path SyncPluginPath `json:"path"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Version Version of the plugin + Version string `json:"version"` + + // WriteMode Write mode for the destination + WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` +} + +// SyncDestinationTestConnectionID ID of the Sync Destination Test Connection +type SyncDestinationTestConnectionID = openapi_types.UUID + // SyncDestinationUpdate Sync Destination Update Definition type SyncDestinationUpdate struct { // ConnectorID ID of the Connector @@ -2237,6 +2316,55 @@ type SyncSourceCreateFromTestConnection struct { Tables []string `json:"tables"` } +// SyncSourceTestConnection defines model for SyncSourceTestConnection. +type SyncSourceTestConnection struct { + // CompletedAt Time the test connection was completed + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CreatedAt Time the test connection was created + CreatedAt time.Time `json:"created_at"` + + // FailureCode Code for failure + FailureCode *string `json:"failure_code,omitempty"` + + // FailureReason Reason for failure + FailureReason *string `json:"failure_reason,omitempty"` + + // ID unique ID of the test connection + ID ID `json:"id"` + + // PluginPath Plugin path in CloudQuery registry + PluginPath *SyncPluginPath `json:"plugin_path,omitempty"` + + // PluginVersion The version in semantic version format. + PluginVersion *VersionName `json:"plugin_version,omitempty"` + + // Status The status of the sync run + Status SyncTestConnectionStatus `json:"status"` +} + +// SyncSourceTestConnectionCreate defines model for SyncSourceTestConnectionCreate. +type SyncSourceTestConnectionCreate struct { + // ConnectorID ID of the Connector + ConnectorID *ConnectorID `json:"connector_id,omitempty"` + + // Env Environment variables for the plugin. All environment variables will be stored as secrets. + Env *[]SyncEnvCreate `json:"env,omitempty"` + + // Path Plugin path in CloudQuery registry + Path SyncPluginPath `json:"path"` + + // SourceName Name of an existing source + SourceName *string `json:"source_name,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Version Version of the plugin + Version string `json:"version"` +} + +// SyncSourceTestConnectionID ID of the Sync Source Test Connection +type SyncSourceTestConnectionID = openapi_types.UUID + // SyncSourceUpdate Sync Source Update Definition type SyncSourceUpdate struct { // ConnectorID ID of the Connector @@ -3174,6 +3302,12 @@ type UpdateSpendingLimitJSONRequestBody = SpendingLimitUpdate // CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate +// CreateSyncDestinationTestConnectionJSONRequestBody defines body for CreateSyncDestinationTestConnection for application/json ContentType. +type CreateSyncDestinationTestConnectionJSONRequestBody = SyncDestinationTestConnectionCreate + +// PromoteSyncDestinationTestConnectionJSONRequestBody defines body for PromoteSyncDestinationTestConnection for application/json ContentType. +type PromoteSyncDestinationTestConnectionJSONRequestBody = PromoteSyncDestinationTestConnection + // CreateSyncDestinationJSONRequestBody defines body for CreateSyncDestination for application/json ContentType. type CreateSyncDestinationJSONRequestBody = SyncDestinationCreate @@ -3186,6 +3320,12 @@ type UpdateSyncDestinationJSONRequestBody = SyncDestinationUpdate // CreateTestConnectionForSyncDestinationJSONRequestBody defines body for CreateTestConnectionForSyncDestination for application/json ContentType. type CreateTestConnectionForSyncDestinationJSONRequestBody = SyncTestConnectionCreate +// CreateSyncSourceTestConnectionJSONRequestBody defines body for CreateSyncSourceTestConnection for application/json ContentType. +type CreateSyncSourceTestConnectionJSONRequestBody = SyncSourceTestConnectionCreate + +// PromoteSyncSourceTestConnectionJSONRequestBody defines body for PromoteSyncSourceTestConnection for application/json ContentType. +type PromoteSyncSourceTestConnectionJSONRequestBody = PromoteSyncSourceTestConnection + // CreateSyncSourceJSONRequestBody defines body for CreateSyncSource for application/json ContentType. type CreateSyncSourceJSONRequestBody = SyncSourceCreate diff --git a/spec.json b/spec.json index 1ef5d9c..2725fe4 100644 --- a/spec.json +++ b/spec.json @@ -3857,91 +3857,10 @@ "tags" : [ "registry" ] } }, - "/teams/{team_name}/sync-sources" : { - "get" : { - "description" : "List all sync source definitions.", - "operationId" : "ListSyncSources", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListSyncSources_200_response" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Create new draft Sync Source definition.", - "operationId" : "CreateSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSourceCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSource" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-sources/test" : { + "/teams/{team_name}/sync-source-test-connections" : { "post" : { - "deprecated" : true, - "description" : "DEPRECATED. Test a Sync Source definition. Use CreateTestConnectionForSyncSource instead.", - "operationId" : "TestSyncSource", + "description" : "Create a test source connection.", + "operationId" : "CreateSyncSourceTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" } ], @@ -3949,7 +3868,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSourceCreate" + "$ref" : "#/components/schemas/SyncSourceTestConnectionCreate" } } }, @@ -3960,7 +3879,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" + "$ref" : "#/components/schemas/SyncSourceTestConnection" } } }, @@ -3988,48 +3907,21 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/{sync_source_name}" : { - "delete" : { - "description" : "Delete a Sync Source definition. Any syncs relying on this source must be deleted first.", - "operationId" : "DeleteSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, + "/teams/{team_name}/sync-source-test-connections/{sync_source_test_connection_id}" : { "get" : { - "description" : "Get a single sync source definition.", - "operationId" : "GetSyncSource", + "description" : "Get a sync source test connection.", + "operationId" : "GetSyncSourceTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_source_name" + "$ref" : "#/components/parameters/sync_source_test_connection_id" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSource" + "$ref" : "#/components/schemas/SyncSourceTestConnection" } } }, @@ -4038,6 +3930,9 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "404" : { "$ref" : "#/components/responses/NotFound" }, @@ -4046,20 +3941,22 @@ } }, "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a Sync Source definition.", - "operationId" : "UpdateSyncSource", + } + }, + "/teams/{team_name}/sync-source-test-connections/{sync_source_test_connection_id}/promote" : { + "post" : { + "description" : "Promote a sync source test connection to a sync source.", + "operationId" : "PromoteSyncSourceTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_source_name" + "$ref" : "#/components/parameters/sync_source_test_connection_id" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSourceUpdate" + "$ref" : "#/components/schemas/PromoteSyncSourceTestConnection" } } }, @@ -4074,7 +3971,17 @@ } } }, - "description" : "Response" + "description" : "Successful response indicating that an existing sync source was replaced." + }, + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSource" + } + } + }, + "description" : "Successful response indicating that a new sync source was created." }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -4095,20 +4002,18 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections" : { + "/teams/{team_name}/sync-destination-test-connections" : { "post" : { - "description" : "Create a test connection for sync source.", - "operationId" : "CreateTestConnectionForSyncSource", + "description" : "Create a test destination connection.", + "operationId" : "CreateSyncDestinationTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnectionCreate" + "$ref" : "#/components/schemas/SyncDestinationTestConnectionCreate" } } }, @@ -4119,7 +4024,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" + "$ref" : "#/components/schemas/SyncDestinationTestConnection" } } }, @@ -4147,34 +4052,32 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}" : { + "/teams/{team_name}/sync-destination-test-connections/{sync_destination_test_connection_id}" : { "get" : { - "description" : "Get test connection details for sync source.", - "operationId" : "GetTestConnectionForSyncSource", + "description" : "Get a sync destination test connection.", + "operationId" : "GetSyncDestinationTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_source_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_destination_test_connection_id" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" + "$ref" : "#/components/schemas/SyncDestinationTestConnection" } } }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "404" : { "$ref" : "#/components/responses/NotFound" }, @@ -4185,23 +4088,41 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}/promote" : { + "/teams/{team_name}/sync-destination-test-connections/{sync_destination_test_connection_id}/promote" : { "post" : { - "description" : "Promote a test connection for sync source.", - "operationId" : "PromoteTestConnectionForSyncSource", + "description" : "Promote a sync destination test connection to a sync destination.", + "operationId" : "PromoteSyncDestinationTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_source_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_destination_test_connection_id" } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PromoteSyncDestinationTestConnection" + } + } + }, + "required" : true + }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSource" + "$ref" : "#/components/schemas/SyncDestination" + } + } + }, + "description" : "Successful response indicating that an existing sync destination was replaced." + }, + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" } } }, @@ -4219,9 +4140,6 @@ "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, "500" : { "$ref" : "#/components/responses/InternalError" } @@ -4229,10 +4147,10 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations" : { + "/teams/{team_name}/sync-sources" : { "get" : { - "description" : "List all sync destination definitions.", - "operationId" : "ListSyncDestinations", + "description" : "List all sync source definitions.", + "operationId" : "ListSyncSources", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { @@ -4245,7 +4163,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ListSyncDestinations_200_response" + "$ref" : "#/components/schemas/ListSyncSources_200_response" } } }, @@ -4264,8 +4182,8 @@ "tags" : [ "syncs" ] }, "post" : { - "description" : "Create new draft Sync Destination definition.", - "operationId" : "CreateSyncDestination", + "description" : "Create new draft Sync Source definition.", + "operationId" : "CreateSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" } ], @@ -4273,7 +4191,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestinationCreate" + "$ref" : "#/components/schemas/SyncSourceCreate" } } }, @@ -4284,7 +4202,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/SyncSource" } } }, @@ -4309,11 +4227,11 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/test" : { + "/teams/{team_name}/sync-sources/test" : { "post" : { "deprecated" : true, - "description" : "DEPRECATED. Test a Sync Destination definition. Use CreateTestConnectionForSyncDestination instead.", - "operationId" : "TestSyncDestination", + "description" : "DEPRECATED. Test a Sync Source definition. Use CreateTestConnectionForSyncSource instead.", + "operationId" : "TestSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" } ], @@ -4321,7 +4239,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestinationCreate" + "$ref" : "#/components/schemas/SyncSourceCreate" } } }, @@ -4360,14 +4278,14 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}" : { + "/teams/{team_name}/sync-sources/{sync_source_name}" : { "delete" : { - "description" : "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", - "operationId" : "DeleteSyncDestination", + "description" : "Delete a Sync Source definition. Any syncs relying on this source must be deleted first.", + "operationId" : "DeleteSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_destination_name" + "$ref" : "#/components/parameters/sync_source_name" } ], "responses" : { "204" : { @@ -4389,19 +4307,19 @@ "tags" : [ "syncs" ] }, "get" : { - "description" : "Get a single sync destination definition.", - "operationId" : "GetSyncDestination", + "description" : "Get a single sync source definition.", + "operationId" : "GetSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_destination_name" + "$ref" : "#/components/parameters/sync_source_name" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/SyncSource" } } }, @@ -4420,18 +4338,18 @@ "tags" : [ "syncs" ] }, "patch" : { - "description" : "Update a Sync Destination definition.", - "operationId" : "UpdateSyncDestination", + "description" : "Update a Sync Source definition.", + "operationId" : "UpdateSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_destination_name" + "$ref" : "#/components/parameters/sync_source_name" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestinationUpdate" + "$ref" : "#/components/schemas/SyncSourceUpdate" } } }, @@ -4442,7 +4360,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/SyncSource" } } }, @@ -4467,14 +4385,14 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections" : { + "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections" : { "post" : { - "description" : "Create a test connection for sync destination.", - "operationId" : "CreateTestConnectionForSyncDestination", + "description" : "Create a test connection for sync source.", + "operationId" : "CreateTestConnectionForSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_destination_name" + "$ref" : "#/components/parameters/sync_source_name" } ], "requestBody" : { "content" : { @@ -4519,14 +4437,14 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}" : { + "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}" : { "get" : { - "description" : "Get test connection details for sync destination.", - "operationId" : "GetTestConnectionForSyncDestination", + "description" : "Get test connection details for sync source.", + "operationId" : "GetTestConnectionForSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_destination_name" + "$ref" : "#/components/parameters/sync_source_name" }, { "$ref" : "#/components/parameters/sync_test_connection_id" } ], @@ -4557,14 +4475,14 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}/promote" : { + "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}/promote" : { "post" : { - "description" : "Promote a test connection for sync destination.", - "operationId" : "PromoteTestConnectionForSyncDestination", + "description" : "Promote a test connection for sync source.", + "operationId" : "PromoteTestConnectionForSyncSource", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_destination_name" + "$ref" : "#/components/parameters/sync_source_name" }, { "$ref" : "#/components/parameters/sync_test_connection_id" } ], @@ -4573,7 +4491,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/SyncSource" } } }, @@ -4601,10 +4519,10 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs" : { + "/teams/{team_name}/sync-destinations" : { "get" : { - "description" : "List all Syncs.", - "operationId" : "ListSyncs", + "description" : "List all sync destination definitions.", + "operationId" : "ListSyncDestinations", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { @@ -4617,7 +4535,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ListSyncs_200_response" + "$ref" : "#/components/schemas/ListSyncDestinations_200_response" } } }, @@ -4636,8 +4554,8 @@ "tags" : [ "syncs" ] }, "post" : { - "description" : "Create new Sync definition. Sync runs can be scheduled automatically, or triggered manually after sync is created.", - "operationId" : "CreateSync", + "description" : "Create new draft Sync Destination definition.", + "operationId" : "CreateSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" } ], @@ -4645,7 +4563,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncCreate" + "$ref" : "#/components/schemas/SyncDestinationCreate" } } }, @@ -4656,7 +4574,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Sync" + "$ref" : "#/components/schemas/SyncDestination" } } }, @@ -4668,6 +4586,9 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, @@ -4678,28 +4599,79 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}" : { + "/teams/{team_name}/sync-destinations/test" : { + "post" : { + "deprecated" : true, + "description" : "DEPRECATED. Test a Sync Destination definition. Use CreateTestConnectionForSyncDestination instead.", + "operationId" : "TestSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}" : { "delete" : { - "description" : "Delete Sync. This will delete Sync configuration and all associated sync runs, but will not delete the associated source and destination(s). These will need to be deleted separately.", - "operationId" : "DeleteSync", + "description" : "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", + "operationId" : "DeleteSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_name" + "$ref" : "#/components/parameters/sync_destination_name" } ], "responses" : { "204" : { "description" : "Deleted" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } @@ -4707,27 +4679,24 @@ "tags" : [ "syncs" ] }, "get" : { - "description" : "Get a Sync", - "operationId" : "GetSync", + "description" : "Get a single sync destination definition.", + "operationId" : "GetSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_name" + "$ref" : "#/components/parameters/sync_destination_name" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Sync" + "$ref" : "#/components/schemas/SyncDestination" } } }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, @@ -4741,38 +4710,39 @@ "tags" : [ "syncs" ] }, "patch" : { - "description" : "Update a Sync", - "operationId" : "UpdateSync", + "description" : "Update a Sync Destination definition.", + "operationId" : "UpdateSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_name" + "$ref" : "#/components/parameters/sync_destination_name" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncUpdate" + "$ref" : "#/components/schemas/SyncDestinationUpdate" } } - } + }, + "required" : true }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Sync" + "$ref" : "#/components/schemas/SyncDestination" } } }, - "description" : "Updated" + "description" : "Response" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "403" : { - "$ref" : "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" @@ -4787,30 +4757,83 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}/runs" : { - "get" : { - "description" : "List all Sync Runs.", - "operationId" : "ListSyncRuns", + "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections" : { + "post" : { + "description" : "Create a test connection for sync destination.", + "operationId" : "CreateTestConnectionForSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_name" + "$ref" : "#/components/parameters/sync_destination_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnectionCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncTestConnection" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}" : { + "get" : { + "description" : "Get test connection details for sync destination.", + "operationId" : "GetTestConnectionForSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/per_page" + "$ref" : "#/components/parameters/sync_destination_name" }, { - "$ref" : "#/components/parameters/page" + "$ref" : "#/components/parameters/sync_test_connection_id" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ListSyncRuns_200_response" + "$ref" : "#/components/schemas/SyncTestConnection" } } }, "description" : "Response" }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, @@ -4822,21 +4845,25 @@ } }, "tags" : [ "syncs" ] - }, + } + }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}/promote" : { "post" : { - "description" : "Create new SyncRun. This will trigger a manual job run.", - "operationId" : "CreateSyncRun", + "description" : "Promote a test connection for sync destination.", + "operationId" : "PromoteTestConnectionForSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_name" + "$ref" : "#/components/parameters/sync_destination_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" } ], "responses" : { - "201" : { + "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncRun" + "$ref" : "#/components/schemas/SyncDestination" } } }, @@ -4848,9 +4875,15 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, "500" : { "$ref" : "#/components/responses/InternalError" } @@ -4858,23 +4891,23 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}" : { + "/teams/{team_name}/syncs" : { "get" : { - "description" : "Get a Sync Run.", - "operationId" : "GetSyncRun", + "description" : "List all Syncs.", + "operationId" : "ListSyncs", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_name" + "$ref" : "#/components/parameters/per_page" }, { - "$ref" : "#/components/parameters/sync_run_id" + "$ref" : "#/components/parameters/page" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncRunDetails" + "$ref" : "#/components/schemas/ListSyncs_200_response" } } }, @@ -4892,44 +4925,38 @@ }, "tags" : [ "syncs" ] }, - "patch" : { - "description" : "Update a SyncRun", - "operationId" : "UpdateSyncRun", + "post" : { + "description" : "Create new Sync definition. Sync runs can be scheduled automatically, or triggered manually after sync is created.", + "operationId" : "CreateSync", "parameters" : [ { "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSyncRun_request" + "$ref" : "#/components/schemas/SyncCreate" } } - } + }, + "required" : true }, "responses" : { - "200" : { + "201" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncRun" + "$ref" : "#/components/schemas/Sync" } } }, - "description" : "Updated" + "description" : "Response" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" @@ -4941,30 +4968,18 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/progress" : { - "post" : { - "description" : "Create a new sync run progress update.", - "operationId" : "CreateSyncRunProgress", + "/teams/{team_name}/syncs/{sync_name}" : { + "delete" : { + "description" : "Delete Sync. This will delete Sync configuration and all associated sync runs, but will not delete the associated source and destination(s). These will need to be deleted separately.", + "operationId" : "DeleteSync", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateSyncRunProgress_request" - } - } - }, - "required" : true - }, "responses" : { "204" : { - "description" : "Progress was reported successfully" + "description" : "Deleted" }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -4975,75 +4990,79 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/logs" : { + "tags" : [ "syncs" ] + }, "get" : { - "description" : "Get logs for a sync run.", - "operationId" : "GetSyncRunLogs", + "description" : "Get a Sync", + "operationId" : "GetSync", "parameters" : [ { - "explode" : false, - "in" : "header", - "name" : "Accept", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "simple" - }, { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Sync_Run_Logs" - } - }, - "text/plain" : { - "schema" : { - "description" : "Chunked response logs for a sync run that is in progress.", - "type" : "string" + "$ref" : "#/components/schemas/Sync" } } }, "description" : "Response" }, - "204" : { - "description" : "No logs available for a sync run that has not started." + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "302" : { - "description" : "Redirect to the logs download URL for a sync run that has completed.", - "headers" : { - "Location" : { - "explode" : false, - "schema" : { - "description" : "URL to download logs", - "type" : "string" - }, - "style" : "simple" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "patch" : { + "description" : "Update a Sync", + "operationId" : "UpdateSync", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncUpdate" } } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Sync" + } + } + }, + "description" : "Updated" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, "404" : { "$ref" : "#/components/responses/NotFound" @@ -5058,69 +5077,56 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/identity" : { + "/teams/{team_name}/syncs/{sync_name}/runs" : { "get" : { - "description" : "Get connector identity for a sync run.", - "operationId" : "GetSyncRunConnectorIdentity", + "description" : "List all Sync Runs.", + "operationId" : "ListSyncRuns", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_name" }, { - "$ref" : "#/components/parameters/sync_run_id" + "$ref" : "#/components/parameters/per_page" }, { - "$ref" : "#/components/parameters/connector_id" + "$ref" : "#/components/parameters/page" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" + "$ref" : "#/components/schemas/ListSyncRuns_200_response" } } }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/credentials" : { - "get" : { - "description" : "Get connector credentials for a sync run.", - "operationId" : "GetSyncRunConnectorCredentials", + "tags" : [ "syncs" ] + }, + "post" : { + "description" : "Create new SyncRun. This will trigger a manual job run.", + "operationId" : "CreateSyncRun", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - }, { - "$ref" : "#/components/parameters/connector_id" } ], "responses" : { - "200" : { + "201" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" + "$ref" : "#/components/schemas/SyncRun" } } }, @@ -5132,9 +5138,6 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, @@ -5142,26 +5145,26 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}" : { "get" : { - "deprecated" : true, - "description" : "DEPRECATED. Get a Sync Test Connection. Use GetTestConnectionForSyncSource or GetTestConnectionForSyncDestination instead.", - "operationId" : "GetSyncTestConnection", + "description" : "Get a Sync Run.", + "operationId" : "GetSyncRun", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" + "$ref" : "#/components/schemas/SyncRunDetails" } } }, @@ -5180,18 +5183,20 @@ "tags" : [ "syncs" ] }, "patch" : { - "description" : "Update a Sync Test Connection", - "operationId" : "UpdateSyncTestConnection", + "description" : "Update a SyncRun", + "operationId" : "UpdateSyncRun", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSyncTestConnection_request" + "$ref" : "#/components/schemas/UpdateSyncRun_request" } } } @@ -5201,7 +5206,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" + "$ref" : "#/components/schemas/SyncRun" } } }, @@ -5226,36 +5231,30 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-source" : { + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/progress" : { "post" : { - "deprecated" : true, - "description" : "DEPRECATED. Create new Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource instead.", - "operationId" : "CreateSyncSourceFromTestConnection", + "description" : "Create a new sync run progress update.", + "operationId" : "CreateSyncRunProgress", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSourceCreateFromTestConnection" + "$ref" : "#/components/schemas/CreateSyncRunProgress_request" } } }, "required" : true }, "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSource" - } - } - }, - "description" : "Response" + "204" : { + "description" : "Progress was reported successfully" }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -5273,91 +5272,62 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "syncs" ], + "x-internal" : true } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-destination" : { - "post" : { - "deprecated" : true, - "description" : "DEPRECATED. Create new Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination instead.", - "operationId" : "CreateSyncDestinationFromTestConnection", + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/logs" : { + "get" : { + "description" : "Get logs for a sync run.", + "operationId" : "GetSyncRunLogs", "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationCreateFromTestConnection" - } - } - }, - "required" : true - }, "responses" : { - "201" : { + "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/Sync_Run_Logs" + } + }, + "text/plain" : { + "schema" : { + "description" : "Chunked response logs for a sync run that is in progress.", + "type" : "string" } } }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" + "204" : { + "description" : "No logs available for a sync run that has not started." }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-source/{sync_source_name}" : { - "patch" : { - "deprecated" : true, - "description" : "DEPRECATED. Update Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource and/or UpdateSyncSource instead.", - "operationId" : "UpdateSyncSourceFromTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - }, { - "$ref" : "#/components/parameters/sync_source_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSourceUpdateFromTestConnection" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { + "302" : { + "description" : "Redirect to the logs download URL for a sync run that has completed.", + "headers" : { + "Location" : { + "explode" : false, "schema" : { - "$ref" : "#/components/schemas/SyncSource" - } + "description" : "URL to download logs", + "type" : "string" + }, + "style" : "simple" } - }, - "description" : "Response" + } }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -5378,34 +5348,25 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-destination/{sync_destination_name}" : { - "patch" : { - "deprecated" : true, - "description" : "DEPRECATED. Update Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination and/or UpdateSyncDestination instead.", - "operationId" : "UpdateSyncDestinationFromTestConnection", + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/identity" : { + "get" : { + "description" : "Get connector identity for a sync run.", + "operationId" : "GetSyncRunConnectorIdentity", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" }, { - "$ref" : "#/components/parameters/sync_destination_name" + "$ref" : "#/components/parameters/sync_run_id" + }, { + "$ref" : "#/components/parameters/connector_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationUpdateFromTestConnection" - } - } - }, - "required" : true - }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" } } }, @@ -5427,17 +5388,20 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "syncs" ], + "x-internal" : true } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/identity" : { + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/credentials" : { "get" : { - "description" : "Get connector identity for a test connection.", - "operationId" : "GetTestConnectionConnectorIdentity", + "description" : "Get connector credentials for a sync run.", + "operationId" : "GetSyncRunConnectorCredentials", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" }, { "$ref" : "#/components/parameters/connector_id" } ], @@ -5446,7 +5410,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" + "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" } } }, @@ -5472,100 +5436,101 @@ "x-internal" : true } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/credentials" : { + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { "get" : { - "description" : "Get connector credentials for a test connection", - "operationId" : "GetTestConnectionConnectorCredentials", + "deprecated" : true, + "description" : "DEPRECATED. Get a Sync Test Connection. Use GetTestConnectionForSyncSource or GetTestConnectionForSyncDestination instead.", + "operationId" : "GetSyncTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_test_connection_id" - }, { - "$ref" : "#/components/parameters/connector_id" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" + "$ref" : "#/components/schemas/SyncTestConnection" } } }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/managed-databases" : { - "get" : { - "description" : "Get a paginated list of managed databases", - "operationId" : "GetManagedDatabases", + "tags" : [ "syncs" ] + }, + "patch" : { + "description" : "Update a Sync Test Connection", + "operationId" : "UpdateSyncTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/page" - }, { - "$ref" : "#/components/parameters/per_page" + "$ref" : "#/components/parameters/sync_test_connection_id" } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSyncTestConnection_request" + } + } + } + }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GetManagedDatabases_200_response" + "$ref" : "#/components/schemas/SyncTestConnection" } } }, - "description" : "Response" + "description" : "Updated" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, "403" : { "$ref" : "#/components/responses/Forbidden" }, "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "managed-databases" ], - "x-internal" : true - }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-source" : { "post" : { - "description" : "Create a new managed database", - "operationId" : "CreateManagedDatabase", + "deprecated" : true, + "description" : "DEPRECATED. Create new Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource instead.", + "operationId" : "CreateSyncSourceFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ManagedDatabaseCreate" + "$ref" : "#/components/schemas/SyncSourceCreateFromTestConnection" } } }, @@ -5576,7 +5541,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ManagedDatabase" + "$ref" : "#/components/schemas/SyncSource" } } }, @@ -5588,15 +5553,9 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "409" : { - "$ref" : "#/components/responses/Conflict" - }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, @@ -5604,22 +5563,42 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "managed-databases" ], - "x-internal" : true + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/managed-databases/{managed_database_id}" : { - "delete" : { - "description" : "Delete this managed database. Any syncs relying on this database must be deleted first.", - "operationId" : "DeleteManagedDatabase", + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-destination" : { + "post" : { + "deprecated" : true, + "description" : "DEPRECATED. Create new Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination instead.", + "operationId" : "CreateSyncDestinationFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/managed_database_id" + "$ref" : "#/components/parameters/sync_test_connection_id" } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationCreateFromTestConnection" + } + } + }, + "required" : true + }, "responses" : { - "204" : { - "description" : "Deleted" + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestination" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" @@ -5634,122 +5613,89 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "managed-databases" ], - "x-internal" : true - }, - "get" : { - "description" : "Get a single managed database.", - "operationId" : "GetManagedDatabase", + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-source/{sync_source_name}" : { + "patch" : { + "deprecated" : true, + "description" : "DEPRECATED. Update Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource and/or UpdateSyncSource instead.", + "operationId" : "UpdateSyncSourceFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/managed_database_id" + "$ref" : "#/components/parameters/sync_test_connection_id" + }, { + "$ref" : "#/components/parameters/sync_source_name" } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSourceUpdateFromTestConnection" + } + } + }, + "required" : true + }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ManagedDatabase" + "$ref" : "#/components/schemas/SyncSource" } } }, "description" : "Response" }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "managed-databases" ], - "x-internal" : true + "tags" : [ "syncs" ] } }, - "/teams/{team_name}/connectors" : { - "get" : { - "description" : "List all configured connectors", - "operationId" : "ListConnectors", + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-destination/{sync_destination_name}" : { + "patch" : { + "deprecated" : true, + "description" : "DEPRECATED. Update Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination and/or UpdateSyncDestination instead.", + "operationId" : "UpdateSyncDestinationFromTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - }, { - "description" : "Filter connectors by a given type.", - "explode" : true, - "in" : "query", - "name" : "filter_type", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" + "$ref" : "#/components/parameters/sync_test_connection_id" }, { - "description" : "Filter connectors by a given plugin reference. Mutually exclusive with `type`.", - "example" : "cloudquery/source/googleanalytics", - "explode" : true, - "in" : "query", - "name" : "filter_plugin", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListConnectors_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Create new connector", - "operationId" : "CreateConnector", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" + "$ref" : "#/components/parameters/sync_destination_name" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ConnectorCreate" + "$ref" : "#/components/schemas/SyncDestinationUpdateFromTestConnection" } } }, "required" : true }, "responses" : { - "201" : { + "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Connector" + "$ref" : "#/components/schemas/SyncDestination" } } }, @@ -5761,6 +5707,9 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, @@ -5771,12 +5720,14 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/connectors/{connector_id}" : { + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/identity" : { "get" : { - "description" : "Get a configured connector", - "operationId" : "GetConnector", + "description" : "Get connector identity for a test connection.", + "operationId" : "GetTestConnectionConnectorIdentity", "parameters" : [ { "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" }, { "$ref" : "#/components/parameters/connector_id" } ], @@ -5785,51 +5736,53 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Connector" + "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" } } }, "description" : "Response" }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a connector", - "operationId" : "UpdateConnector", + "tags" : [ "syncs" ], + "x-internal" : true + } + }, + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/credentials" : { + "get" : { + "description" : "Get connector credentials for a test connection", + "operationId" : "GetTestConnectionConnectorCredentials", "parameters" : [ { "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_test_connection_id" }, { "$ref" : "#/components/parameters/connector_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorUpdate" - } - } - } - }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Connector" + "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" } } }, - "description" : "Update response" + "description" : "Response" }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -5840,32 +5793,6 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/connectors/{connector_id}/authenticate" : { - "delete" : { - "description" : "Revoke authentication for a given connector. Any syncs relying on this connector will stop running until the connector is reauthenticated or sync references are updated.", - "operationId" : "RevokeConnector", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, @@ -5873,31 +5800,31 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "syncs" ], + "x-internal" : true } }, - "/teams/{team_name}/connectors/{connector_id}/authenticate/aws" : { - "patch" : { - "description" : "Complete authentication for the given AWS connector", - "operationId" : "AuthenticateConnectorFinishAWS", + "/teams/{team_name}/managed-databases" : { + "get" : { + "description" : "Get a paginated list of managed databases", + "operationId" : "GetManagedDatabases", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/connector_id" + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthFinishRequestAWS" - } - } - }, - "required" : true - }, "responses" : { - "204" : { - "description" : "Authentication is complete." + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetManagedDatabases_200_response" + } + } + }, + "description" : "Response" }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -5911,39 +5838,35 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "managed-databases" ], + "x-internal" : true }, "post" : { - "description" : "Authenticate or reauthenticate the given AWS connector", - "operationId" : "AuthenticateConnectorAWS", + "description" : "Create a new managed database", + "operationId" : "CreateManagedDatabase", "parameters" : [ { "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthRequestAWS" + "$ref" : "#/components/schemas/ManagedDatabaseCreate" } } }, "required" : true }, "responses" : { - "200" : { + "201" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseAWS" + "$ref" : "#/components/schemas/ManagedDatabase" } } }, @@ -5955,9 +5878,15 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "404" : { "$ref" : "#/components/responses/NotFound" }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, @@ -5965,41 +5894,26 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "managed-databases" ], + "x-internal" : true } }, - "/teams/{team_name}/connectors/{connector_id}/authenticate/oauth" : { - "patch" : { - "description" : "Complete authentication for the given OAuth connector", - "operationId" : "AuthenticateConnectorFinishOAuth", + "/teams/{team_name}/managed-databases/{managed_database_id}" : { + "delete" : { + "description" : "Delete this managed database. Any syncs relying on this database must be deleted first.", + "operationId" : "DeleteManagedDatabase", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/connector_id" + "$ref" : "#/components/parameters/managed_database_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthFinishRequestOAuth" - } - } - }, - "required" : true - }, "responses" : { "204" : { - "description" : "Authentication is complete." - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" + "description" : "Deleted" }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, "404" : { "$ref" : "#/components/responses/NotFound" }, @@ -6010,49 +5924,425 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "managed-databases" ], + "x-internal" : true }, - "post" : { - "description" : "Authenticate or reauthenticate the given OAuth connector", - "operationId" : "AuthenticateConnectorOAuth", + "get" : { + "description" : "Get a single managed database.", + "operationId" : "GetManagedDatabase", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/connector_id" + "$ref" : "#/components/parameters/managed_database_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthRequestOAuth" - } - } - }, - "required" : true - }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" + "$ref" : "#/components/schemas/ManagedDatabase" } } }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + } + }, + "/teams/{team_name}/connectors" : { + "get" : { + "description" : "List all configured connectors", + "operationId" : "ListConnectors", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + }, { + "description" : "Filter connectors by a given type.", + "explode" : true, + "in" : "query", + "name" : "filter_type", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Filter connectors by a given plugin reference. Mutually exclusive with `type`.", + "example" : "cloudquery/source/googleanalytics", + "explode" : true, + "in" : "query", + "name" : "filter_plugin", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListConnectors_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "post" : { + "description" : "Create new connector", + "operationId" : "CreateConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Connector" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/connectors/{connector_id}" : { + "get" : { + "description" : "Get a configured connector", + "operationId" : "GetConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Connector" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "patch" : { + "description" : "Update a connector", + "operationId" : "UpdateConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorUpdate" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Connector" + } + } + }, + "description" : "Update response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/connectors/{connector_id}/authenticate" : { + "delete" : { + "description" : "Revoke authentication for a given connector. Any syncs relying on this connector will stop running until the connector is reauthenticated or sync references are updated.", + "operationId" : "RevokeConnector", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/connectors/{connector_id}/authenticate/aws" : { + "patch" : { + "description" : "Complete authentication for the given AWS connector", + "operationId" : "AuthenticateConnectorFinishAWS", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthFinishRequestAWS" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Authentication is complete." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "post" : { + "description" : "Authenticate or reauthenticate the given AWS connector", + "operationId" : "AuthenticateConnectorAWS", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthRequestAWS" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseAWS" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/connectors/{connector_id}/authenticate/oauth" : { + "patch" : { + "description" : "Complete authentication for the given OAuth connector", + "operationId" : "AuthenticateConnectorFinishOAuth", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthFinishRequestOAuth" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Authentication is complete." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "post" : { + "description" : "Authenticate or reauthenticate the given OAuth connector", + "operationId" : "AuthenticateConnectorOAuth", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthRequestOAuth" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } @@ -6306,6 +6596,28 @@ "style" : "simple", "x-go-name" : "APIKeyID" }, + "sync_source_test_connection_id" : { + "explode" : false, + "in" : "path", + "name" : "sync_source_test_connection_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/SyncSourceTestConnectionID" + }, + "style" : "simple", + "x-go-name" : "SyncSourceTestConnectionID" + }, + "sync_destination_test_connection_id" : { + "explode" : false, + "in" : "path", + "name" : "sync_destination_test_connection_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationTestConnectionID" + }, + "style" : "simple", + "x-go-name" : "SyncDestinationTestConnectionID" + }, "sync_source_name" : { "explode" : false, "in" : "path", @@ -8338,230 +8650,559 @@ "example" : "admin", "type" : "string" }, - "team" : { - "$ref" : "#/components/schemas/Team" + "team" : { + "$ref" : "#/components/schemas/Team" + } + }, + "required" : [ "role" ], + "title" : "CloudQuery Team Membership" + }, + "TeamSubscriptionOrderID" : { + "description" : "ID of the team subscription order", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "TeamSubscriptionOrderID" + }, + "TeamSubscriptionOrderStatus" : { + "enum" : [ "pending", "completed", "cancelled" ], + "type" : "string" + }, + "TeamSubscriptionOrder" : { + "additionalProperties" : false, + "description" : "Team subscription order", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + }, + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "status" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderStatus" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completed_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completion_url" : { + "description" : "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", + "format" : "uri", + "type" : "string", + "x-go-name" : "CompletionURL" + } + }, + "required" : [ "created_at", "id", "plan", "status", "team_name", "updated_at" ], + "title" : "Team subscription order" + }, + "TeamSubscriptionOrderCreate" : { + "additionalProperties" : false, + "description" : "Create team subscription order", + "properties" : { + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "success_url" : { + "description" : "URL to redirect to after successful order completion", + "example" : "https://cloud.cloudquery.io/order-completion", + "type" : "string" + }, + "cancel_url" : { + "description" : "URL to redirect to after order cancellation", + "example" : "https://cloud.cloudquery.io/order-cancelled", + "type" : "string" + } + }, + "required" : [ "cancel_url", "plan", "success_url" ], + "title" : "Create team subscription order" + }, + "InvitationWithToken" : { + "additionalProperties" : false, + "allOf" : [ { + "$ref" : "#/components/schemas/Invitation" + }, { + "properties" : { + "token" : { + "description" : "The token used to accept the invitation", + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "token" ] + } ] + }, + "UserID" : { + "description" : "ID of the User", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "UserID" + }, + "APIKeyName" : { + "description" : "Name of the API key", + "example" : "cli-api-key", + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$", + "type" : "string" + }, + "APIKeyID" : { + "description" : "ID of the API key", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "APIKeyID" + }, + "APIKeyScope" : { + "description" : "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", + "enum" : [ "read-and-write" ], + "type" : "string" + }, + "APIKey" : { + "description" : "API Key to interact with CloudQuery Cloud under specific team", + "properties" : { + "name" : { + "$ref" : "#/components/schemas/APIKeyName" + }, + "created_by" : { + "description" : "email of the user that created the API key", + "example" : "user@example.com", + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/APIKeyID" + }, + "key" : { + "description" : "API key. Will be shown only in the response when creating the key.", + "example" : "1234567890abcdef1234567890abcdef", + "type" : "string" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "expires_at" : { + "description" : "Timestamp at which API key will stop working", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "expired" : { + "description" : "Whether the API key has expired or not", + "example" : false, + "type" : "boolean" + }, + "scope" : { + "$ref" : "#/components/schemas/APIKeyScope" + } + }, + "required" : [ "expired", "expires_at", "id", "name", "scope" ] + }, + "RegistryAuthToken" : { + "additionalProperties" : false, + "description" : "JWT token for the image registry", + "properties" : { + "access_token" : { + "type" : "string" + }, + "token" : { + "type" : "string" + } + }, + "required" : [ "access_token", "token" ] + }, + "DockerError" : { + "additionalProperties" : false, + "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry", + "properties" : { + "details" : { + "type" : "string" + } + }, + "required" : [ "details" ], + "title" : "Docker Error" + }, + "SyncPluginPath" : { + "description" : "Plugin path in CloudQuery registry", + "pattern" : "^cloudquery/[^/]+", + "type" : "string" + }, + "SyncEnvCreate" : { + "description" : "Environment variable. Environment variables are assumed to be secret.", + "properties" : { + "name" : { + "description" : "Name of the environment variable", + "type" : "string" + }, + "value" : { + "description" : "Value of the environment variable", + "type" : "string" + } + }, + "required" : [ "name" ] + }, + "ConnectorID" : { + "description" : "ID of the Connector", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ConnectorID" + }, + "SyncSourceTestConnectionCreate" : { + "properties" : { + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "source_name" : { + "description" : "Name of an existing source", + "type" : "string" + }, + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", + "type" : "string" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" } }, - "required" : [ "role" ], - "title" : "CloudQuery Team Membership" + "required" : [ "path", "version" ], + "title" : "Sync Source Test Connection creation definition" }, - "TeamSubscriptionOrderID" : { - "description" : "ID of the team subscription order", + "SyncTestConnectionID" : { + "description" : "unique ID of the test connection", "example" : "12345678-1234-1234-1234-1234567890ab", "format" : "uuid", "type" : "string", - "x-go-name" : "TeamSubscriptionOrderID" + "x-go-name" : "ID" }, - "TeamSubscriptionOrderStatus" : { - "enum" : [ "pending", "completed", "cancelled" ], + "SyncTestConnectionStatus" : { + "description" : "The status of the sync run", + "enum" : [ "completed", "failed", "started", "created" ], "type" : "string" }, - "TeamSubscriptionOrder" : { - "additionalProperties" : false, - "description" : "Team subscription order", + "SyncSourceTestConnection" : { "properties" : { "id" : { - "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + "$ref" : "#/components/schemas/SyncTestConnectionID" }, - "team_name" : { - "$ref" : "#/components/schemas/TeamName" + "status" : { + "$ref" : "#/components/schemas/SyncTestConnectionStatus" }, - "plan" : { - "$ref" : "#/components/schemas/TeamPlan" + "failure_reason" : { + "description" : "Reason for failure", + "example" : "password authentication failed for user \"exampleuser\"", + "type" : "string" }, - "status" : { - "$ref" : "#/components/schemas/TeamSubscriptionOrderStatus" + "failure_code" : { + "description" : "Code for failure", + "example" : "INVALID_CREDENTIALS", + "type" : "string" }, "created_at" : { + "description" : "Time the test connection was created", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "updated_at" : { + "completed_at" : { + "description" : "Time the test connection was completed", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "completed_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "plugin_path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "plugin_version" : { + "$ref" : "#/components/schemas/VersionName" + } + }, + "required" : [ "created_at", "id", "status" ] + }, + "SyncSourceTestConnectionID" : { + "description" : "ID of the Sync Source Test Connection", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "SyncSourceTestConnectionID" + }, + "PromoteSyncSourceTestConnection" : { + "description" : "Sync Source Definition", + "properties" : { + "name" : { + "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-source-definition", + "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, - "completion_url" : { - "description" : "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", - "format" : "uri", - "type" : "string", - "x-go-name" : "CompletionURL" + "tables" : { + "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "skip_tables" : { + "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items" : { + "type" : "string" + }, + "type" : "array" } }, - "required" : [ "created_at", "id", "plan", "status", "team_name", "updated_at" ], - "title" : "Team subscription order" + "required" : [ "name", "tables" ], + "title" : "Sync Source definition for creating a new source" }, - "TeamSubscriptionOrderCreate" : { - "additionalProperties" : false, - "description" : "Create team subscription order", + "SyncLastUpdateSource" : { + "description" : "How was the source or destination been created or updated last", + "enum" : [ "yaml", "ui" ], + "type" : "string" + }, + "SyncSourceCreate" : { + "description" : "Sync Source Definition", "properties" : { - "plan" : { - "$ref" : "#/components/schemas/TeamPlan" + "name" : { + "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-source-definition", + "pattern" : "^[a-zA-Z0-9_-]+$", + "type" : "string" }, - "success_url" : { - "description" : "URL to redirect to after successful order completion", - "example" : "https://cloud.cloudquery.io/order-completion", + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", "type" : "string" }, - "cancel_url" : { - "description" : "URL to redirect to after order cancellation", - "example" : "https://cloud.cloudquery.io/order-cancelled", + "tables" : { + "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "skip_tables" : { + "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" + } + }, + "required" : [ "name", "path", "tables", "version" ], + "title" : "Sync Source definition for creating a new source" + }, + "SyncEnv" : { + "description" : "Environment variable. Environment variables are assumed to be secret.", + "properties" : { + "name" : { + "description" : "Name of the environment variable", "type" : "string" } }, - "required" : [ "cancel_url", "plan", "success_url" ], - "title" : "Create team subscription order" + "required" : [ "name" ] }, - "InvitationWithToken" : { - "additionalProperties" : false, + "SyncSource" : { "allOf" : [ { - "$ref" : "#/components/schemas/Invitation" + "$ref" : "#/components/schemas/SyncSourceCreate" }, { "properties" : { - "token" : { - "description" : "The token used to accept the invitation", - "format" : "uuid", + "created_at" : { + "description" : "Time when the source was created", + "example" : "2023-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "description" : "Time when the source was last updated", + "example" : "2023-07-14T16:53:42Z", + "format" : "date-time", "type" : "string" + }, + "env" : { + "description" : "Environment variables for the plugin.", + "items" : { + "$ref" : "#/components/schemas/SyncEnv" + }, + "type" : "array" + }, + "draft" : { + "description" : "If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", + "type" : "boolean" } }, - "required" : [ "token" ] + "required" : [ "created_at", "draft", "env", "updated_at" ] } ] }, - "UserID" : { - "description" : "ID of the User", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "UserID" - }, - "APIKeyName" : { - "description" : "Name of the API key", - "example" : "cli-api-key", - "maxLength" : 255, - "minLength" : 1, - "pattern" : "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$", + "SyncDestinationWriteMode" : { + "default" : "overwrite-delete-stale", + "description" : "Write mode for the destination", + "enum" : [ "append", "overwrite", "overwrite-delete-stale" ], "type" : "string" }, - "APIKeyID" : { - "description" : "ID of the API key", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "APIKeyID" - }, - "APIKeyScope" : { - "description" : "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", - "enum" : [ "read-and-write" ], + "SyncDestinationMigrateMode" : { + "default" : "safe", + "description" : "Migrate mode for the destination", + "enum" : [ "safe", "forced" ], "type" : "string" }, - "APIKey" : { - "description" : "API Key to interact with CloudQuery Cloud under specific team", + "SyncDestinationTestConnectionCreate" : { + "properties" : { + "path" : { + "$ref" : "#/components/schemas/SyncPluginPath" + }, + "destination_name" : { + "description" : "Name of an existing destination", + "type" : "string" + }, + "version" : { + "description" : "Version of the plugin", + "example" : "v1.2.3", + "type" : "string" + }, + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" + }, + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + }, + "type" : "array" + }, + "connector_id" : { + "$ref" : "#/components/schemas/ConnectorID" + } + }, + "required" : [ "path", "version" ], + "title" : "Sync Destination Test Connection creation definition" + }, + "SyncDestinationTestConnection" : { "properties" : { - "name" : { - "$ref" : "#/components/schemas/APIKeyName" + "id" : { + "$ref" : "#/components/schemas/SyncTestConnectionID" }, - "created_by" : { - "description" : "email of the user that created the API key", - "example" : "user@example.com", - "type" : "string" + "status" : { + "$ref" : "#/components/schemas/SyncTestConnectionStatus" }, - "id" : { - "$ref" : "#/components/schemas/APIKeyID" + "failure_reason" : { + "description" : "Reason for failure", + "example" : "password authentication failed for user \"exampleuser\"", + "type" : "string" }, - "key" : { - "description" : "API key. Will be shown only in the response when creating the key.", - "example" : "1234567890abcdef1234567890abcdef", + "failure_code" : { + "description" : "Code for failure", + "example" : "INVALID_CREDENTIALS", "type" : "string" }, "created_at" : { + "description" : "Time the test connection was created", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "expires_at" : { - "description" : "Timestamp at which API key will stop working", + "completed_at" : { + "description" : "Time the test connection was completed", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "expired" : { - "description" : "Whether the API key has expired or not", - "example" : false, - "type" : "boolean" - }, - "scope" : { - "$ref" : "#/components/schemas/APIKeyScope" - } - }, - "required" : [ "expired", "expires_at", "id", "name", "scope" ] - }, - "RegistryAuthToken" : { - "additionalProperties" : false, - "description" : "JWT token for the image registry", - "properties" : { - "access_token" : { - "type" : "string" + "plugin_path" : { + "$ref" : "#/components/schemas/SyncPluginPath" }, - "token" : { - "type" : "string" - } - }, - "required" : [ "access_token", "token" ] - }, - "DockerError" : { - "additionalProperties" : false, - "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry", - "properties" : { - "details" : { - "type" : "string" + "plugin_version" : { + "$ref" : "#/components/schemas/VersionName" } }, - "required" : [ "details" ], - "title" : "Docker Error" + "required" : [ "created_at", "id", "status" ] }, - "SyncPluginPath" : { - "description" : "Plugin path in CloudQuery registry", - "pattern" : "^cloudquery/[^/]+", - "type" : "string" + "SyncDestinationTestConnectionID" : { + "description" : "ID of the Sync Destination Test Connection", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "SyncDestinationTestConnectionID" }, - "SyncEnvCreate" : { - "description" : "Environment variable. Environment variables are assumed to be secret.", + "PromoteSyncDestinationTestConnection" : { + "description" : "Sync Destination Definition", "properties" : { "name" : { - "description" : "Name of the environment variable", + "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-destination-definition", + "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, - "value" : { - "description" : "Value of the environment variable", - "type" : "string" + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" + }, + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" } }, - "required" : [ "name" ] - }, - "SyncLastUpdateSource" : { - "description" : "How was the source or destination been created or updated last", - "enum" : [ "yaml", "ui" ], - "type" : "string" - }, - "ConnectorID" : { - "description" : "ID of the Connector", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ConnectorID" + "required" : [ "name" ], + "title" : "Sync Destination definition for creating a new source" }, - "SyncSourceCreate" : { - "description" : "Sync Source Definition", + "SyncDestinationCreate" : { + "description" : "Sync Destination Definition", "properties" : { "name" : { - "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-source-definition", + "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", + "example" : "my-destination-definition", "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, @@ -8573,19 +9214,11 @@ "example" : "v1.2.3", "type" : "string" }, - "tables" : { - "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", - "items" : { - "type" : "string" - }, - "type" : "array" + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" }, - "skip_tables" : { - "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", - "items" : { - "type" : "string" - }, - "type" : "array" + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" }, "spec" : { "additionalProperties" : false, @@ -8606,22 +9239,12 @@ "$ref" : "#/components/schemas/ConnectorID" } }, - "required" : [ "name", "path", "tables", "version" ], - "title" : "Sync Source definition for creating a new source" - }, - "SyncEnv" : { - "description" : "Environment variable. Environment variables are assumed to be secret.", - "properties" : { - "name" : { - "description" : "Name of the environment variable", - "type" : "string" - } - }, - "required" : [ "name" ] + "required" : [ "name", "path", "version" ], + "title" : "Sync Destination definition for creating a new destination" }, - "SyncSource" : { + "SyncDestination" : { "allOf" : [ { - "$ref" : "#/components/schemas/SyncSourceCreate" + "$ref" : "#/components/schemas/SyncDestinationCreate" }, { "properties" : { "created_at" : { @@ -8644,25 +9267,13 @@ "type" : "array" }, "draft" : { - "description" : "If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", + "description" : "If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", "type" : "boolean" } }, "required" : [ "created_at", "draft", "env", "updated_at" ] } ] }, - "SyncTestConnectionID" : { - "description" : "unique ID of the test connection", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ID" - }, - "SyncTestConnectionStatus" : { - "description" : "The status of the sync run", - "enum" : [ "completed", "failed", "started", "created" ], - "type" : "string" - }, "SyncTestConnection" : { "properties" : { "id" : { @@ -8780,95 +9391,6 @@ "required" : [ "path", "version" ], "title" : "Sync Test Connection creation definition" }, - "SyncDestinationWriteMode" : { - "default" : "overwrite-delete-stale", - "description" : "Write mode for the destination", - "enum" : [ "append", "overwrite", "overwrite-delete-stale" ], - "type" : "string" - }, - "SyncDestinationMigrateMode" : { - "default" : "safe", - "description" : "Migrate mode for the destination", - "enum" : [ "safe", "forced" ], - "type" : "string" - }, - "SyncDestinationCreate" : { - "description" : "Sync Destination Definition", - "properties" : { - "name" : { - "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-destination-definition", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" - }, - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", - "type" : "string" - }, - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" - }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" - }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - }, - "type" : "array" - }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" - }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" - } - }, - "required" : [ "name", "path", "version" ], - "title" : "Sync Destination definition for creating a new destination" - }, - "SyncDestination" : { - "allOf" : [ { - "$ref" : "#/components/schemas/SyncDestinationCreate" - }, { - "properties" : { - "created_at" : { - "description" : "Time when the source was created", - "example" : "2023-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "description" : "Time when the source was last updated", - "example" : "2023-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "env" : { - "description" : "Environment variables for the plugin.", - "items" : { - "$ref" : "#/components/schemas/SyncEnv" - }, - "type" : "array" - }, - "draft" : { - "description" : "If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", - "type" : "boolean" - } - }, - "required" : [ "created_at", "draft", "env", "updated_at" ] - } ] - }, "SyncDestinationUpdate" : { "description" : "Sync Destination Update Definition", "properties" : { From d3077102422d6fb3a837719bc2514e3ea583477b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 18 Jul 2024 05:24:34 -0400 Subject: [PATCH 190/343] fix: Generate CloudQuery Go API Client from `spec.json` (#200) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 54 +++++++++++++++++---------------------------------- spec.json | 10 ++++------ 2 files changed, 22 insertions(+), 42 deletions(-) diff --git a/models.gen.go b/models.gen.go index e14346a..d608ab8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -590,19 +590,16 @@ type ConnectorAuthFinishRequestAWS struct { // ConnectorAuthFinishRequestOAuth OAuth connector authentication request, filled in after the user has authenticated through OAuth type ConnectorAuthFinishRequestOAuth struct { - // AuthCode Auth code received from the OAuth provider - AuthCode interface{} `json:"auth_code"` - // BaseURL Base of the URL the callback url was constructed from BaseURL interface{} `json:"base_url"` // Env Environment variables used in the spec. - Env *interface{} `json:"env,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` + Env *interface{} `json:"env,omitempty"` - // State State value received from the OAuth provider - State *interface{} `json:"state,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + // ReturnURL URL the user was redirected to (including new parameter values) after the OAuth flow is complete + ReturnURL interface{} `json:"return_url"` + Spec *map[string]interface{} `json:"spec,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process @@ -3396,14 +3393,6 @@ func (a *ConnectorAuthFinishRequestOAuth) UnmarshalJSON(b []byte) error { return err } - if raw, found := object["auth_code"]; found { - err = json.Unmarshal(raw, &a.AuthCode) - if err != nil { - return fmt.Errorf("error reading 'auth_code': %w", err) - } - delete(object, "auth_code") - } - if raw, found := object["base_url"]; found { err = json.Unmarshal(raw, &a.BaseURL) if err != nil { @@ -3420,20 +3409,20 @@ func (a *ConnectorAuthFinishRequestOAuth) UnmarshalJSON(b []byte) error { delete(object, "env") } - if raw, found := object["spec"]; found { - err = json.Unmarshal(raw, &a.Spec) + if raw, found := object["return_url"]; found { + err = json.Unmarshal(raw, &a.ReturnURL) if err != nil { - return fmt.Errorf("error reading 'spec': %w", err) + return fmt.Errorf("error reading 'return_url': %w", err) } - delete(object, "spec") + delete(object, "return_url") } - if raw, found := object["state"]; found { - err = json.Unmarshal(raw, &a.State) + if raw, found := object["spec"]; found { + err = json.Unmarshal(raw, &a.Spec) if err != nil { - return fmt.Errorf("error reading 'state': %w", err) + return fmt.Errorf("error reading 'spec': %w", err) } - delete(object, "state") + delete(object, "spec") } if len(object) != 0 { @@ -3455,11 +3444,6 @@ func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) - object["auth_code"], err = json.Marshal(a.AuthCode) - if err != nil { - return nil, fmt.Errorf("error marshaling 'auth_code': %w", err) - } - object["base_url"], err = json.Marshal(a.BaseURL) if err != nil { return nil, fmt.Errorf("error marshaling 'base_url': %w", err) @@ -3472,6 +3456,11 @@ func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { } } + object["return_url"], err = json.Marshal(a.ReturnURL) + if err != nil { + return nil, fmt.Errorf("error marshaling 'return_url': %w", err) + } + if a.Spec != nil { object["spec"], err = json.Marshal(a.Spec) if err != nil { @@ -3479,13 +3468,6 @@ func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { } } - if a.State != nil { - object["state"], err = json.Marshal(a.State) - if err != nil { - return nil, fmt.Errorf("error marshaling 'state': %w", err) - } - } - for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { diff --git a/spec.json b/spec.json index 2725fe4..aaff1e4 100644 --- a/spec.json +++ b/spec.json @@ -10047,17 +10047,15 @@ "additionalProperties" : { }, "description" : "OAuth connector authentication request, filled in after the user has authenticated through OAuth", "properties" : { - "auth_code" : { - "description" : "Auth code received from the OAuth provider" + "return_url" : { + "description" : "URL the user was redirected to (including new parameter values) after the OAuth flow is complete", + "x-go-name" : "ReturnURL" }, "base_url" : { "description" : "Base of the URL the callback url was constructed from", "example" : "https://cloud.cloudquery.io/oauth", "x-go-name" : "BaseURL" }, - "state" : { - "description" : "State value received from the OAuth provider" - }, "spec" : { "additionalProperties" : false, "format" : "Plugin parameters, specific to each plugin", @@ -10070,7 +10068,7 @@ } } }, - "required" : [ "auth_code", "base_url" ] + "required" : [ "base_url", "return_url" ] }, "ListPluginNotificationRequests_200_response" : { "properties" : { From a2c07e196f223af9336298619195e3d335e6984e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 19 Jul 2024 04:34:40 -0400 Subject: [PATCH 191/343] fix: Generate CloudQuery Go API Client from `spec.json` (#201) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 28 +--------------------------- spec.json | 46 ---------------------------------------------- 2 files changed, 1 insertion(+), 73 deletions(-) diff --git a/models.gen.go b/models.gen.go index d608ab8..4b57412 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2096,25 +2096,12 @@ type SyncDestinationTestConnectionID = openapi_types.UUID // SyncDestinationUpdate Sync Destination Update Definition type SyncDestinationUpdate struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnvCreate `json:"env,omitempty"` - // LastUpdateSource How was the source or destination been created or updated last LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` // MigrateMode Migrate mode for the destination MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` - // Path Plugin path in CloudQuery registry - Path *SyncPluginPath `json:"path,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Version Version of the plugin - Version *string `json:"version,omitempty"` - // WriteMode Write mode for the destination WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } @@ -2364,27 +2351,14 @@ type SyncSourceTestConnectionID = openapi_types.UUID // SyncSourceUpdate Sync Source Update Definition type SyncSourceUpdate struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnvCreate `json:"env,omitempty"` - // LastUpdateSource How was the source or destination been created or updated last LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - // Path Plugin path in CloudQuery registry - Path *SyncPluginPath `json:"path,omitempty"` - // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables *[]string `json:"skip_tables,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` + SkipTables *[]string `json:"skip_tables,omitempty"` // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. Tables *[]string `json:"tables,omitempty"` - - // Version Version of the plugin - Version *string `json:"version,omitempty"` } // SyncSourceUpdateFromTestConnection Sync Source Update from Test Connection Definition diff --git a/spec.json b/spec.json index aaff1e4..d2a444c 100644 --- a/spec.json +++ b/spec.json @@ -9319,14 +9319,6 @@ "SyncSourceUpdate" : { "description" : "Sync Source Update Definition", "properties" : { - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", - "type" : "string" - }, "tables" : { "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items" : { @@ -9341,23 +9333,8 @@ }, "type" : "array" }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" - }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - }, - "type" : "array" - }, "last_update_source" : { "$ref" : "#/components/schemas/SyncLastUpdateSource" - }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" } }, "title" : "Sync Source definition for updating a source" @@ -9394,37 +9371,14 @@ "SyncDestinationUpdate" : { "description" : "Sync Destination Update Definition", "properties" : { - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", - "type" : "string" - }, "write_mode" : { "$ref" : "#/components/schemas/SyncDestinationWriteMode" }, "migrate_mode" : { "$ref" : "#/components/schemas/SyncDestinationMigrateMode" }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" - }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - }, - "type" : "array" - }, "last_update_source" : { "$ref" : "#/components/schemas/SyncLastUpdateSource" - }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" } }, "title" : "Sync Destination definition for updating a destination" From 1e442017426ca71e68703d5c4956c836307150ba Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 19 Jul 2024 05:18:32 -0400 Subject: [PATCH 192/343] chore(main): Release v1.12.3 (#199) --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c0058..790d678 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.12.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.2...v1.12.3) (2024-07-19) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#198](https://github.com/cloudquery/cloudquery-api-go/issues/198)) ([7045185](https://github.com/cloudquery/cloudquery-api-go/commit/7045185d92d7590880a563cf6c61112216cdbfaf)) +* Generate CloudQuery Go API Client from `spec.json` ([#200](https://github.com/cloudquery/cloudquery-api-go/issues/200)) ([d307710](https://github.com/cloudquery/cloudquery-api-go/commit/d3077102422d6fb3a837719bc2514e3ea583477b)) +* Generate CloudQuery Go API Client from `spec.json` ([#201](https://github.com/cloudquery/cloudquery-api-go/issues/201)) ([a2c07e1](https://github.com/cloudquery/cloudquery-api-go/commit/a2c07e196f223af9336298619195e3d335e6984e)) + ## [1.12.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.1...v1.12.2) (2024-07-17) From d3871d3c8feeeaace134ef32446b563068739330 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:01:03 -0400 Subject: [PATCH 193/343] fix: Generate CloudQuery Go API Client from `spec.json` (#202) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 27 +++++++++++++++++++++++++++ spec.json | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/models.gen.go b/models.gen.go index 4b57412..c08f353 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1918,6 +1918,9 @@ type Sync struct { // Disabled Whether the sync is disabled Disabled bool `json:"disabled"` + // Incremental Managed Sync Incremental Options definition + Incremental *SyncIncremental `json:"incremental,omitempty"` + // Memory Memory quota for the sync Memory string `json:"memory"` @@ -1943,6 +1946,9 @@ type SyncCreate struct { // Disabled Whether the sync is disabled Disabled *bool `json:"disabled,omitempty"` + // Incremental Managed Sync Incremental Options definition + Incremental *SyncIncremental `json:"incremental,omitempty"` + // Memory Memory quota for the sync Memory *string `json:"memory,omitempty"` @@ -2136,6 +2142,24 @@ type SyncEnvCreate struct { Value *string `json:"value,omitempty"` } +// SyncIncremental Managed Sync Incremental Options definition +type SyncIncremental struct { + // Destination Name of the destination in which to store incremental sync data + Destination string `json:"destination"` + + // Table Name of the table in which to store incremental sync data + Table string `json:"table"` +} + +// SyncIncrementalUpdate Managed Sync Incremental Options Update definition +type SyncIncrementalUpdate struct { + // Destination Name of the destination in which to store incremental sync data + Destination *string `json:"destination,omitempty"` + + // Table Name of the table in which to store incremental sync data + Table *string `json:"table,omitempty"` +} + // SyncLastUpdateSource How was the source or destination been created or updated last type SyncLastUpdateSource string @@ -2437,6 +2461,9 @@ type SyncUpdate struct { // Env Environment variables for the sync Env *[]SyncEnv `json:"env,omitempty"` + // Incremental Managed Sync Incremental Options Update definition + Incremental *SyncIncrementalUpdate `json:"incremental,omitempty"` + // Memory Memory quota for the sync Memory *string `json:"memory,omitempty"` diff --git a/spec.json b/spec.json index d2a444c..d74c310 100644 --- a/spec.json +++ b/spec.json @@ -9383,6 +9383,22 @@ }, "title" : "Sync Destination definition for updating a destination" }, + "SyncIncremental" : { + "description" : "Managed Sync Incremental Options definition", + "properties" : { + "table" : { + "description" : "Name of the table in which to store incremental sync data", + "pattern" : "^([a-zA-Z_][a-zA-Z0-9_]*)?$", + "type" : "string" + }, + "destination" : { + "description" : "Name of the destination in which to store incremental sync data", + "pattern" : "^([a-zA-Z][a-zA-Z0-9_-]*)?$", + "type" : "string" + } + }, + "required" : [ "destination", "table" ] + }, "Sync" : { "description" : "Managed Sync definition", "properties" : { @@ -9422,6 +9438,9 @@ "example" : "2Gi", "type" : "string" }, + "incremental" : { + "$ref" : "#/components/schemas/SyncIncremental" + }, "created_at" : { "description" : "Time when the sync was created", "format" : "date-time", @@ -9479,10 +9498,28 @@ "default" : "2Gi", "description" : "Memory quota for the sync", "type" : "string" + }, + "incremental" : { + "$ref" : "#/components/schemas/SyncIncremental" } }, "required" : [ "destinations", "name", "source" ] }, + "SyncIncrementalUpdate" : { + "description" : "Managed Sync Incremental Options Update definition", + "properties" : { + "table" : { + "description" : "Name of the table in which to store incremental sync data", + "pattern" : "^([a-zA-Z_][a-zA-Z0-9_]*)?$", + "type" : "string" + }, + "destination" : { + "description" : "Name of the destination in which to store incremental sync data", + "pattern" : "^([a-zA-Z][a-zA-Z0-9_-]*)?$", + "type" : "string" + } + } + }, "SyncUpdate" : { "description" : "Managed Sync definition", "properties" : { @@ -9526,6 +9563,9 @@ "default" : "2Gi", "description" : "Memory quota for the sync", "type" : "string" + }, + "incremental" : { + "$ref" : "#/components/schemas/SyncIncrementalUpdate" } } }, From 1c4be5bfdca67bc0b519c14fd2d8b9d3fc4e6cc4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 25 Jul 2024 03:58:44 -0400 Subject: [PATCH 194/343] fix: Generate CloudQuery Go API Client from `spec.json` (#204) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 6 ++ spec.json | 46 +++++++++++++++ 3 files changed, 208 insertions(+) diff --git a/client.gen.go b/client.gen.go index bc2d02b..5f65ea7 100644 --- a/client.gen.go +++ b/client.gen.go @@ -325,6 +325,9 @@ type ClientInterface interface { // RevokeConnector request RevokeConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetConnectorAuthStatusAWS request + GetConnectorAuthStatusAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthenticateConnectorFinishAWSWithBody request with any body AuthenticateConnectorFinishAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1676,6 +1679,18 @@ func (c *Client) RevokeConnector(ctx context.Context, teamName TeamName, connect return c.Client.Do(req) } +func (c *Client) GetConnectorAuthStatusAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetConnectorAuthStatusAWSRequest(c.Server, teamName, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) AuthenticateConnectorFinishAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthenticateConnectorFinishAWSRequestWithBody(c.Server, teamName, connectorID, contentType, body) if err != nil { @@ -6918,6 +6933,47 @@ func NewRevokeConnectorRequest(server string, teamName TeamName, connectorID Con return req, nil } +// NewGetConnectorAuthStatusAWSRequest generates requests for GetConnectorAuthStatusAWS +func NewGetConnectorAuthStatusAWSRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/aws", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewAuthenticateConnectorFinishAWSRequest calls the generic AuthenticateConnectorFinishAWS builder with application/json body func NewAuthenticateConnectorFinishAWSRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -11789,6 +11845,9 @@ type ClientWithResponsesInterface interface { // RevokeConnectorWithResponse request RevokeConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*RevokeConnectorResponse, error) + // GetConnectorAuthStatusAWSWithResponse request + GetConnectorAuthStatusAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusAWSResponse, error) + // AuthenticateConnectorFinishAWSWithBodyWithResponse request with any body AuthenticateConnectorFinishAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) @@ -13724,6 +13783,33 @@ func (r RevokeConnectorResponse) StatusCode() int { return 0 } +type GetConnectorAuthStatusAWSResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetConnectorAuthStatusAWS200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetConnectorAuthStatusAWSResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetConnectorAuthStatusAWSResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type AuthenticateConnectorFinishAWSResponse struct { Body []byte HTTPResponse *http.Response @@ -16736,6 +16822,15 @@ func (c *ClientWithResponses) RevokeConnectorWithResponse(ctx context.Context, t return ParseRevokeConnectorResponse(rsp) } +// GetConnectorAuthStatusAWSWithResponse request returning *GetConnectorAuthStatusAWSResponse +func (c *ClientWithResponses) GetConnectorAuthStatusAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusAWSResponse, error) { + rsp, err := c.GetConnectorAuthStatusAWS(ctx, teamName, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetConnectorAuthStatusAWSResponse(rsp) +} + // AuthenticateConnectorFinishAWSWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishAWSResponse func (c *ClientWithResponses) AuthenticateConnectorFinishAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) { rsp, err := c.AuthenticateConnectorFinishAWSWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) @@ -21084,6 +21179,67 @@ func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, return response, nil } +// ParseGetConnectorAuthStatusAWSResponse parses an HTTP response from a GetConnectorAuthStatusAWSWithResponse call +func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAuthStatusAWSResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetConnectorAuthStatusAWSResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetConnectorAuthStatusAWS200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseAuthenticateConnectorFinishAWSResponse parses an HTTP response from a AuthenticateConnectorFinishAWSWithResponse call func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*AuthenticateConnectorFinishAWSResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index c08f353..13f1f46 100644 --- a/models.gen.go +++ b/models.gen.go @@ -857,6 +857,12 @@ type FinalizePluginUIAssetUploadRequest struct { UIID string `json:"ui_id"` } +// GetConnectorAuthStatusAWS200Response defines model for GetConnectorAuthStatusAWS_200_response. +type GetConnectorAuthStatusAWS200Response struct { + // RoleARN ARN of role created by the user + RoleARN *string `json:"role_arn,omitempty"` +} + // GetCurrentUserMemberships200Response defines model for GetCurrentUserMemberships_200_response. type GetCurrentUserMemberships200Response struct { Items []MembershipWithTeam `json:"items"` diff --git a/spec.json b/spec.json index d74c310..cb4fd3e 100644 --- a/spec.json +++ b/spec.json @@ -6167,6 +6167,43 @@ } }, "/teams/{team_name}/connectors/{connector_id}/authenticate/aws" : { + "get" : { + "description" : "Get authentication status for the given AWS connector", + "operationId" : "GetConnectorAuthStatusAWS", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetConnectorAuthStatusAWS_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, "patch" : { "description" : "Complete authentication for the given AWS connector", "operationId" : "AuthenticateConnectorFinishAWS", @@ -10889,6 +10926,15 @@ }, "required" : [ "items", "metadata" ] }, + "GetConnectorAuthStatusAWS_200_response" : { + "properties" : { + "role_arn" : { + "description" : "ARN of role created by the user", + "type" : "string", + "x-go-name" : "RoleARN" + } + } + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From 3cd27b8898f02b7e41cef5f16886e81a75b73765 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:08:53 -0400 Subject: [PATCH 195/343] fix: Generate CloudQuery Go API Client from `spec.json` (#206) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ++++++ spec.json | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/models.gen.go b/models.gen.go index 13f1f46..4a85ee1 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1549,6 +1549,9 @@ type PluginTableCreate struct { // Parent Name of the parent table, if any Parent *string `json:"parent,omitempty"` + // PermissionsNeeded List of permissions needed to access this table, if any + PermissionsNeeded *[]string `json:"permissions_needed,omitempty"` + // Relations Names of the tables that depend on this table Relations *[]string `json:"relations,omitempty"` @@ -1576,6 +1579,9 @@ type PluginTableDetails struct { // Parent Name of the parent table, if any Parent *string `json:"parent,omitempty"` + // PermissionsNeeded List of permissions needed to access this table, if any + PermissionsNeeded []string `json:"permissions_needed"` + // Relations Names of the tables that depend on this table Relations []string `json:"relations"` diff --git a/spec.json b/spec.json index cb4fd3e..0125e9c 100644 --- a/spec.json +++ b/spec.json @@ -7633,6 +7633,14 @@ }, "type" : "array" }, + "permissions_needed" : { + "description" : "List of permissions needed to access this table, if any", + "example" : [ "storage.buckets.list" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, "title" : { "description" : "Title of the table", "example" : "AWS S3 Buckets", @@ -7692,9 +7700,17 @@ "is_paid" : { "description" : "Whether the table is paid", "type" : "boolean" + }, + "permissions_needed" : { + "description" : "List of permissions needed to access this table, if any", + "example" : [ "storage.buckets.list" ], + "items" : { + "type" : "string" + }, + "type" : "array" } }, - "required" : [ "columns", "description", "is_incremental", "name", "relations", "title" ] + "required" : [ "columns", "description", "is_incremental", "name", "permissions_needed", "relations", "title" ] }, "PluginAsset" : { "additionalProperties" : false, From 8e16e7035b7878bf0924246d51ee862581471d08 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:41:38 -0400 Subject: [PATCH 196/343] chore(main): Release v1.12.4 (#203) :robot: I have created a release *beep* *boop* --- ## [1.12.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.3...v1.12.4) (2024-07-29) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#202](https://github.com/cloudquery/cloudquery-api-go/issues/202)) ([d3871d3](https://github.com/cloudquery/cloudquery-api-go/commit/d3871d3c8feeeaace134ef32446b563068739330)) * Generate CloudQuery Go API Client from `spec.json` ([#204](https://github.com/cloudquery/cloudquery-api-go/issues/204)) ([1c4be5b](https://github.com/cloudquery/cloudquery-api-go/commit/1c4be5bfdca67bc0b519c14fd2d8b9d3fc4e6cc4)) * Generate CloudQuery Go API Client from `spec.json` ([#206](https://github.com/cloudquery/cloudquery-api-go/issues/206)) ([3cd27b8](https://github.com/cloudquery/cloudquery-api-go/commit/3cd27b8898f02b7e41cef5f16886e81a75b73765)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 790d678..7b0ea31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.12.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.3...v1.12.4) (2024-07-29) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#202](https://github.com/cloudquery/cloudquery-api-go/issues/202)) ([d3871d3](https://github.com/cloudquery/cloudquery-api-go/commit/d3871d3c8feeeaace134ef32446b563068739330)) +* Generate CloudQuery Go API Client from `spec.json` ([#204](https://github.com/cloudquery/cloudquery-api-go/issues/204)) ([1c4be5b](https://github.com/cloudquery/cloudquery-api-go/commit/1c4be5bfdca67bc0b519c14fd2d8b9d3fc4e6cc4)) +* Generate CloudQuery Go API Client from `spec.json` ([#206](https://github.com/cloudquery/cloudquery-api-go/issues/206)) ([3cd27b8](https://github.com/cloudquery/cloudquery-api-go/commit/3cd27b8898f02b7e41cef5f16886e81a75b73765)) + ## [1.12.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.2...v1.12.3) (2024-07-19) From ac1f821d8a6ee9a28014131818f5f579b3fb28ff Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jul 2024 05:16:40 -0400 Subject: [PATCH 197/343] fix: Generate CloudQuery Go API Client from `spec.json` (#207) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 5648 +++++++++++++++---------------------------------- models.gen.go | 100 - spec.json | 877 +------- 3 files changed, 1764 insertions(+), 4861 deletions(-) diff --git a/client.gen.go b/client.gen.go index 5f65ea7..e2d0a87 100644 --- a/client.gen.go +++ b/client.gen.go @@ -457,16 +457,6 @@ type ClientInterface interface { // ListSyncDestinations request ListSyncDestinations(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSyncDestinationWithBody request with any body - CreateSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSyncDestination(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // TestSyncDestinationWithBody request with any body - TestSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - TestSyncDestination(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteSyncDestination request DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -478,17 +468,9 @@ type ClientInterface interface { UpdateSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateTestConnectionForSyncDestinationWithBody request with any body - CreateTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetTestConnectionForSyncDestination request GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) - // PromoteTestConnectionForSyncDestination request - PromoteTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSyncSourceTestConnectionWithBody request with any body CreateSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -505,16 +487,6 @@ type ClientInterface interface { // ListSyncSources request ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSyncSourceWithBody request with any body - CreateSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSyncSource(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // TestSyncSourceWithBody request with any body - TestSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - TestSyncSource(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteSyncSource request DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -526,17 +498,9 @@ type ClientInterface interface { UpdateSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateTestConnectionForSyncSourceWithBody request with any body - CreateTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetTestConnectionForSyncSource request GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) - // PromoteTestConnectionForSyncSource request - PromoteTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListSyncs request ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -559,26 +523,6 @@ type ClientInterface interface { // GetTestConnectionConnectorIdentity request GetTestConnectionConnectorIdentity(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSyncDestinationFromTestConnectionWithBody request with any body - CreateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSyncSourceFromTestConnectionWithBody request with any body - CreateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncDestinationFromTestConnectionWithBody request with any body - UpdateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncSourceFromTestConnectionWithBody request with any body - UpdateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteSync request DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2267,54 +2211,6 @@ func (c *Client) ListSyncDestinations(ctx context.Context, teamName TeamName, pa return c.Client.Do(req) } -func (c *Client) CreateSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncDestinationRequestWithBody(c.Server, teamName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSyncDestination(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncDestinationRequest(c.Server, teamName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) TestSyncDestinationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewTestSyncDestinationRequestWithBody(c.Server, teamName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) TestSyncDestination(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewTestSyncDestinationRequest(c.Server, teamName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncDestinationRequest(c.Server, teamName, syncDestinationName) if err != nil { @@ -2363,30 +2259,6 @@ func (c *Client) UpdateSyncDestination(ctx context.Context, teamName TeamName, s return c.Client.Do(req) } -func (c *Client) CreateTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTestConnectionForSyncDestinationRequestWithBody(c.Server, teamName, syncDestinationName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, syncTestConnectionId) if err != nil { @@ -2399,18 +2271,6 @@ func (c *Client) GetTestConnectionForSyncDestination(ctx context.Context, teamNa return c.Client.Do(req) } -func (c *Client) PromoteTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPromoteTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, syncTestConnectionId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) CreateSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateSyncSourceTestConnectionRequestWithBody(c.Server, teamName, contentType, body) if err != nil { @@ -2483,54 +2343,6 @@ func (c *Client) ListSyncSources(ctx context.Context, teamName TeamName, params return c.Client.Do(req) } -func (c *Client) CreateSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncSourceRequestWithBody(c.Server, teamName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSyncSource(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncSourceRequest(c.Server, teamName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) TestSyncSourceWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewTestSyncSourceRequestWithBody(c.Server, teamName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) TestSyncSource(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewTestSyncSourceRequest(c.Server, teamName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncSourceRequest(c.Server, teamName, syncSourceName) if err != nil { @@ -2579,30 +2391,6 @@ func (c *Client) UpdateSyncSource(ctx context.Context, teamName TeamName, syncSo return c.Client.Do(req) } -func (c *Client) CreateTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTestConnectionForSyncSourceRequestWithBody(c.Server, teamName, syncSourceName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, syncTestConnectionId) if err != nil { @@ -2615,18 +2403,6 @@ func (c *Client) GetTestConnectionForSyncSource(ctx context.Context, teamName Te return c.Client.Do(req) } -func (c *Client) PromoteTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPromoteTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, syncTestConnectionId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSyncsRequest(c.Server, teamName, params) if err != nil { @@ -2723,102 +2499,6 @@ func (c *Client) GetTestConnectionConnectorIdentity(ctx context.Context, teamNam return c.Client.Do(req) } -func (c *Client) CreateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncDestinationFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncDestinationFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncSourceFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncSourceFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateSyncDestinationFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncDestinationFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, syncDestinationName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateSyncDestinationFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncDestinationFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, syncDestinationName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateSyncSourceFromTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncSourceFromTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, syncSourceName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateSyncSourceFromTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncSourceFromTestConnectionRequest(c.Server, teamName, syncTestConnectionId, syncSourceName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteSyncRequest(c.Server, teamName, syncName) if err != nil { @@ -8738,19 +8418,8 @@ func NewListSyncDestinationsRequest(server string, teamName TeamName, params *Li return req, nil } -// NewCreateSyncDestinationRequest calls the generic CreateSyncDestination builder with application/json body -func NewCreateSyncDestinationRequest(server string, teamName TeamName, body CreateSyncDestinationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateSyncDestinationRequestWithBody generates requests for CreateSyncDestination with any type of body -func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteSyncDestinationRequest generates requests for DeleteSyncDestination +func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { var err error var pathParam0 string @@ -8760,92 +8429,9 @@ func NewCreateSyncDestinationRequestWithBody(server string, teamName TeamName, c return nil, err } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewTestSyncDestinationRequest calls the generic TestSyncDestination builder with application/json body -func NewTestSyncDestinationRequest(server string, teamName TeamName, body TestSyncDestinationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewTestSyncDestinationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewTestSyncDestinationRequestWithBody generates requests for TestSyncDestination with any type of body -func NewTestSyncDestinationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/test", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteSyncDestinationRequest generates requests for DeleteSyncDestination -func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) if err != nil { return nil, err } @@ -8968,60 +8554,6 @@ func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, s return req, nil } -// NewCreateTestConnectionForSyncDestinationRequest calls the generic CreateTestConnectionForSyncDestination builder with application/json body -func NewCreateTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateTestConnectionForSyncDestinationRequestWithBody(server, teamName, syncDestinationName, "application/json", bodyReader) -} - -// NewCreateTestConnectionForSyncDestinationRequestWithBody generates requests for CreateTestConnectionForSyncDestination with any type of body -func NewCreateTestConnectionForSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/test-connections", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewGetTestConnectionForSyncDestinationRequest generates requests for GetTestConnectionForSyncDestination func NewGetTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { var err error @@ -9070,54 +8602,6 @@ func NewGetTestConnectionForSyncDestinationRequest(server string, teamName TeamN return req, nil } -// NewPromoteTestConnectionForSyncDestinationRequest generates requests for PromoteTestConnectionForSyncDestination -func NewPromoteTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/test-connections/%s/promote", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - // NewCreateSyncSourceTestConnectionRequest calls the generic CreateSyncSourceTestConnection builder with application/json body func NewCreateSyncSourceTestConnectionRequest(server string, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -9332,100 +8816,6 @@ func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyn return req, nil } -// NewCreateSyncSourceRequest calls the generic CreateSyncSource builder with application/json body -func NewCreateSyncSourceRequest(server string, teamName TeamName, body CreateSyncSourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateSyncSourceRequestWithBody generates requests for CreateSyncSource with any type of body -func NewCreateSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewTestSyncSourceRequest calls the generic TestSyncSource builder with application/json body -func NewTestSyncSourceRequest(server string, teamName TeamName, body TestSyncSourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewTestSyncSourceRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewTestSyncSourceRequestWithBody generates requests for TestSyncSource with any type of body -func NewTestSyncSourceRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-sources/test", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewDeleteSyncSourceRequest generates requests for DeleteSyncSource func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { var err error @@ -9562,60 +8952,6 @@ func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSo return req, nil } -// NewCreateTestConnectionForSyncSourceRequest calls the generic CreateTestConnectionForSyncSource builder with application/json body -func NewCreateTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateTestConnectionForSyncSourceRequestWithBody(server, teamName, syncSourceName, "application/json", bodyReader) -} - -// NewCreateTestConnectionForSyncSourceRequestWithBody generates requests for CreateTestConnectionForSyncSource with any type of body -func NewCreateTestConnectionForSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/test-connections", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewGetTestConnectionForSyncSourceRequest generates requests for GetTestConnectionForSyncSource func NewGetTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { var err error @@ -9664,54 +9000,6 @@ func NewGetTestConnectionForSyncSourceRequest(server string, teamName TeamName, return req, nil } -// NewPromoteTestConnectionForSyncSourceRequest generates requests for PromoteTestConnectionForSyncSource -func NewPromoteTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/test-connections/%s/promote", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - // NewListSyncsRequest generates requests for ListSyncs func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { var err error @@ -10022,19 +9310,8 @@ func NewGetTestConnectionConnectorIdentityRequest(server string, teamName TeamNa return req, nil } -// NewCreateSyncDestinationFromTestConnectionRequest calls the generic CreateSyncDestinationFromTestConnection builder with application/json body -func NewCreateSyncDestinationFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncDestinationFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) -} - -// NewCreateSyncDestinationFromTestConnectionRequestWithBody generates requests for CreateSyncDestinationFromTestConnection with any type of body -func NewCreateSyncDestinationFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteSyncRequest generates requests for DeleteSync +func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -10046,7 +9323,7 @@ func NewCreateSyncDestinationFromTestConnectionRequestWithBody(server string, te var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } @@ -10056,7 +9333,7 @@ func NewCreateSyncDestinationFromTestConnectionRequestWithBody(server string, te return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/new-destination", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10066,29 +9343,16 @@ func NewCreateSyncDestinationFromTestConnectionRequestWithBody(server string, te return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewCreateSyncSourceFromTestConnectionRequest calls the generic CreateSyncSourceFromTestConnection builder with application/json body -func NewCreateSyncSourceFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncSourceFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) -} - -// NewCreateSyncSourceFromTestConnectionRequestWithBody generates requests for CreateSyncSourceFromTestConnection with any type of body -func NewCreateSyncSourceFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { +// NewGetSyncRequest generates requests for GetSync +func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -10100,7 +9364,7 @@ func NewCreateSyncSourceFromTestConnectionRequestWithBody(server string, teamNam var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } @@ -10110,7 +9374,7 @@ func NewCreateSyncSourceFromTestConnectionRequestWithBody(server string, teamNam return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/new-source", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10120,29 +9384,27 @@ func NewCreateSyncSourceFromTestConnectionRequestWithBody(server string, teamNam return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewUpdateSyncDestinationFromTestConnectionRequest calls the generic UpdateSyncDestinationFromTestConnection builder with application/json body -func NewUpdateSyncDestinationFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body +func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncDestinationFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, syncDestinationName, "application/json", bodyReader) + return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) } -// NewUpdateSyncDestinationFromTestConnectionRequestWithBody generates requests for UpdateSyncDestinationFromTestConnection with any type of body -func NewUpdateSyncDestinationFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body +func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -10154,14 +9416,7 @@ func NewUpdateSyncDestinationFromTestConnectionRequestWithBody(server string, te var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } @@ -10171,7 +9426,7 @@ func NewUpdateSyncDestinationFromTestConnectionRequestWithBody(server string, te return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/update-destination/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10191,19 +9446,8 @@ func NewUpdateSyncDestinationFromTestConnectionRequestWithBody(server string, te return req, nil } -// NewUpdateSyncSourceFromTestConnectionRequest calls the generic UpdateSyncSourceFromTestConnection builder with application/json body -func NewUpdateSyncSourceFromTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncSourceFromTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, syncSourceName, "application/json", bodyReader) -} - -// NewUpdateSyncSourceFromTestConnectionRequestWithBody generates requests for UpdateSyncSourceFromTestConnection with any type of body -func NewUpdateSyncSourceFromTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { +// NewListSyncRunsRequest generates requests for ListSyncRuns +func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { var err error var pathParam0 string @@ -10215,14 +9459,7 @@ func NewUpdateSyncSourceFromTestConnectionRequestWithBody(server string, teamNam var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) if err != nil { return nil, err } @@ -10232,7 +9469,7 @@ func NewUpdateSyncSourceFromTestConnectionRequestWithBody(server string, teamNam return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/update-source/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10242,18 +9479,54 @@ func NewUpdateSyncSourceFromTestConnectionRequestWithBody(server string, teamNam return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteSyncRequest generates requests for DeleteSync -func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewCreateSyncRunRequest generates requests for CreateSyncRun +func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { var err error var pathParam0 string @@ -10275,7 +9548,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10285,7 +9558,7 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -10293,8 +9566,8 @@ func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) ( return req, nil } -// NewGetSyncRequest generates requests for GetSync -func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { +// NewGetSyncRunRequest generates requests for GetSyncRun +func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { var err error var pathParam0 string @@ -10311,12 +9584,19 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return nil, err } + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10334,19 +9614,19 @@ func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*ht return req, nil } -// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body -func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { +// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body +func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) + return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) } -// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body -func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body +func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -10363,12 +9643,19 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return nil, err } + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -10388,8 +9675,8 @@ func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName Syn return req, nil } -// NewListSyncRunsRequest generates requests for ListSyncRuns -func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { +// NewGetSyncRunConnectorCredentialsRequest generates requests for GetSyncRunConnectorCredentials +func NewGetSyncRunConnectorCredentialsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { var err error var pathParam0 string @@ -10406,245 +9693,16 @@ func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, return nil, err } - serverURL, err := url.Parse(server) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam3 string - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateSyncRunRequest generates requests for CreateSyncRun -func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetSyncRunRequest generates requests for GetSyncRun -func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body -func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) -} - -// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body -func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetSyncRunConnectorCredentialsRequest generates requests for GetSyncRunConnectorCredentials -func NewGetSyncRunConnectorCredentialsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) if err != nil { return nil, err } @@ -11977,16 +11035,6 @@ type ClientWithResponsesInterface interface { // ListSyncDestinationsWithResponse request ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) - // CreateSyncDestinationWithBodyWithResponse request with any body - CreateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) - - CreateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) - - // TestSyncDestinationWithBodyWithResponse request with any body - TestSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) - - TestSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) - // DeleteSyncDestinationWithResponse request DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) @@ -11998,17 +11046,9 @@ type ClientWithResponsesInterface interface { UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) - // CreateTestConnectionForSyncDestinationWithBodyWithResponse request with any body - CreateTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) - - CreateTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) - // GetTestConnectionForSyncDestinationWithResponse request GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) - // PromoteTestConnectionForSyncDestinationWithResponse request - PromoteTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncDestinationResponse, error) - // CreateSyncSourceTestConnectionWithBodyWithResponse request with any body CreateSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) @@ -12025,16 +11065,6 @@ type ClientWithResponsesInterface interface { // ListSyncSourcesWithResponse request ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) - // CreateSyncSourceWithBodyWithResponse request with any body - CreateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) - - CreateSyncSourceWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) - - // TestSyncSourceWithBodyWithResponse request with any body - TestSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) - - TestSyncSourceWithResponse(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) - // DeleteSyncSourceWithResponse request DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) @@ -12046,17 +11076,9 @@ type ClientWithResponsesInterface interface { UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) - // CreateTestConnectionForSyncSourceWithBodyWithResponse request with any body - CreateTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) - - CreateTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) - // GetTestConnectionForSyncSourceWithResponse request GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) - // PromoteTestConnectionForSyncSourceWithResponse request - PromoteTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncSourceResponse, error) - // ListSyncsWithResponse request ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) @@ -12079,26 +11101,6 @@ type ClientWithResponsesInterface interface { // GetTestConnectionConnectorIdentityWithResponse request GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) - // CreateSyncDestinationFromTestConnectionWithBodyWithResponse request with any body - CreateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) - - CreateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) - - // CreateSyncSourceFromTestConnectionWithBodyWithResponse request with any body - CreateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) - - CreateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) - - // UpdateSyncDestinationFromTestConnectionWithBodyWithResponse request with any body - UpdateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) - - UpdateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) - - // UpdateSyncSourceFromTestConnectionWithBodyWithResponse request with any body - UpdateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) - - UpdateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) - // DeleteSyncWithResponse request DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) @@ -14680,11 +13682,9 @@ func (r ListSyncDestinationsResponse) StatusCode() int { return 0 } -type CreateSyncDestinationResponse struct { +type DeleteSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncDestination - JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity @@ -14692,7 +13692,7 @@ type CreateSyncDestinationResponse struct { } // Status returns HTTPResponse.Status -func (r CreateSyncDestinationResponse) Status() string { +func (r DeleteSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14700,27 +13700,24 @@ func (r CreateSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncDestinationResponse) StatusCode() int { +func (r DeleteSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type TestSyncDestinationResponse struct { +type GetSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncTestConnection - JSON400 *BadRequest + JSON200 *SyncDestination JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r TestSyncDestinationResponse) Status() string { +func (r GetSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14728,16 +13725,18 @@ func (r TestSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r TestSyncDestinationResponse) StatusCode() int { +func (r GetSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSyncDestinationResponse struct { +type UpdateSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *SyncDestination + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity @@ -14745,7 +13744,7 @@ type DeleteSyncDestinationResponse struct { } // Status returns HTTPResponse.Status -func (r DeleteSyncDestinationResponse) Status() string { +func (r UpdateSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14753,24 +13752,25 @@ func (r DeleteSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncDestinationResponse) StatusCode() int { +func (r UpdateSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncDestinationResponse struct { +type GetTestConnectionForSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncDestination + JSON200 *SyncTestConnection + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncDestinationResponse) Status() string { +func (r GetTestConnectionForSyncDestinationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14778,26 +13778,27 @@ func (r GetSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncDestinationResponse) StatusCode() int { +func (r GetTestConnectionForSyncDestinationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncDestinationResponse struct { +type CreateSyncSourceTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncDestination + JSON201 *SyncSourceTestConnection JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncDestinationResponse) Status() string { +func (r CreateSyncSourceTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14805,27 +13806,25 @@ func (r UpdateSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncDestinationResponse) StatusCode() int { +func (r CreateSyncSourceTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTestConnectionForSyncDestinationResponse struct { +type GetSyncSourceTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncTestConnection - JSON400 *BadRequest + JSON200 *SyncSourceTestConnection JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateTestConnectionForSyncDestinationResponse) Status() string { +func (r GetSyncSourceTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14833,25 +13832,27 @@ func (r CreateTestConnectionForSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateTestConnectionForSyncDestinationResponse) StatusCode() int { +func (r GetSyncSourceTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTestConnectionForSyncDestinationResponse struct { +type PromoteSyncSourceTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncTestConnection + JSON200 *SyncSource + JSON201 *SyncSource JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetTestConnectionForSyncDestinationResponse) Status() string { +func (r PromoteSyncSourceTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14859,27 +13860,24 @@ func (r GetTestConnectionForSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionForSyncDestinationResponse) StatusCode() int { +func (r PromoteSyncSourceTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PromoteTestConnectionForSyncDestinationResponse struct { +type ListSyncSourcesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncDestination - JSON400 *BadRequest + JSON200 *ListSyncSources200Response JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r PromoteTestConnectionForSyncDestinationResponse) Status() string { +func (r ListSyncSourcesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14887,27 +13885,24 @@ func (r PromoteTestConnectionForSyncDestinationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PromoteTestConnectionForSyncDestinationResponse) StatusCode() int { +func (r ListSyncSourcesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncSourceTestConnectionResponse struct { +type DeleteSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncSourceTestConnection - JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncSourceTestConnectionResponse) Status() string { +func (r DeleteSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14915,25 +13910,24 @@ func (r CreateSyncSourceTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncSourceTestConnectionResponse) StatusCode() int { +func (r DeleteSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncSourceTestConnectionResponse struct { +type GetSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSourceTestConnection + JSON200 *SyncSource JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncSourceTestConnectionResponse) Status() string { +func (r GetSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14941,18 +13935,17 @@ func (r GetSyncSourceTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncSourceTestConnectionResponse) StatusCode() int { +func (r GetSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PromoteSyncSourceTestConnectionResponse struct { +type UpdateSyncSourceResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SyncSource - JSON201 *SyncSource JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -14961,7 +13954,7 @@ type PromoteSyncSourceTestConnectionResponse struct { } // Status returns HTTPResponse.Status -func (r PromoteSyncSourceTestConnectionResponse) Status() string { +func (r UpdateSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14969,24 +13962,25 @@ func (r PromoteSyncSourceTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PromoteSyncSourceTestConnectionResponse) StatusCode() int { +func (r UpdateSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSyncSourcesResponse struct { +type GetTestConnectionForSyncSourceResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListSyncSources200Response + JSON200 *SyncTestConnection + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSyncSourcesResponse) Status() string { +func (r GetTestConnectionForSyncSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -14994,26 +13988,24 @@ func (r ListSyncSourcesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSyncSourcesResponse) StatusCode() int { +func (r GetTestConnectionForSyncSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncSourceResponse struct { +type ListSyncsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncSource - JSON400 *BadRequest + JSON200 *ListSyncs200Response JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncSourceResponse) Status() string { +func (r ListSyncsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15021,27 +14013,25 @@ func (r CreateSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncSourceResponse) StatusCode() int { +func (r ListSyncsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type TestSyncSourceResponse struct { +type CreateSyncResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncTestConnection + JSON201 *Sync JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON404 *NotFound JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r TestSyncSourceResponse) Status() string { +func (r CreateSyncResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15049,24 +14039,24 @@ func (r TestSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r TestSyncSourceResponse) StatusCode() int { +func (r CreateSyncResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSyncSourceResponse struct { +type GetSyncTestConnectionResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *SyncTestConnection JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r DeleteSyncSourceResponse) Status() string { +func (r GetSyncTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15074,24 +14064,26 @@ func (r DeleteSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncSourceResponse) StatusCode() int { +func (r GetSyncTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncSourceResponse struct { +type UpdateSyncTestConnectionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource - JSON401 *RequiresAuthentication + JSON200 *SyncTestConnection + JSON400 *BadRequest + JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncSourceResponse) Status() string { +func (r UpdateSyncTestConnectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15099,17 +14091,17 @@ func (r GetSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncSourceResponse) StatusCode() int { +func (r UpdateSyncTestConnectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncSourceResponse struct { +type GetTestConnectionConnectorCredentialsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource + JSON200 *GetSyncRunConnectorCredentials200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -15118,7 +14110,7 @@ type UpdateSyncSourceResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateSyncSourceResponse) Status() string { +func (r GetTestConnectionConnectorCredentialsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15126,27 +14118,26 @@ func (r UpdateSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncSourceResponse) StatusCode() int { +func (r GetTestConnectionConnectorCredentialsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTestConnectionForSyncSourceResponse struct { +type GetTestConnectionConnectorIdentityResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncTestConnection + JSON200 *GetSyncRunConnectorIdentity200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateTestConnectionForSyncSourceResponse) Status() string { +func (r GetTestConnectionConnectorIdentityResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15154,17 +14145,16 @@ func (r CreateTestConnectionForSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateTestConnectionForSyncSourceResponse) StatusCode() int { +func (r GetTestConnectionConnectorIdentityResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTestConnectionForSyncSourceResponse struct { +type DeleteSyncResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncTestConnection JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -15172,7 +14162,7 @@ type GetTestConnectionForSyncSourceResponse struct { } // Status returns HTTPResponse.Status -func (r GetTestConnectionForSyncSourceResponse) Status() string { +func (r DeleteSyncResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15180,27 +14170,25 @@ func (r GetTestConnectionForSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionForSyncSourceResponse) StatusCode() int { +func (r DeleteSyncResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PromoteTestConnectionForSyncSourceResponse struct { +type GetSyncResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource + JSON200 *Sync JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r PromoteTestConnectionForSyncSourceResponse) Status() string { +func (r GetSyncResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15208,24 +14196,26 @@ func (r PromoteTestConnectionForSyncSourceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PromoteTestConnectionForSyncSourceResponse) StatusCode() int { +func (r GetSyncResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSyncsResponse struct { +type UpdateSyncResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListSyncs200Response - JSON401 *RequiresAuthentication + JSON200 *Sync + JSON400 *BadRequest + JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSyncsResponse) Status() string { +func (r UpdateSyncResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15233,25 +14223,24 @@ func (r ListSyncsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSyncsResponse) StatusCode() int { +func (r UpdateSyncResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncResponse struct { +type ListSyncRunsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *Sync - JSON400 *BadRequest + JSON200 *ListSyncRuns200Response JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity + JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncResponse) Status() string { +func (r ListSyncRunsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15259,24 +14248,25 @@ func (r CreateSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncResponse) StatusCode() int { +func (r ListSyncRunsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncTestConnectionResponse struct { +type CreateSyncRunResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncTestConnection + JSON201 *SyncRun + JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncTestConnectionResponse) Status() string { +func (r CreateSyncRunResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15284,26 +14274,24 @@ func (r GetSyncTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncTestConnectionResponse) StatusCode() int { +func (r CreateSyncRunResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncTestConnectionResponse struct { +type GetSyncRunResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncTestConnection - JSON400 *BadRequest - JSON403 *Forbidden + JSON200 *SyncRunDetails + JSON401 *RequiresAuthentication JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncTestConnectionResponse) Status() string { +func (r GetSyncRunResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15311,26 +14299,26 @@ func (r UpdateSyncTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncTestConnectionResponse) StatusCode() int { +func (r GetSyncRunResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTestConnectionConnectorCredentialsResponse struct { +type UpdateSyncRunResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorCredentials200Response + JSON200 *SyncRun JSON400 *BadRequest - JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetTestConnectionConnectorCredentialsResponse) Status() string { +func (r UpdateSyncRunResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15338,17 +14326,17 @@ func (r GetTestConnectionConnectorCredentialsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionConnectorCredentialsResponse) StatusCode() int { +func (r UpdateSyncRunResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTestConnectionConnectorIdentityResponse struct { +type GetSyncRunConnectorCredentialsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorIdentity200Response + JSON200 *GetSyncRunConnectorCredentials200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -15357,7 +14345,7 @@ type GetTestConnectionConnectorIdentityResponse struct { } // Status returns HTTPResponse.Status -func (r GetTestConnectionConnectorIdentityResponse) Status() string { +func (r GetSyncRunConnectorCredentialsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15365,17 +14353,17 @@ func (r GetTestConnectionConnectorIdentityResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionConnectorIdentityResponse) StatusCode() int { +func (r GetSyncRunConnectorCredentialsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncDestinationFromTestConnectionResponse struct { +type GetSyncRunConnectorIdentityResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncDestination + JSON200 *GetSyncRunConnectorIdentity200Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -15384,7 +14372,7 @@ type CreateSyncDestinationFromTestConnectionResponse struct { } // Status returns HTTPResponse.Status -func (r CreateSyncDestinationFromTestConnectionResponse) Status() string { +func (r GetSyncRunConnectorIdentityResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15392,17 +14380,17 @@ func (r CreateSyncDestinationFromTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncDestinationFromTestConnectionResponse) StatusCode() int { +func (r GetSyncRunConnectorIdentityResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncSourceFromTestConnectionResponse struct { +type GetSyncRunLogsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncSource + JSON200 *SyncRunLogs JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -15411,7 +14399,7 @@ type CreateSyncSourceFromTestConnectionResponse struct { } // Status returns HTTPResponse.Status -func (r CreateSyncSourceFromTestConnectionResponse) Status() string { +func (r GetSyncRunLogsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15419,17 +14407,16 @@ func (r CreateSyncSourceFromTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncSourceFromTestConnectionResponse) StatusCode() int { +func (r GetSyncRunLogsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncDestinationFromTestConnectionResponse struct { +type CreateSyncRunProgressResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncDestination JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound @@ -15438,7 +14425,7 @@ type UpdateSyncDestinationFromTestConnectionResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateSyncDestinationFromTestConnectionResponse) Status() string { +func (r CreateSyncRunProgressResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15446,26 +14433,25 @@ func (r UpdateSyncDestinationFromTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncDestinationFromTestConnectionResponse) StatusCode() int { +func (r CreateSyncRunProgressResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncSourceFromTestConnectionResponse struct { +type ListTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncSource - JSON400 *BadRequest + JSON200 *ListTeamPluginUsage200Response JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncSourceFromTestConnectionResponse) Status() string { +func (r ListTeamPluginUsageResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15473,24 +14459,26 @@ func (r UpdateSyncSourceFromTestConnectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncSourceFromTestConnectionResponse) StatusCode() int { +func (r ListTeamPluginUsageResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteSyncResponse struct { +type IncreaseTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response - JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError + JSON503 *ServiceUnavailable } // Status returns HTTPResponse.Status -func (r DeleteSyncResponse) Status() string { +func (r IncreaseTeamPluginUsageResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15498,25 +14486,27 @@ func (r DeleteSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncResponse) StatusCode() int { +func (r IncreaseTeamPluginUsageResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncResponse struct { +type GetTeamUsageSummaryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Sync + JSON200 *UsageSummary JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncResponse) Status() string { +func (r GetTeamUsageSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15524,18 +14514,19 @@ func (r GetSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncResponse) StatusCode() int { +func (r GetTeamUsageSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncResponse struct { +type GetGroupedTeamUsageSummaryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Sync + JSON200 *UsageSummary JSON400 *BadRequest + JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound JSON422 *UnprocessableEntity @@ -15543,7 +14534,7 @@ type UpdateSyncResponse struct { } // Status returns HTTPResponse.Status -func (r UpdateSyncResponse) Status() string { +func (r GetGroupedTeamUsageSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15551,24 +14542,25 @@ func (r UpdateSyncResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncResponse) StatusCode() int { +func (r GetGroupedTeamUsageSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSyncRunsResponse struct { +type GetTeamPluginUsageResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListSyncRuns200Response + JSON200 *UsageCurrent JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListSyncRunsResponse) Status() string { +func (r GetTeamPluginUsageResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15576,25 +14568,26 @@ func (r ListSyncRunsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSyncRunsResponse) StatusCode() int { +func (r GetTeamPluginUsageResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncRunResponse struct { +type ListUsersByTeamResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *SyncRun + JSON200 *ListUsersByTeam200Response JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity + JSON403 *Forbidden + JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncRunResponse) Status() string { +func (r ListUsersByTeamResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15602,24 +14595,22 @@ func (r CreateSyncRunResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncRunResponse) StatusCode() int { +func (r ListUsersByTeamResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncRunResponse struct { +type UploadImageResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncRunDetails - JSON401 *RequiresAuthentication - JSON404 *NotFound + JSON200 *ImageURL JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncRunResponse) Status() string { +func (r UploadImageResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15627,26 +14618,24 @@ func (r GetSyncRunResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunResponse) StatusCode() int { +func (r UploadImageResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateSyncRunResponse struct { +type GetCurrentUserResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncRun - JSON400 *BadRequest + JSON200 *User + JSON401 *RequiresAuthentication JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r UpdateSyncRunResponse) Status() string { +func (r GetCurrentUserResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15654,26 +14643,26 @@ func (r UpdateSyncRunResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncRunResponse) StatusCode() int { +func (r GetCurrentUserResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncRunConnectorCredentialsResponse struct { +type UpdateCurrentUserResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorCredentials200Response + JSON200 *User JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity + JSON403 *Forbidden + JSON405 *MethodNotAllowed JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncRunConnectorCredentialsResponse) Status() string { +func (r UpdateCurrentUserResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15681,26 +14670,22 @@ func (r GetSyncRunConnectorCredentialsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunConnectorCredentialsResponse) StatusCode() int { +func (r UpdateCurrentUserResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncRunConnectorIdentityResponse struct { +type ListCurrentUserInvitationsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorIdentity200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity + JSON200 *ListCurrentUserInvitations200Response JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncRunConnectorIdentityResponse) Status() string { +func (r ListCurrentUserInvitationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15708,26 +14693,24 @@ func (r GetSyncRunConnectorIdentityResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunConnectorIdentityResponse) StatusCode() int { +func (r ListCurrentUserInvitationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSyncRunLogsResponse struct { +type GetCurrentUserMembershipsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SyncRunLogs - JSON400 *BadRequest + JSON200 *GetCurrentUserMemberships200Response JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity + JSON403 *Forbidden JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r GetSyncRunLogsResponse) Status() string { +func (r GetCurrentUserMembershipsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15735,25 +14718,26 @@ func (r GetSyncRunLogsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunLogsResponse) StatusCode() int { +func (r GetCurrentUserMembershipsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateSyncRunProgressResponse struct { +type DeleteUserResponse struct { Body []byte HTTPResponse *http.Response JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON422 *UnprocessableEntity JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r CreateSyncRunProgressResponse) Status() string { +func (r DeleteUserResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15761,582 +14745,270 @@ func (r CreateSyncRunProgressResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncRunProgressResponse) StatusCode() int { +func (r DeleteUserResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListTeamPluginUsage200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// HealthCheckWithResponse request returning *HealthCheckResponse +func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { + rsp, err := c.HealthCheck(ctx, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseHealthCheckResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// ListAddonsWithResponse request returning *ListAddonsResponse +func (c *ClientWithResponses) ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) { + rsp, err := c.ListAddons(ctx, params, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseListAddonsResponse(rsp) } -type IncreaseTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError - JSON503 *ServiceUnavailable +// CreateAddonWithBodyWithResponse request with arbitrary body returning *CreateAddonResponse +func (c *ClientWithResponses) CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddonWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonResponse(rsp) } -// Status returns HTTPResponse.Status -func (r IncreaseTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddon(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreateAddonResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r IncreaseTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// DeleteAddonByTeamAndNameWithResponse request returning *DeleteAddonByTeamAndNameResponse +func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { + rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonType, addonName, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseDeleteAddonByTeamAndNameResponse(rsp) } -type GetTeamUsageSummaryResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageSummary - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError +// GetAddonWithResponse request returning *GetAddonResponse +func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { + rsp, err := c.GetAddon(ctx, teamName, addonType, addonName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetTeamUsageSummaryResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// UpdateAddonWithBodyWithResponse request with arbitrary body returning *UpdateAddonResponse +func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonType, addonName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseUpdateAddonResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamUsageSummaryResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddon(ctx, teamName, addonType, addonName, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseUpdateAddonResponse(rsp) } -type GetGroupedTeamUsageSummaryResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageSummary - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError +// ListAddonVersionsWithResponse request returning *ListAddonVersionsResponse +func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { + rsp, err := c.ListAddonVersions(ctx, teamName, addonType, addonName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonVersionsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetGroupedTeamUsageSummaryResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// GetAddonVersionWithResponse request returning *GetAddonVersionResponse +func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { + rsp, err := c.GetAddonVersion(ctx, teamName, addonType, addonName, versionName, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseGetAddonVersionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetGroupedTeamUsageSummaryResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// UpdateAddonVersionWithBodyWithResponse request with arbitrary body returning *UpdateAddonVersionResponse +func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseUpdateAddonVersionResponse(rsp) } -type GetTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageCurrent - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError +func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonVersionResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// CreateAddonVersionWithBodyWithResponse request with arbitrary body returning *CreateAddonVersionResponse +func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type ListUsersByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListUsersByTeam200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + return ParseCreateAddonVersionResponse(rsp) } -// Status returns HTTPResponse.Status -func (r ListUsersByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreateAddonVersionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListUsersByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse +func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { + rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, params, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type UploadImageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ImageURL - JSON500 *InternalError + return ParseDownloadAddonAssetResponse(rsp) } -// Status returns HTTPResponse.Status -func (r UploadImageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// UploadAddonAssetWithResponse request returning *UploadAddonAssetResponse +func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { + rsp, err := c.UploadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseUploadAddonAssetResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r UploadImageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// CQHealthCheckWithResponse request returning *CQHealthCheckResponse +func (c *ClientWithResponses) CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) { + rsp, err := c.CQHealthCheck(ctx, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type GetCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError + return ParseCQHealthCheckResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse +func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { + rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseListPluginNotificationRequestsResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// CreatePluginNotificationRequestWithBodyWithResponse request with arbitrary body returning *CreatePluginNotificationRequestResponse +func (c *ClientWithResponses) CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequestWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type UpdateCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON405 *MethodNotAllowed - JSON500 *InternalError + return ParseCreatePluginNotificationRequestResponse(rsp) } -// Status returns HTTPResponse.Status -func (r UpdateCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequest(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreatePluginNotificationRequestResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// DeletePluginNotificationRequestWithResponse request returning *DeletePluginNotificationRequestResponse +func (c *ClientWithResponses) DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) { + rsp, err := c.DeletePluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type ListCurrentUserInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListCurrentUserInvitations200Response - JSON500 *InternalError + return ParseDeletePluginNotificationRequestResponse(rsp) } -// Status returns HTTPResponse.Status -func (r ListCurrentUserInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// GetPluginNotificationRequestWithResponse request returning *GetPluginNotificationRequestResponse +func (c *ClientWithResponses) GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) { + rsp, err := c.GetPluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseGetPluginNotificationRequestResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListCurrentUserInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// ListPluginsWithResponse request returning *ListPluginsResponse +func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { + rsp, err := c.ListPlugins(ctx, params, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type GetCurrentUserMembershipsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetCurrentUserMemberships200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError + return ParseListPluginsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetCurrentUserMembershipsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse +func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreatePluginResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserMembershipsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePlugin(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return 0 -} - -type DeleteUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + return ParseCreatePluginResponse(rsp) } -// Status returns HTTPResponse.Status -func (r DeleteUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse +func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { + rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseDeletePluginByTeamAndPluginNameResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// GetPluginWithResponse request returning *GetPluginResponse +func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { + rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseGetPluginResponse(rsp) } -// HealthCheckWithResponse request returning *HealthCheckResponse -func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { - rsp, err := c.HealthCheck(ctx, reqEditors...) +// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse +func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseHealthCheckResponse(rsp) + return ParseUpdatePluginResponse(rsp) } -// ListAddonsWithResponse request returning *ListAddonsResponse -func (c *ClientWithResponses) ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) { - rsp, err := c.ListAddons(ctx, params, reqEditors...) +func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) if err != nil { return nil, err } - return ParseListAddonsResponse(rsp) + return ParseUpdatePluginResponse(rsp) } -// CreateAddonWithBodyWithResponse request with arbitrary body returning *CreateAddonResponse -func (c *ClientWithResponses) CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { - rsp, err := c.CreateAddonWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonResponse(rsp) -} - -func (c *ClientWithResponses) CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { - rsp, err := c.CreateAddon(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonResponse(rsp) -} - -// DeleteAddonByTeamAndNameWithResponse request returning *DeleteAddonByTeamAndNameResponse -func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { - rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonType, addonName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteAddonByTeamAndNameResponse(rsp) -} - -// GetAddonWithResponse request returning *GetAddonResponse -func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { - rsp, err := c.GetAddon(ctx, teamName, addonType, addonName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetAddonResponse(rsp) -} - -// UpdateAddonWithBodyWithResponse request with arbitrary body returning *UpdateAddonResponse -func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { - rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonType, addonName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonResponse(rsp) -} - -func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { - rsp, err := c.UpdateAddon(ctx, teamName, addonType, addonName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonResponse(rsp) -} - -// ListAddonVersionsWithResponse request returning *ListAddonVersionsResponse -func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { - rsp, err := c.ListAddonVersions(ctx, teamName, addonType, addonName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListAddonVersionsResponse(rsp) -} - -// GetAddonVersionWithResponse request returning *GetAddonVersionResponse -func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { - rsp, err := c.GetAddonVersion(ctx, teamName, addonType, addonName, versionName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetAddonVersionResponse(rsp) -} - -// UpdateAddonVersionWithBodyWithResponse request with arbitrary body returning *UpdateAddonVersionResponse -func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { - rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonVersionResponse(rsp) -} - -func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { - rsp, err := c.UpdateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonVersionResponse(rsp) -} - -// CreateAddonVersionWithBodyWithResponse request with arbitrary body returning *CreateAddonVersionResponse -func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { - rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonVersionResponse(rsp) -} - -func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { - rsp, err := c.CreateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonVersionResponse(rsp) -} - -// DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse -func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { - rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDownloadAddonAssetResponse(rsp) -} - -// UploadAddonAssetWithResponse request returning *UploadAddonAssetResponse -func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { - rsp, err := c.UploadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadAddonAssetResponse(rsp) -} - -// CQHealthCheckWithResponse request returning *CQHealthCheckResponse -func (c *ClientWithResponses) CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) { - rsp, err := c.CQHealthCheck(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseCQHealthCheckResponse(rsp) -} - -// ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse -func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { - rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginNotificationRequestsResponse(rsp) -} - -// CreatePluginNotificationRequestWithBodyWithResponse request with arbitrary body returning *CreatePluginNotificationRequestResponse -func (c *ClientWithResponses) CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { - rsp, err := c.CreatePluginNotificationRequestWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginNotificationRequestResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { - rsp, err := c.CreatePluginNotificationRequest(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginNotificationRequestResponse(rsp) -} - -// DeletePluginNotificationRequestWithResponse request returning *DeletePluginNotificationRequestResponse -func (c *ClientWithResponses) DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) { - rsp, err := c.DeletePluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginNotificationRequestResponse(rsp) -} - -// GetPluginNotificationRequestWithResponse request returning *GetPluginNotificationRequestResponse -func (c *ClientWithResponses) GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) { - rsp, err := c.GetPluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginNotificationRequestResponse(rsp) -} - -// ListPluginsWithResponse request returning *ListPluginsResponse -func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { - rsp, err := c.ListPlugins(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginsResponse(rsp) -} - -// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse -func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePlugin(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginResponse(rsp) -} - -// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse -func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { - rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginByTeamAndPluginNameResponse(rsp) -} - -// GetPluginWithResponse request returning *GetPluginResponse -func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { - rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginResponse(rsp) -} - -// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse -func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginResponse(rsp) -} - -func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginResponse(rsp) -} - -// DeletePluginUpcomingPriceChangesWithResponse request returning *DeletePluginUpcomingPriceChangesResponse -func (c *ClientWithResponses) DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) { - rsp, err := c.DeletePluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) +// DeletePluginUpcomingPriceChangesWithResponse request returning *DeletePluginUpcomingPriceChangesResponse +func (c *ClientWithResponses) DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) { + rsp, err := c.DeletePluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } @@ -17248,40 +15920,6 @@ func (c *ClientWithResponses) ListSyncDestinationsWithResponse(ctx context.Conte return ParseListSyncDestinationsResponse(rsp) } -// CreateSyncDestinationWithBodyWithResponse request with arbitrary body returning *CreateSyncDestinationResponse -func (c *ClientWithResponses) CreateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) { - rsp, err := c.CreateSyncDestinationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncDestinationResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationResponse, error) { - rsp, err := c.CreateSyncDestination(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncDestinationResponse(rsp) -} - -// TestSyncDestinationWithBodyWithResponse request with arbitrary body returning *TestSyncDestinationResponse -func (c *ClientWithResponses) TestSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) { - rsp, err := c.TestSyncDestinationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseTestSyncDestinationResponse(rsp) -} - -func (c *ClientWithResponses) TestSyncDestinationWithResponse(ctx context.Context, teamName TeamName, body TestSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncDestinationResponse, error) { - rsp, err := c.TestSyncDestination(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseTestSyncDestinationResponse(rsp) -} - // DeleteSyncDestinationWithResponse request returning *DeleteSyncDestinationResponse func (c *ClientWithResponses) DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) { rsp, err := c.DeleteSyncDestination(ctx, teamName, syncDestinationName, reqEditors...) @@ -17317,23 +15955,6 @@ func (c *ClientWithResponses) UpdateSyncDestinationWithResponse(ctx context.Cont return ParseUpdateSyncDestinationResponse(rsp) } -// CreateTestConnectionForSyncDestinationWithBodyWithResponse request with arbitrary body returning *CreateTestConnectionForSyncDestinationResponse -func (c *ClientWithResponses) CreateTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) { - rsp, err := c.CreateTestConnectionForSyncDestinationWithBody(ctx, teamName, syncDestinationName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTestConnectionForSyncDestinationResponse(rsp) -} - -func (c *ClientWithResponses) CreateTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body CreateTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncDestinationResponse, error) { - rsp, err := c.CreateTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTestConnectionForSyncDestinationResponse(rsp) -} - // GetTestConnectionForSyncDestinationWithResponse request returning *GetTestConnectionForSyncDestinationResponse func (c *ClientWithResponses) GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) { rsp, err := c.GetTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, syncTestConnectionId, reqEditors...) @@ -17343,15 +15964,6 @@ func (c *ClientWithResponses) GetTestConnectionForSyncDestinationWithResponse(ct return ParseGetTestConnectionForSyncDestinationResponse(rsp) } -// PromoteTestConnectionForSyncDestinationWithResponse request returning *PromoteTestConnectionForSyncDestinationResponse -func (c *ClientWithResponses) PromoteTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncDestinationResponse, error) { - rsp, err := c.PromoteTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, syncTestConnectionId, reqEditors...) - if err != nil { - return nil, err - } - return ParsePromoteTestConnectionForSyncDestinationResponse(rsp) -} - // CreateSyncSourceTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncSourceTestConnectionResponse func (c *ClientWithResponses) CreateSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) { rsp, err := c.CreateSyncSourceTestConnectionWithBody(ctx, teamName, contentType, body, reqEditors...) @@ -17404,40 +16016,6 @@ func (c *ClientWithResponses) ListSyncSourcesWithResponse(ctx context.Context, t return ParseListSyncSourcesResponse(rsp) } -// CreateSyncSourceWithBodyWithResponse request with arbitrary body returning *CreateSyncSourceResponse -func (c *ClientWithResponses) CreateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) { - rsp, err := c.CreateSyncSourceWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncSourceResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncSourceWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceResponse, error) { - rsp, err := c.CreateSyncSource(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncSourceResponse(rsp) -} - -// TestSyncSourceWithBodyWithResponse request with arbitrary body returning *TestSyncSourceResponse -func (c *ClientWithResponses) TestSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) { - rsp, err := c.TestSyncSourceWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseTestSyncSourceResponse(rsp) -} - -func (c *ClientWithResponses) TestSyncSourceWithResponse(ctx context.Context, teamName TeamName, body TestSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*TestSyncSourceResponse, error) { - rsp, err := c.TestSyncSource(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseTestSyncSourceResponse(rsp) -} - // DeleteSyncSourceWithResponse request returning *DeleteSyncSourceResponse func (c *ClientWithResponses) DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) { rsp, err := c.DeleteSyncSource(ctx, teamName, syncSourceName, reqEditors...) @@ -17473,23 +16051,6 @@ func (c *ClientWithResponses) UpdateSyncSourceWithResponse(ctx context.Context, return ParseUpdateSyncSourceResponse(rsp) } -// CreateTestConnectionForSyncSourceWithBodyWithResponse request with arbitrary body returning *CreateTestConnectionForSyncSourceResponse -func (c *ClientWithResponses) CreateTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) { - rsp, err := c.CreateTestConnectionForSyncSourceWithBody(ctx, teamName, syncSourceName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTestConnectionForSyncSourceResponse(rsp) -} - -func (c *ClientWithResponses) CreateTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body CreateTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestConnectionForSyncSourceResponse, error) { - rsp, err := c.CreateTestConnectionForSyncSource(ctx, teamName, syncSourceName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTestConnectionForSyncSourceResponse(rsp) -} - // GetTestConnectionForSyncSourceWithResponse request returning *GetTestConnectionForSyncSourceResponse func (c *ClientWithResponses) GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) { rsp, err := c.GetTestConnectionForSyncSource(ctx, teamName, syncSourceName, syncTestConnectionId, reqEditors...) @@ -17499,15 +16060,6 @@ func (c *ClientWithResponses) GetTestConnectionForSyncSourceWithResponse(ctx con return ParseGetTestConnectionForSyncSourceResponse(rsp) } -// PromoteTestConnectionForSyncSourceWithResponse request returning *PromoteTestConnectionForSyncSourceResponse -func (c *ClientWithResponses) PromoteTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*PromoteTestConnectionForSyncSourceResponse, error) { - rsp, err := c.PromoteTestConnectionForSyncSource(ctx, teamName, syncSourceName, syncTestConnectionId, reqEditors...) - if err != nil { - return nil, err - } - return ParsePromoteTestConnectionForSyncSourceResponse(rsp) -} - // ListSyncsWithResponse request returning *ListSyncsResponse func (c *ClientWithResponses) ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) { rsp, err := c.ListSyncs(ctx, teamName, params, reqEditors...) @@ -17578,74 +16130,6 @@ func (c *ClientWithResponses) GetTestConnectionConnectorIdentityWithResponse(ctx return ParseGetTestConnectionConnectorIdentityResponse(rsp) } -// CreateSyncDestinationFromTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncDestinationFromTestConnectionResponse -func (c *ClientWithResponses) CreateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) { - rsp, err := c.CreateSyncDestinationFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncDestinationFromTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationFromTestConnectionResponse, error) { - rsp, err := c.CreateSyncDestinationFromTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncDestinationFromTestConnectionResponse(rsp) -} - -// CreateSyncSourceFromTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncSourceFromTestConnectionResponse -func (c *ClientWithResponses) CreateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) { - rsp, err := c.CreateSyncSourceFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncSourceFromTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body CreateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceFromTestConnectionResponse, error) { - rsp, err := c.CreateSyncSourceFromTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncSourceFromTestConnectionResponse(rsp) -} - -// UpdateSyncDestinationFromTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncDestinationFromTestConnectionResponse -func (c *ClientWithResponses) UpdateSyncDestinationFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) { - rsp, err := c.UpdateSyncDestinationFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, syncDestinationName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncDestinationFromTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncDestinationFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncDestinationName SyncDestinationName, body UpdateSyncDestinationFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationFromTestConnectionResponse, error) { - rsp, err := c.UpdateSyncDestinationFromTestConnection(ctx, teamName, syncTestConnectionId, syncDestinationName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncDestinationFromTestConnectionResponse(rsp) -} - -// UpdateSyncSourceFromTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncSourceFromTestConnectionResponse -func (c *ClientWithResponses) UpdateSyncSourceFromTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) { - rsp, err := c.UpdateSyncSourceFromTestConnectionWithBody(ctx, teamName, syncTestConnectionId, syncSourceName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncSourceFromTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncSourceFromTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, syncSourceName SyncSourceName, body UpdateSyncSourceFromTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceFromTestConnectionResponse, error) { - rsp, err := c.UpdateSyncSourceFromTestConnection(ctx, teamName, syncTestConnectionId, syncSourceName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncSourceFromTestConnectionResponse(rsp) -} - // DeleteSyncWithResponse request returning *DeleteSyncResponse func (c *ClientWithResponses) DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) { rsp, err := c.DeleteSync(ctx, teamName, syncName, reqEditors...) @@ -17840,685 +16324,68 @@ func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEd return ParseUploadImageResponse(rsp) } -// GetCurrentUserWithResponse request returning *GetCurrentUserResponse -func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { - rsp, err := c.GetCurrentUser(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrentUserResponse(rsp) -} - -// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse -func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} - -func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} - -// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse -func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { - rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListCurrentUserInvitationsResponse(rsp) -} - -// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse -func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { - rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrentUserMembershipsResponse(rsp) -} - -// DeleteUserWithResponse request returning *DeleteUserResponse -func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { - rsp, err := c.DeleteUser(ctx, userID, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteUserResponse(rsp) -} - -// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call -func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &HealthCheckResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call -func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListAddonsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddons200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call -func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateAddonResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Addon - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call -func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteAddonByTeamAndNameResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call -func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetAddonResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddon - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call -func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateAddonResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call -func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListAddonVersionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonVersions200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call -func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetAddonVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call -func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateAddonVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call -func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateAddonVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call -func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DownloadAddonAssetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// GetCurrentUserWithResponse request returning *GetCurrentUserResponse +func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { + rsp, err := c.GetCurrentUser(ctx, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseGetCurrentUserResponse(rsp) } -// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call -func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse +func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParseUpdateCurrentUserResponse(rsp) +} - response := &UploadAddonAssetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) + if err != nil { + return nil, err } + return ParseUpdateCurrentUserResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse +func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { + rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCurrentUserInvitationsResponse(rsp) +} +// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse +func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { + rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) + if err != nil { + return nil, err } + return ParseGetCurrentUserMembershipsResponse(rsp) +} - return response, nil +// DeleteUserWithResponse request returning *DeleteUserResponse +func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { + rsp, err := c.DeleteUser(ctx, userID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteUserResponse(rsp) } -// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call -func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { +// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call +func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CQHealthCheckResponse{ + response := &HealthCheckResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -18526,22 +16393,22 @@ func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, err return response, nil } -// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call -func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { +// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call +func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginNotificationRequestsResponse{ + response := &ListAddonsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginNotificationRequests200Response + var dest ListAddons200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -18566,22 +16433,22 @@ func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPlugi return response, nil } -// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call -func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { +// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call +func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginNotificationRequestResponse{ + response := &CreateAddonResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginNotificationRequest + var dest Addon if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -18594,13 +16461,6 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18608,13 +16468,6 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18634,20 +16487,27 @@ func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call -func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { +// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call +func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginNotificationRequestResponse{ + response := &DeleteAddonByTeamAndNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18655,6 +16515,13 @@ func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePl } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18674,22 +16541,22 @@ func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePl return response, nil } -// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call -func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { +// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call +func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginNotificationRequestResponse{ + response := &GetAddonResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginNotificationRequests200Response + var dest ListAddon if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -18721,67 +16588,27 @@ func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNo return response, nil } -// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call -func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { +// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call +func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsResponse{ + response := &UpdateAddonResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPlugins200Response + var dest Addon if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call -func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreatePluginResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Plugin - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18796,66 +16623,19 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call -func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeletePluginByTeamAndPluginNameResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -18869,22 +16649,22 @@ func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePl return response, nil } -// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call -func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { +// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call +func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginResponse{ + response := &ListAddonVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPlugin + var dest ListAddonVersions200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -18897,6 +16677,13 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18916,33 +16703,33 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { return response, nil } -// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call -func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { +// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call +func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginResponse{ + response := &GetAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -18958,13 +16745,6 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -18977,20 +16757,34 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error return response, nil } -// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call -func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { +// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call +func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginUpcomingPriceChangesResponse{ + response := &UpdateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19024,27 +16818,41 @@ func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeleteP return response, nil } -// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call -func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { +// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call +func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginUpcomingPriceChangesResponse{ + response := &CreateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginUpcomingPriceChanges200Response + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19078,26 +16886,26 @@ func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPlugi return response, nil } -// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call -func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { +// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call +func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginUpcomingPriceChangeResponse{ + response := &DownloadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginPrice + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -19120,12 +16928,12 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -19139,26 +16947,26 @@ func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePl return response, nil } -// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call -func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { +// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call +func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionsResponse{ + response := &UploadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersions200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -19174,13 +16982,6 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19193,22 +16994,38 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes return response, nil } -// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call -func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { +// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call +func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionResponse{ + response := &CQHealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call +func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginNotificationRequestsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersionDetails + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19221,20 +17038,6 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19247,26 +17050,26 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons return response, nil } -// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call -func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { +// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call +func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginVersionResponse{ + response := &CreatePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginNotificationRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -19282,6 +17085,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19289,6 +17099,13 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19301,41 +17118,20 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR return response, nil } -// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call -func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { +// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call +func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionResponse{ + response := &DeletePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19343,12 +17139,12 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -19362,22 +17158,22 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR return response, nil } -// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call -func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { +// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call +func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetResponse{ + response := &GetPluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19397,13 +17193,6 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19416,26 +17205,26 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR return response, nil } -// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call -func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { +// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call +func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadPluginAssetResponse{ + response := &ListPluginsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPlugins200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -19444,13 +17233,6 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19463,33 +17245,33 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo return response, nil } -// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call -func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { +// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call +func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionDocsResponse{ + response := &CreatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -19498,13 +17280,6 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19524,26 +17299,26 @@ func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVers return response, nil } -// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call -func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { +// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call +func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionDocsResponse{ + response := &DeletePluginByTeamAndPluginNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersionDocs200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -19552,6 +17327,13 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19571,33 +17353,26 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD return response, nil } -// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call -func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { +// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call +func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ReplacePluginVersionDocsResponse{ + response := &GetPluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionDocs201Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPlugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -19606,13 +17381,6 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19620,13 +17388,6 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19639,26 +17400,26 @@ func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVe return response, nil } -// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call -func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { +// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call +func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionDocsResponse{ + response := &UpdatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionDocs201Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -19667,13 +17428,6 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19707,27 +17461,20 @@ func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVers return response, nil } -// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call -func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { +// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call +func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionTablesResponse{ + response := &DeletePluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19749,13 +17496,6 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19768,22 +17508,22 @@ func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVe return response, nil } -// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call -func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { +// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call +func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionTablesResponse{ + response := &ListPluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersionTables200Response + var dest ListPluginUpcomingPriceChanges200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19796,6 +17536,13 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19815,34 +17562,27 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio return response, nil } -// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call -func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { +// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call +func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionTablesResponse{ + response := &CreatePluginUpcomingPriceChangeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionTables201Response + var dest PluginPrice if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19883,22 +17623,22 @@ func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVe return response, nil } -// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call -func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { +// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call +func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionTableResponse{ + response := &ListPluginVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginTableDetails + var dest ListPluginVersions200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -19911,6 +17651,13 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19930,26 +17677,26 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } -// ParseRemovePluginUIAssetsResponse parses an HTTP response from a RemovePluginUIAssetsWithResponse call -func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAssetsResponse, error) { +// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call +func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &RemovePluginUIAssetsResponse{ + response := &GetPluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersionDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -19965,6 +17712,13 @@ func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAsset } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -19977,26 +17731,26 @@ func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAsset return response, nil } -// ParseUploadPluginUIAssetsResponse parses an HTTP response from a UploadPluginUIAssetsWithResponse call -func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAssetsResponse, error) { +// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call +func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadPluginUIAssetsResponse{ + response := &UpdatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest UploadPluginUIAssets201Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -20012,12 +17766,12 @@ func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAsset } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -20031,111 +17785,57 @@ func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAsset return response, nil } -// ParseFinalizePluginUIAssetUploadResponse parses an HTTP response from a FinalizePluginUIAssetUploadWithResponse call -func ParseFinalizePluginUIAssetUploadResponse(rsp *http.Response) (*FinalizePluginUIAssetUploadResponse, error) { +// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call +func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &FinalizePluginUIAssetUploadResponse{ + response := &CreatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call -func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &AuthRegistryRequestResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + response.JSON200 = &dest - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RegistryAuthToken + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest DockerError + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DockerError + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest DockerError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest DockerError + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -20146,22 +17846,22 @@ func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestR return response, nil } -// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call -func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { +// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call +func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamsResponse{ + response := &DownloadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeams200Response + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -20174,19 +17874,19 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -20200,34 +17900,27 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { return response, nil } -// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call -func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { +// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call +func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamResponse{ + response := &UploadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Team + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20242,13 +17935,6 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20261,15 +17947,15 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { return response, nil } -// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call -func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { +// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call +func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamResponse{ + response := &DeletePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -20322,34 +18008,27 @@ func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { return response, nil } -// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call -func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { +// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call +func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamByNameResponse{ + response := &ListPluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + var dest ListPluginVersionDocs200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20357,13 +18036,6 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20383,26 +18055,26 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } -// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call -func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { +// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call +func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateTeamResponse{ + response := &ReplacePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -20432,6 +18104,13 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20444,26 +18123,33 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } -// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call -func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { +// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call +func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonOrdersByTeamResponse{ + response := &CreatePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonOrdersByTeam200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -20486,6 +18172,13 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20498,27 +18191,20 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT return response, nil } -// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call -func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { +// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call +func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonOrderForTeamResponse{ + response := &DeletePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonOrder - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20533,6 +18219,13 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20540,6 +18233,13 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20552,22 +18252,22 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder return response, nil } -// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call -func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { +// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call +func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonOrderByTeamResponse{ + response := &ListPluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonOrder + var dest ListPluginVersionTables200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -20580,13 +18280,6 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20606,20 +18299,27 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR return response, nil } -// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call -func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { +// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call +func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonsByTeamResponse{ + response := &CreatePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionTables201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20648,6 +18348,13 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20660,22 +18367,22 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes return response, nil } -// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call -func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { +// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call +func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsByTeamResponse{ + response := &GetPluginVersionTableResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonsByTeam200Response + var dest PluginTableDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -20688,13 +18395,6 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20714,26 +18414,26 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons return response, nil } -// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call -func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { +// ParseRemovePluginUIAssetsResponse parses an HTTP response from a RemovePluginUIAssetsWithResponse call +func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAssetsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetByTeamResponse{ + response := &RemovePluginUIAssetsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -20749,20 +18449,6 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20775,26 +18461,33 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs return response, nil } -// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call -func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { +// ParseUploadPluginUIAssetsResponse parses an HTTP response from a UploadPluginUIAssetsWithResponse call +func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAssetsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamAPIKeysResponse{ + response := &UploadPluginUIAssetsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeamAPIKeys200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest UploadPluginUIAssets201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -20803,12 +18496,12 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -20822,27 +18515,20 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, return response, nil } -// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call -func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { +// ParseFinalizePluginUIAssetUploadResponse parses an HTTP response from a FinalizePluginUIAssetUploadWithResponse call +func ParseFinalizePluginUIAssetUploadResponse(rsp *http.Response) (*FinalizePluginUIAssetUploadResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamAPIKeyResponse{ + response := &FinalizePluginUIAssetUploadResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest APIKey - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20857,6 +18543,13 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -20876,43 +18569,57 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons return response, nil } -// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call -func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamAPIKeyResponse{ + response := &AuthRegistryRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RegistryAuthToken + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -20923,40 +18630,40 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons return response, nil } -// ParseListConnectorsResponse parses an HTTP response from a ListConnectorsWithResponse call -func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, error) { +// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call +func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListConnectorsResponse{ + response := &ListTeamsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListConnectors200Response + var dest ListTeams200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -20977,22 +18684,22 @@ func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, e return response, nil } -// ParseCreateConnectorResponse parses an HTTP response from a CreateConnectorWithResponse call -func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, error) { +// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call +func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateConnectorResponse{ + response := &CreateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Connector + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -21012,6 +18719,13 @@ func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21031,26 +18745,26 @@ func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, return response, nil } -// ParseGetConnectorResponse parses an HTTP response from a GetConnectorWithResponse call -func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error) { +// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call +func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetConnectorResponse{ + response := &DeleteTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Connector + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -21059,6 +18773,13 @@ func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21066,6 +18787,13 @@ func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21078,22 +18806,22 @@ func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error return response, nil } -// ParseUpdateConnectorResponse parses an HTTP response from a UpdateConnectorWithResponse call -func ParseUpdateConnectorResponse(rsp *http.Response) (*UpdateConnectorResponse, error) { +// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call +func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateConnectorResponse{ + response := &GetTeamByNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Connector + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -21113,45 +18841,12 @@ func ParseUpdateConnectorResponse(rsp *http.Response) (*UpdateConnectorResponse, } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseRevokeConnectorResponse parses an HTTP response from a RevokeConnectorWithResponse call -func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &RevokeConnectorResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -21160,13 +18855,6 @@ func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21179,22 +18867,22 @@ func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, return response, nil } -// ParseGetConnectorAuthStatusAWSResponse parses an HTTP response from a GetConnectorAuthStatusAWSWithResponse call -func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAuthStatusAWSResponse, error) { +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetConnectorAuthStatusAWSResponse{ + response := &UpdateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetConnectorAuthStatusAWS200Response + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -21214,19 +18902,19 @@ func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAu } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -21240,26 +18928,26 @@ func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAu return response, nil } -// ParseAuthenticateConnectorFinishAWSResponse parses an HTTP response from a AuthenticateConnectorFinishAWSWithResponse call -func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*AuthenticateConnectorFinishAWSResponse, error) { +// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call +func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorFinishAWSResponse{ + response := &ListAddonOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -21282,13 +18970,6 @@ func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*Authentic } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21301,26 +18982,26 @@ func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*Authentic return response, nil } -// ParseAuthenticateConnectorAWSResponse parses an HTTP response from a AuthenticateConnectorAWSWithResponse call -func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateConnectorAWSResponse, error) { +// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call +func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorAWSResponse{ + response := &CreateAddonOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ConnectorAuthResponseAWS + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -21343,13 +19024,6 @@ func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateCon } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21362,26 +19036,26 @@ func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateCon return response, nil } -// ParseAuthenticateConnectorFinishOAuthResponse parses an HTTP response from a AuthenticateConnectorFinishOAuthWithResponse call -func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*AuthenticateConnectorFinishOAuthResponse, error) { +// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call +func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorFinishOAuthResponse{ + response := &GetAddonOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -21404,13 +19078,6 @@ func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*Authent } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21423,27 +19090,20 @@ func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*Authent return response, nil } -// ParseAuthenticateConnectorOAuthResponse parses an HTTP response from a AuthenticateConnectorOAuthWithResponse call -func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateConnectorOAuthResponse, error) { +// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call +func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorOAuthResponse{ + response := &DeleteAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ConnectorAuthResponseOAuth - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21456,7 +19116,14 @@ func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateC if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -21465,13 +19132,6 @@ func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateC } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21484,26 +19144,26 @@ func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateC return response, nil } -// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call -func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { +// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call +func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamImagesResponse{ + response := &ListAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreateTeamImages201Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -21538,26 +19198,26 @@ func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesRespons return response, nil } -// ParseDeleteTeamInvitationResponse parses an HTTP response from a DeleteTeamInvitationWithResponse call -func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitationResponse, error) { +// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call +func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamInvitationResponse{ + response := &DownloadAddonAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -21580,6 +19240,13 @@ func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitatio } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21592,33 +19259,40 @@ func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitatio return response, nil } -// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call -func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamInvitationsResponse{ + response := &ListTeamAPIKeysResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeamInvitations200Response + var dest ListTeamAPIKeys200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -21632,33 +19306,26 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR return response, nil } -// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call -func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &EmailTeamInvitationResponse{ + response := &CreateTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invitation - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Invitation + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest APIKey if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON202 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -21667,12 +19334,12 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -21693,40 +19360,40 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR return response, nil } -// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call -func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AcceptTeamInvitationResponse{ + response := &DeleteTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest MembershipWithTeam + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: - var dest MembershipWithTeam + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON303 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -21740,20 +19407,27 @@ func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitatio return response, nil } -// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call -func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { +// ParseListConnectorsResponse parses an HTTP response from a ListConnectorsWithResponse call +func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CancelTeamInvitationResponse{ + response := &ListConnectorsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListConnectors200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21768,13 +19442,6 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21794,47 +19461,47 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio return response, nil } -// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call -func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { +// ParseCreateConnectorResponse parses an HTTP response from a CreateConnectorWithResponse call +func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListInvoicesByTeamResponse{ + response := &CreateConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListInvoicesByTeam200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Connector if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -21848,34 +19515,27 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes return response, nil } -// ParseGetManagedDatabasesResponse parses an HTTP response from a GetManagedDatabasesWithResponse call -func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesResponse, error) { +// ParseGetConnectorResponse parses an HTTP response from a GetConnectorWithResponse call +func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetManagedDatabasesResponse{ + response := &GetConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetManagedDatabases200Response + var dest Connector if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21883,13 +19543,6 @@ func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21909,26 +19562,26 @@ func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesR return response, nil } -// ParseCreateManagedDatabaseResponse parses an HTTP response from a CreateManagedDatabaseWithResponse call -func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatabaseResponse, error) { +// ParseUpdateConnectorResponse parses an HTTP response from a UpdateConnectorWithResponse call +func ParseUpdateConnectorResponse(rsp *http.Response) (*UpdateConnectorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateManagedDatabaseResponse{ + response := &UpdateConnectorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ManagedDatabase + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Connector if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -21944,26 +19597,52 @@ func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatab } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON500 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict + } + + return response, nil +} + +// ParseRevokeConnectorResponse parses an HTTP response from a RevokeConnectorWithResponse call +func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RevokeConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON409 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -21984,20 +19663,34 @@ func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatab return response, nil } -// ParseDeleteManagedDatabaseResponse parses an HTTP response from a DeleteManagedDatabaseWithResponse call -func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatabaseResponse, error) { +// ParseGetConnectorAuthStatusAWSResponse parses an HTTP response from a GetConnectorAuthStatusAWSWithResponse call +func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAuthStatusAWSResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteManagedDatabaseResponse{ + response := &GetConnectorAuthStatusAWSResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetConnectorAuthStatusAWS200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22031,26 +19724,26 @@ func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatab return response, nil } -// ParseGetManagedDatabaseResponse parses an HTTP response from a GetManagedDatabaseWithResponse call -func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseResponse, error) { +// ParseAuthenticateConnectorFinishAWSResponse parses an HTTP response from a AuthenticateConnectorFinishAWSWithResponse call +func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*AuthenticateConnectorFinishAWSResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetManagedDatabaseResponse{ + response := &AuthenticateConnectorFinishAWSResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ManagedDatabase + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22059,6 +19752,13 @@ func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseRes } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22066,6 +19766,13 @@ func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22078,20 +19785,27 @@ func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseRes return response, nil } -// ParseRemoveTeamMembershipResponse parses an HTTP response from a RemoveTeamMembershipWithResponse call -func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershipResponse, error) { +// ParseAuthenticateConnectorAWSResponse parses an HTTP response from a AuthenticateConnectorAWSWithResponse call +func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateConnectorAWSResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &RemoveTeamMembershipResponse{ + response := &AuthenticateConnectorAWSResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorAuthResponseAWS + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22106,19 +19820,19 @@ func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershi } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22132,27 +19846,20 @@ func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershi return response, nil } -// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call -func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { +// ParseAuthenticateConnectorFinishOAuthResponse parses an HTTP response from a AuthenticateConnectorFinishOAuthWithResponse call +func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*AuthenticateConnectorFinishOAuthResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamMembershipsResponse{ + response := &AuthenticateConnectorFinishOAuthResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetTeamMemberships200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22181,6 +19888,13 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22193,20 +19907,27 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } -// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call -func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { +// ParseAuthenticateConnectorOAuthResponse parses an HTTP response from a AuthenticateConnectorOAuthWithResponse call +func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateConnectorOAuthResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamMembershipResponse{ + response := &AuthenticateConnectorOAuthResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorAuthResponseOAuth + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22221,19 +19942,19 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22247,26 +19968,26 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi return response, nil } -// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call -func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { +// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call +func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginsByTeamResponse{ + response := &CreateTeamImagesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateTeamImages201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22301,26 +20022,26 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR return response, nil } -// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call -func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { +// ParseDeleteTeamInvitationResponse parses an HTTP response from a DeleteTeamInvitationWithResponse call +func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsByTeamResponse{ + response := &DeleteTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginsByTeam200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22355,47 +20076,33 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo return response, nil } -// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call -func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { +// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call +func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetByTeamResponse{ + response := &ListTeamInvitationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + var dest ListTeamInvitations200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22409,40 +20116,40 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } -// ParseGetTeamSpendResponse parses an HTTP response from a GetTeamSpendWithResponse call -func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error) { +// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call +func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamSpendResponse{ + response := &EmailTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendSummary + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON202 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -22451,12 +20158,12 @@ func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22470,40 +20177,40 @@ func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error return response, nil } -// ParseDeleteSpendingLimitResponse parses an HTTP response from a DeleteSpendingLimitWithResponse call -func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitResponse, error) { +// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call +func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSpendingLimitResponse{ + response := &AcceptTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON303 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22517,26 +20224,26 @@ func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitR return response, nil } -// ParseGetSpendingLimitResponse parses an HTTP response from a GetSpendingLimitWithResponse call -func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitResponse, error) { +// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call +func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSpendingLimitResponse{ + response := &CancelTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendingLimit + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22571,26 +20278,26 @@ func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitRespons return response, nil } -// ParseCreateSpendingLimitResponse parses an HTTP response from a CreateSpendingLimitWithResponse call -func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitResponse, error) { +// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call +func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSpendingLimitResponse{ + response := &ListInvoicesByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SpendingLimit + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListInvoicesByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22613,13 +20320,6 @@ func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22632,22 +20332,22 @@ func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitR return response, nil } -// ParseUpdateSpendingLimitResponse parses an HTTP response from a UpdateSpendingLimitWithResponse call -func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitResponse, error) { +// ParseGetManagedDatabasesResponse parses an HTTP response from a GetManagedDatabasesWithResponse call +func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSpendingLimitResponse{ + response := &GetManagedDatabasesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendingLimit + var dest GetManagedDatabases200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -22693,26 +20393,33 @@ func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitR return response, nil } -// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call -func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { +// ParseCreateManagedDatabaseResponse parses an HTTP response from a CreateManagedDatabaseWithResponse call +func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSubscriptionOrdersByTeamResponse{ + response := &CreateManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSubscriptionOrdersByTeam200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ManagedDatabase + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22735,6 +20442,20 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22747,34 +20468,20 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri return response, nil } -// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call -func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { +// ParseDeleteManagedDatabaseResponse parses an HTTP response from a DeleteManagedDatabaseWithResponse call +func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSubscriptionOrderForTeamResponse{ + response := &DeleteManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest TeamSubscriptionOrder - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22782,13 +20489,6 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22815,22 +20515,22 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub return response, nil } -// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call -func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { +// ParseGetManagedDatabaseResponse parses an HTTP response from a GetManagedDatabaseWithResponse call +func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSubscriptionOrderByTeamResponse{ + response := &GetManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest TeamSubscriptionOrder + var dest ManagedDatabase if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -22843,13 +20543,6 @@ func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscripti } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22869,27 +20562,20 @@ func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscripti return response, nil } -// ParseCreateSyncDestinationTestConnectionResponse parses an HTTP response from a CreateSyncDestinationTestConnectionWithResponse call -func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*CreateSyncDestinationTestConnectionResponse, error) { +// ParseRemoveTeamMembershipResponse parses an HTTP response from a RemoveTeamMembershipWithResponse call +func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershipResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncDestinationTestConnectionResponse{ + response := &RemoveTeamMembershipResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncDestinationTestConnection - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22904,26 +20590,19 @@ func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*Crea } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22937,27 +20616,34 @@ func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*Crea return response, nil } -// ParseGetSyncDestinationTestConnectionResponse parses an HTTP response from a GetSyncDestinationTestConnectionWithResponse call -func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSyncDestinationTestConnectionResponse, error) { +// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call +func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncDestinationTestConnectionResponse{ + response := &GetTeamMembershipsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestinationTestConnection + var dest GetTeamMemberships200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22991,34 +20677,20 @@ func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSync return response, nil } -// ParsePromoteSyncDestinationTestConnectionResponse parses an HTTP response from a PromoteSyncDestinationTestConnectionWithResponse call -func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*PromoteSyncDestinationTestConnectionResponse, error) { +// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call +func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PromoteSyncDestinationTestConnectionResponse{ + response := &DeleteTeamMembershipResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncDestination - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23033,19 +20705,19 @@ func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*Pro } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23059,26 +20731,26 @@ func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*Pro return response, nil } -// ParseListSyncDestinationsResponse parses an HTTP response from a ListSyncDestinationsWithResponse call -func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestinationsResponse, error) { +// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call +func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncDestinationsResponse{ + response := &DeletePluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncDestinations200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -23087,6 +20759,13 @@ func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestination } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23106,33 +20785,26 @@ func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestination return response, nil } -// ParseCreateSyncDestinationResponse parses an HTTP response from a CreateSyncDestinationWithResponse call -func ParseCreateSyncDestinationResponse(rsp *http.Response) (*CreateSyncDestinationResponse, error) { +// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call +func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncDestinationResponse{ + response := &ListPluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncDestination - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -23141,19 +20813,19 @@ func ParseCreateSyncDestinationResponse(rsp *http.Response) (*CreateSyncDestinat } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23167,33 +20839,26 @@ func ParseCreateSyncDestinationResponse(rsp *http.Response) (*CreateSyncDestinat return response, nil } -// ParseTestSyncDestinationResponse parses an HTTP response from a TestSyncDestinationWithResponse call -func ParseTestSyncDestinationResponse(rsp *http.Response) (*TestSyncDestinationResponse, error) { +// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call +func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &TestSyncDestinationResponse{ + response := &DownloadPluginAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncTestConnection - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -23209,13 +20874,6 @@ func ParseTestSyncDestinationResponse(rsp *http.Response) (*TestSyncDestinationR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23235,20 +20893,34 @@ func ParseTestSyncDestinationResponse(rsp *http.Response) (*TestSyncDestinationR return response, nil } -// ParseDeleteSyncDestinationResponse parses an HTTP response from a DeleteSyncDestinationWithResponse call -func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinationResponse, error) { +// ParseGetTeamSpendResponse parses an HTTP response from a GetTeamSpendWithResponse call +func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSyncDestinationResponse{ + response := &GetTeamSpendResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SpendSummary + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23256,19 +20928,19 @@ func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinat } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23282,33 +20954,33 @@ func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinat return response, nil } -// ParseGetSyncDestinationResponse parses an HTTP response from a GetSyncDestinationWithResponse call -func ParseGetSyncDestinationResponse(rsp *http.Response) (*GetSyncDestinationResponse, error) { +// ParseDeleteSpendingLimitResponse parses an HTTP response from a DeleteSpendingLimitWithResponse call +func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncDestinationResponse{ + response := &DeleteSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -23329,34 +21001,27 @@ func ParseGetSyncDestinationResponse(rsp *http.Response) (*GetSyncDestinationRes return response, nil } -// ParseUpdateSyncDestinationResponse parses an HTTP response from a UpdateSyncDestinationWithResponse call -func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinationResponse, error) { +// ParseGetSpendingLimitResponse parses an HTTP response from a GetSpendingLimitWithResponse call +func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncDestinationResponse{ + response := &GetSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination + var dest SpendingLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23364,19 +21029,19 @@ func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinat } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23390,40 +21055,40 @@ func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinat return response, nil } -// ParseCreateTestConnectionForSyncDestinationResponse parses an HTTP response from a CreateTestConnectionForSyncDestinationWithResponse call -func ParseCreateTestConnectionForSyncDestinationResponse(rsp *http.Response) (*CreateTestConnectionForSyncDestinationResponse, error) { +// ParseCreateSpendingLimitResponse parses an HTTP response from a CreateSpendingLimitWithResponse call +func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTestConnectionForSyncDestinationResponse{ + response := &CreateSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncTestConnection + var dest SpendingLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -23439,13 +21104,6 @@ func ParseCreateTestConnectionForSyncDestinationResponse(rsp *http.Response) (*C } response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23458,22 +21116,22 @@ func ParseCreateTestConnectionForSyncDestinationResponse(rsp *http.Response) (*C return response, nil } -// ParseGetTestConnectionForSyncDestinationResponse parses an HTTP response from a GetTestConnectionForSyncDestinationWithResponse call -func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetTestConnectionForSyncDestinationResponse, error) { +// ParseUpdateSpendingLimitResponse parses an HTTP response from a UpdateSpendingLimitWithResponse call +func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionForSyncDestinationResponse{ + response := &UpdateSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection + var dest SpendingLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23493,6 +21151,13 @@ func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetT } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23512,34 +21177,27 @@ func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetT return response, nil } -// ParsePromoteTestConnectionForSyncDestinationResponse parses an HTTP response from a PromoteTestConnectionForSyncDestinationWithResponse call -func ParsePromoteTestConnectionForSyncDestinationResponse(rsp *http.Response) (*PromoteTestConnectionForSyncDestinationResponse, error) { +// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call +func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PromoteTestConnectionForSyncDestinationResponse{ + response := &ListSubscriptionOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination + var dest ListSubscriptionOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23547,26 +21205,19 @@ func ParsePromoteTestConnectionForSyncDestinationResponse(rsp *http.Response) (* } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23580,22 +21231,22 @@ func ParsePromoteTestConnectionForSyncDestinationResponse(rsp *http.Response) (* return response, nil } -// ParseCreateSyncSourceTestConnectionResponse parses an HTTP response from a CreateSyncSourceTestConnectionWithResponse call -func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyncSourceTestConnectionResponse, error) { +// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call +func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncSourceTestConnectionResponse{ + response := &CreateSubscriptionOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncSourceTestConnection + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23615,6 +21266,13 @@ func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyn } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23629,13 +21287,6 @@ func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyn } response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23648,22 +21299,22 @@ func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyn return response, nil } -// ParseGetSyncSourceTestConnectionResponse parses an HTTP response from a GetSyncSourceTestConnectionWithResponse call -func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourceTestConnectionResponse, error) { +// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call +func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncSourceTestConnectionResponse{ + response := &GetSubscriptionOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSourceTestConnection + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23702,29 +21353,22 @@ func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourc return response, nil } -// ParsePromoteSyncSourceTestConnectionResponse parses an HTTP response from a PromoteSyncSourceTestConnectionWithResponse call -func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteSyncSourceTestConnectionResponse, error) { +// ParseCreateSyncDestinationTestConnectionResponse parses an HTTP response from a CreateSyncDestinationTestConnectionWithResponse call +func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*CreateSyncDestinationTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PromoteSyncSourceTestConnectionResponse{ + response := &CreateSyncDestinationTestConnectionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSource - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncSource + var dest SyncDestinationTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23758,6 +21402,13 @@ func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteS } response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23770,22 +21421,22 @@ func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteS return response, nil } -// ParseListSyncSourcesResponse parses an HTTP response from a ListSyncSourcesWithResponse call -func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, error) { +// ParseGetSyncDestinationTestConnectionResponse parses an HTTP response from a GetSyncDestinationTestConnectionWithResponse call +func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSyncDestinationTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncSourcesResponse{ + response := &GetSyncDestinationTestConnectionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncSources200Response + var dest SyncDestinationTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23798,6 +21449,13 @@ func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23817,22 +21475,29 @@ func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, return response, nil } -// ParseCreateSyncSourceResponse parses an HTTP response from a CreateSyncSourceWithResponse call -func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceResponse, error) { +// ParsePromoteSyncDestinationTestConnectionResponse parses an HTTP response from a PromoteSyncDestinationTestConnectionWithResponse call +func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*PromoteSyncDestinationTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncSourceResponse{ + response := &PromoteSyncDestinationTestConnectionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncDestination + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncSource + var dest SyncDestination if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23878,34 +21543,67 @@ func ParseCreateSyncSourceResponse(rsp *http.Response) (*CreateSyncSourceRespons return response, nil } -// ParseTestSyncSourceResponse parses an HTTP response from a TestSyncSourceWithResponse call -func ParseTestSyncSourceResponse(rsp *http.Response) (*TestSyncSourceResponse, error) { +// ParseListSyncDestinationsResponse parses an HTTP response from a ListSyncDestinationsWithResponse call +func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestinationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &TestSyncSourceResponse{ + response := &ListSyncDestinationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncTestConnection + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListSyncDestinations200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteSyncDestinationResponse parses an HTTP response from a DeleteSyncDestinationWithResponse call +func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteSyncDestinationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23927,13 +21625,6 @@ func ParseTestSyncSourceResponse(rsp *http.Response) (*TestSyncSourceResponse, e } response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23946,40 +21637,40 @@ func ParseTestSyncSourceResponse(rsp *http.Response) (*TestSyncSourceResponse, e return response, nil } -// ParseDeleteSyncSourceResponse parses an HTTP response from a DeleteSyncSourceWithResponse call -func ParseDeleteSyncSourceResponse(rsp *http.Response) (*DeleteSyncSourceResponse, error) { +// ParseGetSyncDestinationResponse parses an HTTP response from a GetSyncDestinationWithResponse call +func ParseGetSyncDestinationResponse(rsp *http.Response) (*GetSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSyncSourceResponse{ + response := &GetSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncDestination if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23993,27 +21684,34 @@ func ParseDeleteSyncSourceResponse(rsp *http.Response) (*DeleteSyncSourceRespons return response, nil } -// ParseGetSyncSourceResponse parses an HTTP response from a GetSyncSourceWithResponse call -func ParseGetSyncSourceResponse(rsp *http.Response) (*GetSyncSourceResponse, error) { +// ParseUpdateSyncDestinationResponse parses an HTTP response from a UpdateSyncDestinationWithResponse call +func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncSourceResponse{ + response := &UpdateSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSource + var dest SyncDestination if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24028,6 +21726,13 @@ func ParseGetSyncSourceResponse(rsp *http.Response) (*GetSyncSourceResponse, err } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24040,22 +21745,22 @@ func ParseGetSyncSourceResponse(rsp *http.Response) (*GetSyncSourceResponse, err return response, nil } -// ParseUpdateSyncSourceResponse parses an HTTP response from a UpdateSyncSourceWithResponse call -func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceResponse, error) { +// ParseGetTestConnectionForSyncDestinationResponse parses an HTTP response from a GetTestConnectionForSyncDestinationWithResponse call +func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetTestConnectionForSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncSourceResponse{ + response := &GetTestConnectionForSyncDestinationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSource + var dest SyncTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24082,13 +21787,6 @@ func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceRespons } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24101,22 +21799,22 @@ func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceRespons return response, nil } -// ParseCreateTestConnectionForSyncSourceResponse parses an HTTP response from a CreateTestConnectionForSyncSourceWithResponse call -func ParseCreateTestConnectionForSyncSourceResponse(rsp *http.Response) (*CreateTestConnectionForSyncSourceResponse, error) { +// ParseCreateSyncSourceTestConnectionResponse parses an HTTP response from a CreateSyncSourceTestConnectionWithResponse call +func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyncSourceTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTestConnectionForSyncSourceResponse{ + response := &CreateSyncSourceTestConnectionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncTestConnection + var dest SyncSourceTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24169,40 +21867,40 @@ func ParseCreateTestConnectionForSyncSourceResponse(rsp *http.Response) (*Create return response, nil } -// ParseGetTestConnectionForSyncSourceResponse parses an HTTP response from a GetTestConnectionForSyncSourceWithResponse call -func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestConnectionForSyncSourceResponse, error) { +// ParseGetSyncSourceTestConnectionResponse parses an HTTP response from a GetSyncSourceTestConnectionWithResponse call +func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourceTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionForSyncSourceResponse{ + response := &GetSyncSourceTestConnectionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection + var dest SyncSourceTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -24223,15 +21921,15 @@ func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestCo return response, nil } -// ParsePromoteTestConnectionForSyncSourceResponse parses an HTTP response from a PromoteTestConnectionForSyncSourceWithResponse call -func ParsePromoteTestConnectionForSyncSourceResponse(rsp *http.Response) (*PromoteTestConnectionForSyncSourceResponse, error) { +// ParsePromoteSyncSourceTestConnectionResponse parses an HTTP response from a PromoteSyncSourceTestConnectionWithResponse call +func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteSyncSourceTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PromoteTestConnectionForSyncSourceResponse{ + response := &PromoteSyncSourceTestConnectionResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -24244,6 +21942,13 @@ func ParsePromoteTestConnectionForSyncSourceResponse(rsp *http.Response) (*Promo } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SyncSource + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24272,13 +21977,6 @@ func ParsePromoteTestConnectionForSyncSourceResponse(rsp *http.Response) (*Promo } response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24291,22 +21989,22 @@ func ParsePromoteTestConnectionForSyncSourceResponse(rsp *http.Response) (*Promo return response, nil } -// ParseListSyncsResponse parses an HTTP response from a ListSyncsWithResponse call -func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { +// ParseListSyncSourcesResponse parses an HTTP response from a ListSyncSourcesWithResponse call +func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncsResponse{ + response := &ListSyncSourcesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncs200Response + var dest ListSyncSources200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24338,40 +22036,33 @@ func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { return response, nil } -// ParseCreateSyncResponse parses an HTTP response from a CreateSyncWithResponse call -func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { +// ParseDeleteSyncSourceResponse parses an HTTP response from a DeleteSyncSourceWithResponse call +func ParseDeleteSyncSourceResponse(rsp *http.Response) (*DeleteSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncResponse{ + response := &DeleteSyncSourceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Sync - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -24392,22 +22083,22 @@ func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { return response, nil } -// ParseGetSyncTestConnectionResponse parses an HTTP response from a GetSyncTestConnectionWithResponse call -func ParseGetSyncTestConnectionResponse(rsp *http.Response) (*GetSyncTestConnectionResponse, error) { +// ParseGetSyncSourceResponse parses an HTTP response from a GetSyncSourceWithResponse call +func ParseGetSyncSourceResponse(rsp *http.Response) (*GetSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncTestConnectionResponse{ + response := &GetSyncSourceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection + var dest SyncSource if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24439,22 +22130,22 @@ func ParseGetSyncTestConnectionResponse(rsp *http.Response) (*GetSyncTestConnect return response, nil } -// ParseUpdateSyncTestConnectionResponse parses an HTTP response from a UpdateSyncTestConnectionWithResponse call -func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestConnectionResponse, error) { +// ParseUpdateSyncSourceResponse parses an HTTP response from a UpdateSyncSourceWithResponse call +func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncTestConnectionResponse{ + response := &UpdateSyncSourceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection + var dest SyncSource if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24467,12 +22158,12 @@ func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestC } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -24500,22 +22191,22 @@ func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestC return response, nil } -// ParseGetTestConnectionConnectorCredentialsResponse parses an HTTP response from a GetTestConnectionConnectorCredentialsWithResponse call -func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*GetTestConnectionConnectorCredentialsResponse, error) { +// ParseGetTestConnectionForSyncSourceResponse parses an HTTP response from a GetTestConnectionForSyncSourceWithResponse call +func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestConnectionForSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionConnectorCredentialsResponse{ + response := &GetTestConnectionForSyncSourceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetSyncRunConnectorCredentials200Response + var dest SyncTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24542,13 +22233,6 @@ func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*Ge } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24561,34 +22245,27 @@ func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*Ge return response, nil } -// ParseGetTestConnectionConnectorIdentityResponse parses an HTTP response from a GetTestConnectionConnectorIdentityWithResponse call -func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTestConnectionConnectorIdentityResponse, error) { +// ParseListSyncsResponse parses an HTTP response from a ListSyncsWithResponse call +func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionConnectorIdentityResponse{ + response := &ListSyncsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetSyncRunConnectorIdentity200Response + var dest ListSyncs200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24603,13 +22280,6 @@ func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTe } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24622,22 +22292,22 @@ func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTe return response, nil } -// ParseCreateSyncDestinationFromTestConnectionResponse parses an HTTP response from a CreateSyncDestinationFromTestConnectionWithResponse call -func ParseCreateSyncDestinationFromTestConnectionResponse(rsp *http.Response) (*CreateSyncDestinationFromTestConnectionResponse, error) { +// ParseCreateSyncResponse parses an HTTP response from a CreateSyncWithResponse call +func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncDestinationFromTestConnectionResponse{ + response := &CreateSyncResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncDestination + var dest Sync if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24657,19 +22327,59 @@ func ParseCreateSyncDestinationFromTestConnectionResponse(rsp *http.Response) (* } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetSyncTestConnectionResponse parses an HTTP response from a GetSyncTestConnectionWithResponse call +func ParseGetSyncTestConnectionResponse(rsp *http.Response) (*GetSyncTestConnectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSyncTestConnectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -24683,26 +22393,26 @@ func ParseCreateSyncDestinationFromTestConnectionResponse(rsp *http.Response) (* return response, nil } -// ParseCreateSyncSourceFromTestConnectionResponse parses an HTTP response from a CreateSyncSourceFromTestConnectionWithResponse call -func ParseCreateSyncSourceFromTestConnectionResponse(rsp *http.Response) (*CreateSyncSourceFromTestConnectionResponse, error) { +// ParseUpdateSyncTestConnectionResponse parses an HTTP response from a UpdateSyncTestConnectionWithResponse call +func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncSourceFromTestConnectionResponse{ + response := &UpdateSyncTestConnectionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncSource + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncTestConnection if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -24711,12 +22421,12 @@ func ParseCreateSyncSourceFromTestConnectionResponse(rsp *http.Response) (*Creat } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -24744,22 +22454,22 @@ func ParseCreateSyncSourceFromTestConnectionResponse(rsp *http.Response) (*Creat return response, nil } -// ParseUpdateSyncDestinationFromTestConnectionResponse parses an HTTP response from a UpdateSyncDestinationFromTestConnectionWithResponse call -func ParseUpdateSyncDestinationFromTestConnectionResponse(rsp *http.Response) (*UpdateSyncDestinationFromTestConnectionResponse, error) { +// ParseGetTestConnectionConnectorCredentialsResponse parses an HTTP response from a GetTestConnectionConnectorCredentialsWithResponse call +func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*GetTestConnectionConnectorCredentialsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncDestinationFromTestConnectionResponse{ + response := &GetTestConnectionConnectorCredentialsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination + var dest GetSyncRunConnectorCredentials200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24805,22 +22515,22 @@ func ParseUpdateSyncDestinationFromTestConnectionResponse(rsp *http.Response) (* return response, nil } -// ParseUpdateSyncSourceFromTestConnectionResponse parses an HTTP response from a UpdateSyncSourceFromTestConnectionWithResponse call -func ParseUpdateSyncSourceFromTestConnectionResponse(rsp *http.Response) (*UpdateSyncSourceFromTestConnectionResponse, error) { +// ParseGetTestConnectionConnectorIdentityResponse parses an HTTP response from a GetTestConnectionConnectorIdentityWithResponse call +func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTestConnectionConnectorIdentityResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncSourceFromTestConnectionResponse{ + response := &GetTestConnectionConnectorIdentityResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSource + var dest GetSyncRunConnectorIdentity200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 4a85ee1..22da0fc 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2039,21 +2039,6 @@ type SyncDestinationCreate struct { WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } -// SyncDestinationCreateFromTestConnection Sync Destination from Test Connection Definition -type SyncDestinationCreateFromTestConnection struct { - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` - - // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` - - // WriteMode Write mode for the destination - WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` -} - // SyncDestinationMigrateMode Migrate mode for the destination type SyncDestinationMigrateMode string @@ -2124,18 +2109,6 @@ type SyncDestinationUpdate struct { WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } -// SyncDestinationUpdateFromTestConnection Sync Destination Update from Test Connection Definition -type SyncDestinationUpdateFromTestConnection struct { - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` - - // WriteMode Write mode for the destination - WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` -} - // SyncDestinationWriteMode Write mode for the destination type SyncDestinationWriteMode string @@ -2321,21 +2294,6 @@ type SyncSourceCreate struct { Version string `json:"version"` } -// SyncSourceCreateFromTestConnection Sync Source from Test Connection Definition -type SyncSourceCreateFromTestConnection struct { - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` - - // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables *[]string `json:"skip_tables,omitempty"` - - // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. - Tables []string `json:"tables"` -} - // SyncSourceTestConnection defines model for SyncSourceTestConnection. type SyncSourceTestConnection struct { // CompletedAt Time the test connection was completed @@ -2397,18 +2355,6 @@ type SyncSourceUpdate struct { Tables *[]string `json:"tables,omitempty"` } -// SyncSourceUpdateFromTestConnection Sync Source Update from Test Connection Definition -type SyncSourceUpdateFromTestConnection struct { - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables *[]string `json:"skip_tables,omitempty"` - - // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. - Tables *[]string `json:"tables,omitempty"` -} - // SyncTestConnection defines model for SyncTestConnection. type SyncTestConnection struct { // CompletedAt Time the test connection was completed @@ -2439,22 +2385,6 @@ type SyncTestConnection struct { Status SyncTestConnectionStatus `json:"status"` } -// SyncTestConnectionCreate defines model for SyncTestConnectionCreate. -type SyncTestConnectionCreate struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnvCreate `json:"env,omitempty"` - - // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Version Version of the plugin - Version string `json:"version"` -} - // ID unique ID of the test connection type ID = openapi_types.UUID @@ -3318,54 +3248,24 @@ type CreateSyncDestinationTestConnectionJSONRequestBody = SyncDestinationTestCon // PromoteSyncDestinationTestConnectionJSONRequestBody defines body for PromoteSyncDestinationTestConnection for application/json ContentType. type PromoteSyncDestinationTestConnectionJSONRequestBody = PromoteSyncDestinationTestConnection -// CreateSyncDestinationJSONRequestBody defines body for CreateSyncDestination for application/json ContentType. -type CreateSyncDestinationJSONRequestBody = SyncDestinationCreate - -// TestSyncDestinationJSONRequestBody defines body for TestSyncDestination for application/json ContentType. -type TestSyncDestinationJSONRequestBody = SyncDestinationCreate - // UpdateSyncDestinationJSONRequestBody defines body for UpdateSyncDestination for application/json ContentType. type UpdateSyncDestinationJSONRequestBody = SyncDestinationUpdate -// CreateTestConnectionForSyncDestinationJSONRequestBody defines body for CreateTestConnectionForSyncDestination for application/json ContentType. -type CreateTestConnectionForSyncDestinationJSONRequestBody = SyncTestConnectionCreate - // CreateSyncSourceTestConnectionJSONRequestBody defines body for CreateSyncSourceTestConnection for application/json ContentType. type CreateSyncSourceTestConnectionJSONRequestBody = SyncSourceTestConnectionCreate // PromoteSyncSourceTestConnectionJSONRequestBody defines body for PromoteSyncSourceTestConnection for application/json ContentType. type PromoteSyncSourceTestConnectionJSONRequestBody = PromoteSyncSourceTestConnection -// CreateSyncSourceJSONRequestBody defines body for CreateSyncSource for application/json ContentType. -type CreateSyncSourceJSONRequestBody = SyncSourceCreate - -// TestSyncSourceJSONRequestBody defines body for TestSyncSource for application/json ContentType. -type TestSyncSourceJSONRequestBody = SyncSourceCreate - // UpdateSyncSourceJSONRequestBody defines body for UpdateSyncSource for application/json ContentType. type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate -// CreateTestConnectionForSyncSourceJSONRequestBody defines body for CreateTestConnectionForSyncSource for application/json ContentType. -type CreateTestConnectionForSyncSourceJSONRequestBody = SyncTestConnectionCreate - // CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. type CreateSyncJSONRequestBody = SyncCreate // UpdateSyncTestConnectionJSONRequestBody defines body for UpdateSyncTestConnection for application/json ContentType. type UpdateSyncTestConnectionJSONRequestBody = UpdateSyncTestConnectionRequest -// CreateSyncDestinationFromTestConnectionJSONRequestBody defines body for CreateSyncDestinationFromTestConnection for application/json ContentType. -type CreateSyncDestinationFromTestConnectionJSONRequestBody = SyncDestinationCreateFromTestConnection - -// CreateSyncSourceFromTestConnectionJSONRequestBody defines body for CreateSyncSourceFromTestConnection for application/json ContentType. -type CreateSyncSourceFromTestConnectionJSONRequestBody = SyncSourceCreateFromTestConnection - -// UpdateSyncDestinationFromTestConnectionJSONRequestBody defines body for UpdateSyncDestinationFromTestConnection for application/json ContentType. -type UpdateSyncDestinationFromTestConnectionJSONRequestBody = SyncDestinationUpdateFromTestConnection - -// UpdateSyncSourceFromTestConnectionJSONRequestBody defines body for UpdateSyncSourceFromTestConnection for application/json ContentType. -type UpdateSyncSourceFromTestConnectionJSONRequestBody = SyncSourceUpdateFromTestConnection - // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. type UpdateSyncJSONRequestBody = SyncUpdate diff --git a/spec.json b/spec.json index 0125e9c..484b98d 100644 --- a/spec.json +++ b/spec.json @@ -4180,102 +4180,6 @@ } }, "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Create new draft Sync Source definition.", - "operationId" : "CreateSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSourceCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSource" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-sources/test" : { - "post" : { - "deprecated" : true, - "description" : "DEPRECATED. Test a Sync Source definition. Use CreateTestConnectionForSyncSource instead.", - "operationId" : "TestSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSourceCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] } }, "/teams/{team_name}/sync-sources/{sync_source_name}" : { @@ -4385,58 +4289,6 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections" : { - "post" : { - "description" : "Create a test connection for sync source.", - "operationId" : "CreateTestConnectionForSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnectionCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}" : { "get" : { "description" : "Get test connection details for sync source.", @@ -4475,50 +4327,6 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}/promote" : { - "post" : { - "description" : "Promote a test connection for sync source.", - "operationId" : "PromoteTestConnectionForSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSource" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, "/teams/{team_name}/sync-destinations" : { "get" : { "description" : "List all sync destination definitions.", @@ -4552,102 +4360,6 @@ } }, "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Create new draft Sync Destination definition.", - "operationId" : "CreateSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestination" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-destinations/test" : { - "post" : { - "deprecated" : true, - "description" : "DEPRECATED. Test a Sync Destination definition. Use CreateTestConnectionForSyncDestination instead.", - "operationId" : "TestSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] } }, "/teams/{team_name}/sync-destinations/{sync_destination_name}" : { @@ -4656,46 +4368,12 @@ "operationId" : "DeleteSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "get" : { - "description" : "Get a single sync destination definition.", - "operationId" : "GetSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestination" - } - } - }, - "description" : "Response" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + } ], + "responses" : { + "204" : { + "description" : "Deleted" }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" @@ -4703,30 +4381,23 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } }, "tags" : [ "syncs" ] }, - "patch" : { - "description" : "Update a Sync Destination definition.", - "operationId" : "UpdateSyncDestination", + "get" : { + "description" : "Get a single sync destination definition.", + "operationId" : "GetSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_destination_name" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationUpdate" - } - } - }, - "required" : true - }, "responses" : { "200" : { "content" : { @@ -4738,29 +4409,21 @@ }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, "500" : { "$ref" : "#/components/responses/InternalError" } }, "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections" : { - "post" : { - "description" : "Create a test connection for sync destination.", - "operationId" : "CreateTestConnectionForSyncDestination", + }, + "patch" : { + "description" : "Update a Sync Destination definition.", + "operationId" : "UpdateSyncDestination", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { @@ -4770,18 +4433,18 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnectionCreate" + "$ref" : "#/components/schemas/SyncDestinationUpdate" } } }, "required" : true }, "responses" : { - "201" : { + "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" + "$ref" : "#/components/schemas/SyncDestination" } } }, @@ -4799,9 +4462,6 @@ "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, "500" : { "$ref" : "#/components/responses/InternalError" } @@ -4847,50 +4507,6 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}/promote" : { - "post" : { - "description" : "Promote a test connection for sync destination.", - "operationId" : "PromoteTestConnectionForSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestination" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, "/teams/{team_name}/syncs" : { "get" : { "description" : "List all Syncs.", @@ -5327,181 +4943,13 @@ }, "style" : "simple" } - } - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/identity" : { - "get" : { - "description" : "Get connector identity for a sync run.", - "operationId" : "GetSyncRunConnectorIdentity", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/credentials" : { - "get" : { - "description" : "Get connector credentials for a sync run.", - "operationId" : "GetSyncRunConnectorCredentials", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { - "get" : { - "deprecated" : true, - "description" : "DEPRECATED. Get a Sync Test Connection. Use GetTestConnectionForSyncSource or GetTestConnectionForSyncDestination instead.", - "operationId" : "GetSyncTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a Sync Test Connection", - "operationId" : "UpdateSyncTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSyncTestConnection_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Updated" + } }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "403" : { - "$ref" : "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" @@ -5516,32 +4964,25 @@ "tags" : [ "syncs" ] } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-source" : { - "post" : { - "deprecated" : true, - "description" : "DEPRECATED. Create new Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource instead.", - "operationId" : "CreateSyncSourceFromTestConnection", + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/identity" : { + "get" : { + "description" : "Get connector identity for a sync run.", + "operationId" : "GetSyncRunConnectorIdentity", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + }, { + "$ref" : "#/components/parameters/connector_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSourceCreateFromTestConnection" - } - } - }, - "required" : true - }, "responses" : { - "201" : { + "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSource" + "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" } } }, @@ -5563,35 +5004,29 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "syncs" ], + "x-internal" : true } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/new-destination" : { - "post" : { - "deprecated" : true, - "description" : "DEPRECATED. Create new Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination instead.", - "operationId" : "CreateSyncDestinationFromTestConnection", + "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/credentials" : { + "get" : { + "description" : "Get connector credentials for a sync run.", + "operationId" : "GetSyncRunConnectorCredentials", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_test_connection_id" + "$ref" : "#/components/parameters/sync_name" + }, { + "$ref" : "#/components/parameters/sync_run_id" + }, { + "$ref" : "#/components/parameters/connector_id" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationCreateFromTestConnection" - } - } - }, - "required" : true - }, "responses" : { - "201" : { + "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" } } }, @@ -5613,99 +5048,76 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "syncs" ], + "x-internal" : true } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-source/{sync_source_name}" : { - "patch" : { + "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { + "get" : { "deprecated" : true, - "description" : "DEPRECATED. Update Sync Source definition from a test connection. Use PromoteTestConnectionForSyncSource and/or UpdateSyncSource instead.", - "operationId" : "UpdateSyncSourceFromTestConnection", + "description" : "DEPRECATED. Get a Sync Test Connection. Use GetTestConnectionForSyncSource or GetTestConnectionForSyncDestination instead.", + "operationId" : "GetSyncTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_test_connection_id" - }, { - "$ref" : "#/components/parameters/sync_source_name" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSourceUpdateFromTestConnection" - } - } - }, - "required" : true - }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSource" + "$ref" : "#/components/schemas/SyncTestConnection" } } }, "description" : "Response" }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, "500" : { "$ref" : "#/components/responses/InternalError" } }, "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/update-destination/{sync_destination_name}" : { + }, "patch" : { - "deprecated" : true, - "description" : "DEPRECATED. Update Sync Destination definition from a test connection. Use PromoteTestConnectionForSyncDestination and/or UpdateSyncDestination instead.", - "operationId" : "UpdateSyncDestinationFromTestConnection", + "description" : "Update a Sync Test Connection", + "operationId" : "UpdateSyncTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { "$ref" : "#/components/parameters/sync_test_connection_id" - }, { - "$ref" : "#/components/parameters/sync_destination_name" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestinationUpdateFromTestConnection" + "$ref" : "#/components/schemas/UpdateSyncTestConnection_request" } } - }, - "required" : true + } }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/SyncTestConnection" } } }, - "description" : "Response" + "description" : "Updated" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, "404" : { "$ref" : "#/components/responses/NotFound" @@ -9327,6 +8739,29 @@ "required" : [ "created_at", "draft", "env", "updated_at" ] } ] }, + "SyncSourceUpdate" : { + "description" : "Sync Source Update Definition", + "properties" : { + "tables" : { + "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "skip_tables" : { + "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "title" : "Sync Source definition for updating a source" + }, "SyncTestConnection" : { "properties" : { "id" : { @@ -9369,58 +8804,6 @@ }, "required" : [ "created_at", "id", "status" ] }, - "SyncSourceUpdate" : { - "description" : "Sync Source Update Definition", - "properties" : { - "tables" : { - "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "skip_tables" : { - "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" - } - }, - "title" : "Sync Source definition for updating a source" - }, - "SyncTestConnectionCreate" : { - "properties" : { - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", - "type" : "string" - }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" - }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - }, - "type" : "array" - }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" - } - }, - "required" : [ "path", "version" ], - "title" : "Sync Test Connection creation definition" - }, "SyncDestinationUpdate" : { "description" : "Sync Destination Update Definition", "properties" : { @@ -9773,96 +9156,6 @@ }, "required" : [ "access_token" ] }, - "SyncSourceCreateFromTestConnection" : { - "description" : "Sync Source from Test Connection Definition", - "properties" : { - "name" : { - "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-source-definition", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" - }, - "tables" : { - "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "skip_tables" : { - "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" - } - }, - "required" : [ "name", "tables" ], - "title" : "Sync Source definition for creating a new source from a test connection" - }, - "SyncDestinationCreateFromTestConnection" : { - "description" : "Sync Destination from Test Connection Definition", - "properties" : { - "name" : { - "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-destination-definition", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" - }, - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" - }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" - } - }, - "required" : [ "name" ], - "title" : "Sync Destination definition for creating a new destination from a test connection" - }, - "SyncSourceUpdateFromTestConnection" : { - "description" : "Sync Source Update from Test Connection Definition", - "properties" : { - "tables" : { - "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "skip_tables" : { - "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" - } - }, - "title" : "Sync Source definition for updating a source from a test connection" - }, - "SyncDestinationUpdateFromTestConnection" : { - "description" : "Sync Destination Update from Test Connection Definition", - "properties" : { - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" - }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" - } - }, - "title" : "Sync Destination definition for updating a destination from a test connection" - }, "ManagedDatabaseID" : { "description" : "The identifier for the managed database", "example" : "12345678-1234-1234-1234-1234567890ab", From fe9d914b40884ad28a494fcc61cb08072976ab1e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jul 2024 06:10:58 -0400 Subject: [PATCH 198/343] fix: Generate CloudQuery Go API Client from `spec.json` (#209) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 526 ++++++++++++++++++++++++++++++++++++-------------- models.gen.go | 12 +- spec.json | 165 +++++++++++----- 3 files changed, 508 insertions(+), 195 deletions(-) diff --git a/client.gen.go b/client.gen.go index e2d0a87..b83ec3c 100644 --- a/client.gen.go +++ b/client.gen.go @@ -449,6 +449,11 @@ type ClientInterface interface { // GetSyncDestinationTestConnection request GetSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateSyncTestConnectionForSyncDestinationWithBody request with any body + UpdateSyncTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PromoteSyncDestinationTestConnectionWithBody request with any body PromoteSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -479,6 +484,11 @@ type ClientInterface interface { // GetSyncSourceTestConnection request GetSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateSyncTestConnectionForSyncSourceWithBody request with any body + UpdateSyncTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSyncTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PromoteSyncSourceTestConnectionWithBody request with any body PromoteSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -509,9 +519,6 @@ type ClientInterface interface { CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetSyncTestConnection request - GetSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateSyncTestConnectionWithBody request with any body UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2175,6 +2182,30 @@ func (c *Client) GetSyncDestinationTestConnection(ctx context.Context, teamName return c.Client.Do(req) } +func (c *Client) UpdateSyncTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody(c.Server, teamName, syncDestinationTestConnectionID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationTestConnectionID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) PromoteSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPromoteSyncDestinationTestConnectionRequestWithBody(c.Server, teamName, syncDestinationTestConnectionID, contentType, body) if err != nil { @@ -2307,6 +2338,30 @@ func (c *Client) GetSyncSourceTestConnection(ctx context.Context, teamName TeamN return c.Client.Do(req) } +func (c *Client) UpdateSyncTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncTestConnectionForSyncSourceRequestWithBody(c.Server, teamName, syncSourceTestConnectionID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSyncTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSyncTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceTestConnectionID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) PromoteSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPromoteSyncSourceTestConnectionRequestWithBody(c.Server, teamName, syncSourceTestConnectionID, contentType, body) if err != nil { @@ -2439,18 +2494,6 @@ func (c *Client) CreateSync(ctx context.Context, teamName TeamName, body CreateS return c.Client.Do(req) } -func (c *Client) GetSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncTestConnectionRequest(c.Server, teamName, syncTestConnectionId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewUpdateSyncTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, contentType, body) if err != nil { @@ -8292,6 +8335,60 @@ func NewGetSyncDestinationTestConnectionRequest(server string, teamName TeamName return req, nil } +// NewUpdateSyncTestConnectionForSyncDestinationRequest calls the generic UpdateSyncTestConnectionForSyncDestination builder with application/json body +func NewUpdateSyncTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody(server, teamName, syncDestinationTestConnectionID, "application/json", bodyReader) +} + +// NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody generates requests for UpdateSyncTestConnectionForSyncDestination with any type of body +func NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_test_connection_id", runtime.ParamLocationPath, syncDestinationTestConnectionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewPromoteSyncDestinationTestConnectionRequest calls the generic PromoteSyncDestinationTestConnection builder with application/json body func NewPromoteSyncDestinationTestConnectionRequest(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -8690,6 +8787,60 @@ func NewGetSyncSourceTestConnectionRequest(server string, teamName TeamName, syn return req, nil } +// NewUpdateSyncTestConnectionForSyncSourceRequest calls the generic UpdateSyncTestConnectionForSyncSource builder with application/json body +func NewUpdateSyncTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSyncTestConnectionForSyncSourceRequestWithBody(server, teamName, syncSourceTestConnectionID, "application/json", bodyReader) +} + +// NewUpdateSyncTestConnectionForSyncSourceRequestWithBody generates requests for UpdateSyncTestConnectionForSyncSource with any type of body +func NewUpdateSyncTestConnectionForSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_test_connection_id", runtime.ParamLocationPath, syncSourceTestConnectionID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewPromoteSyncSourceTestConnectionRequest calls the generic PromoteSyncSourceTestConnection builder with application/json body func NewPromoteSyncSourceTestConnectionRequest(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -9119,47 +9270,6 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return req, nil } -// NewGetSyncTestConnectionRequest generates requests for GetSyncTestConnection -func NewGetSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - // NewUpdateSyncTestConnectionRequest calls the generic UpdateSyncTestConnection builder with application/json body func NewUpdateSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -11027,6 +11137,11 @@ type ClientWithResponsesInterface interface { // GetSyncDestinationTestConnectionWithResponse request GetSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncDestinationTestConnectionResponse, error) + // UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse request with any body + UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) + + UpdateSyncTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) + // PromoteSyncDestinationTestConnectionWithBodyWithResponse request with any body PromoteSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) @@ -11057,6 +11172,11 @@ type ClientWithResponsesInterface interface { // GetSyncSourceTestConnectionWithResponse request GetSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncSourceTestConnectionResponse, error) + // UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse request with any body + UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) + + UpdateSyncTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) + // PromoteSyncSourceTestConnectionWithBodyWithResponse request with any body PromoteSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) @@ -11087,9 +11207,6 @@ type ClientWithResponsesInterface interface { CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) - // GetSyncTestConnectionWithResponse request - GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) - // UpdateSyncTestConnectionWithBodyWithResponse request with any body UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) @@ -13629,6 +13746,33 @@ func (r GetSyncDestinationTestConnectionResponse) StatusCode() int { return 0 } +type UpdateSyncTestConnectionForSyncDestinationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncDestinationTestConnection + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncTestConnectionForSyncDestinationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncTestConnectionForSyncDestinationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type PromoteSyncDestinationTestConnectionResponse struct { Body []byte HTTPResponse *http.Response @@ -13839,6 +13983,33 @@ func (r GetSyncSourceTestConnectionResponse) StatusCode() int { return 0 } +type UpdateSyncTestConnectionForSyncSourceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SyncSourceTestConnection + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSyncTestConnectionForSyncSourceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSyncTestConnectionForSyncSourceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type PromoteSyncSourceTestConnectionResponse struct { Body []byte HTTPResponse *http.Response @@ -14046,31 +14217,6 @@ func (r CreateSyncResponse) StatusCode() int { return 0 } -type GetSyncTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncTestConnection - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type UpdateSyncTestConnectionResponse struct { Body []byte HTTPResponse *http.Response @@ -15894,6 +16040,23 @@ func (c *ClientWithResponses) GetSyncDestinationTestConnectionWithResponse(ctx c return ParseGetSyncDestinationTestConnectionResponse(rsp) } +// UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionForSyncDestinationResponse +func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) { + rsp, err := c.UpdateSyncTestConnectionForSyncDestinationWithBody(ctx, teamName, syncDestinationTestConnectionID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) { + rsp, err := c.UpdateSyncTestConnectionForSyncDestination(ctx, teamName, syncDestinationTestConnectionID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp) +} + // PromoteSyncDestinationTestConnectionWithBodyWithResponse request with arbitrary body returning *PromoteSyncDestinationTestConnectionResponse func (c *ClientWithResponses) PromoteSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) { rsp, err := c.PromoteSyncDestinationTestConnectionWithBody(ctx, teamName, syncDestinationTestConnectionID, contentType, body, reqEditors...) @@ -15990,6 +16153,23 @@ func (c *ClientWithResponses) GetSyncSourceTestConnectionWithResponse(ctx contex return ParseGetSyncSourceTestConnectionResponse(rsp) } +// UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionForSyncSourceResponse +func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) { + rsp, err := c.UpdateSyncTestConnectionForSyncSourceWithBody(ctx, teamName, syncSourceTestConnectionID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) { + rsp, err := c.UpdateSyncTestConnectionForSyncSource(ctx, teamName, syncSourceTestConnectionID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp) +} + // PromoteSyncSourceTestConnectionWithBodyWithResponse request with arbitrary body returning *PromoteSyncSourceTestConnectionResponse func (c *ClientWithResponses) PromoteSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) { rsp, err := c.PromoteSyncSourceTestConnectionWithBody(ctx, teamName, syncSourceTestConnectionID, contentType, body, reqEditors...) @@ -16086,15 +16266,6 @@ func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamNa return ParseCreateSyncResponse(rsp) } -// GetSyncTestConnectionWithResponse request returning *GetSyncTestConnectionResponse -func (c *ClientWithResponses) GetSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetSyncTestConnectionResponse, error) { - rsp, err := c.GetSyncTestConnection(ctx, teamName, syncTestConnectionId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncTestConnectionResponse(rsp) -} - // UpdateSyncTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionResponse func (c *ClientWithResponses) UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { rsp, err := c.UpdateSyncTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) @@ -21475,6 +21646,67 @@ func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSync return response, nil } +// ParseUpdateSyncTestConnectionForSyncDestinationResponse parses an HTTP response from a UpdateSyncTestConnectionForSyncDestinationWithResponse call +func ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp *http.Response) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSyncTestConnectionForSyncDestinationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncDestinationTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParsePromoteSyncDestinationTestConnectionResponse parses an HTTP response from a PromoteSyncDestinationTestConnectionWithResponse call func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*PromoteSyncDestinationTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -21921,6 +22153,67 @@ func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourc return response, nil } +// ParseUpdateSyncTestConnectionForSyncSourceResponse parses an HTTP response from a UpdateSyncTestConnectionForSyncSourceWithResponse call +func ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp *http.Response) (*UpdateSyncTestConnectionForSyncSourceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSyncTestConnectionForSyncSourceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SyncSourceTestConnection + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParsePromoteSyncSourceTestConnectionResponse parses an HTTP response from a PromoteSyncSourceTestConnectionWithResponse call func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteSyncSourceTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -22346,53 +22639,6 @@ func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { return response, nil } -// ParseGetSyncTestConnectionResponse parses an HTTP response from a GetSyncTestConnectionWithResponse call -func ParseGetSyncTestConnectionResponse(rsp *http.Response) (*GetSyncTestConnectionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSyncTestConnectionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseUpdateSyncTestConnectionResponse parses an HTTP response from a UpdateSyncTestConnectionWithResponse call func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestConnectionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 22da0fc..273b3d8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2524,8 +2524,8 @@ type UpdateSyncRunRequest struct { StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` } -// UpdateSyncTestConnectionRequest defines model for UpdateSyncTestConnection_request. -type UpdateSyncTestConnectionRequest struct { +// UpdateSyncTestConnectionForSyncSourceRequest defines model for UpdateSyncTestConnectionForSyncSource_request. +type UpdateSyncTestConnectionForSyncSourceRequest struct { // FailureCode Code for failure FailureCode *string `json:"failure_code,omitempty"` @@ -3245,6 +3245,9 @@ type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate // CreateSyncDestinationTestConnectionJSONRequestBody defines body for CreateSyncDestinationTestConnection for application/json ContentType. type CreateSyncDestinationTestConnectionJSONRequestBody = SyncDestinationTestConnectionCreate +// UpdateSyncTestConnectionForSyncDestinationJSONRequestBody defines body for UpdateSyncTestConnectionForSyncDestination for application/json ContentType. +type UpdateSyncTestConnectionForSyncDestinationJSONRequestBody = UpdateSyncTestConnectionForSyncSourceRequest + // PromoteSyncDestinationTestConnectionJSONRequestBody defines body for PromoteSyncDestinationTestConnection for application/json ContentType. type PromoteSyncDestinationTestConnectionJSONRequestBody = PromoteSyncDestinationTestConnection @@ -3254,6 +3257,9 @@ type UpdateSyncDestinationJSONRequestBody = SyncDestinationUpdate // CreateSyncSourceTestConnectionJSONRequestBody defines body for CreateSyncSourceTestConnection for application/json ContentType. type CreateSyncSourceTestConnectionJSONRequestBody = SyncSourceTestConnectionCreate +// UpdateSyncTestConnectionForSyncSourceJSONRequestBody defines body for UpdateSyncTestConnectionForSyncSource for application/json ContentType. +type UpdateSyncTestConnectionForSyncSourceJSONRequestBody = UpdateSyncTestConnectionForSyncSourceRequest + // PromoteSyncSourceTestConnectionJSONRequestBody defines body for PromoteSyncSourceTestConnection for application/json ContentType. type PromoteSyncSourceTestConnectionJSONRequestBody = PromoteSyncSourceTestConnection @@ -3264,7 +3270,7 @@ type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate type CreateSyncJSONRequestBody = SyncCreate // UpdateSyncTestConnectionJSONRequestBody defines body for UpdateSyncTestConnection for application/json ContentType. -type UpdateSyncTestConnectionJSONRequestBody = UpdateSyncTestConnectionRequest +type UpdateSyncTestConnectionJSONRequestBody = UpdateSyncTestConnectionForSyncSourceRequest // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. type UpdateSyncJSONRequestBody = SyncUpdate diff --git a/spec.json b/spec.json index 484b98d..c8a2949 100644 --- a/spec.json +++ b/spec.json @@ -3941,6 +3941,52 @@ } }, "tags" : [ "syncs" ] + }, + "patch" : { + "description" : "Update a sync source test connection.", + "operationId" : "UpdateSyncTestConnectionForSyncSource", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_test_connection_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSyncTestConnectionForSyncSource_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncSourceTestConnection" + } + } + }, + "description" : "Updated" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] } }, "/teams/{team_name}/sync-source-test-connections/{sync_source_test_connection_id}/promote" : { @@ -4086,6 +4132,52 @@ } }, "tags" : [ "syncs" ] + }, + "patch" : { + "description" : "Update a sync destination test connection.", + "operationId" : "UpdateSyncTestConnectionForSyncDestination", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_test_connection_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSyncTestConnectionForSyncSource_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SyncDestinationTestConnection" + } + } + }, + "description" : "Updated" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] } }, "/teams/{team_name}/sync-destination-test-connections/{sync_destination_test_connection_id}/promote" : { @@ -5053,40 +5145,9 @@ } }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { - "get" : { - "deprecated" : true, - "description" : "DEPRECATED. Get a Sync Test Connection. Use GetTestConnectionForSyncSource or GetTestConnectionForSyncDestination instead.", - "operationId" : "GetSyncTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, "patch" : { - "description" : "Update a Sync Test Connection", + "deprecated" : true, + "description" : "DEPRECATED. Update a Sync Test Connection. Use UpdateSyncTestConnectionForSyncSource or UpdateSyncTestConnectionForSyncDestination instead.", "operationId" : "UpdateSyncTestConnection", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -5097,7 +5158,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSyncTestConnection_request" + "$ref" : "#/components/schemas/UpdateSyncTestConnectionForSyncSource_request" } } } @@ -10072,6 +10133,24 @@ }, "required" : [ "expires_at", "name" ] }, + "UpdateSyncTestConnectionForSyncSource_request" : { + "properties" : { + "status" : { + "$ref" : "#/components/schemas/SyncTestConnectionStatus" + }, + "failure_reason" : { + "description" : "Reason for failure", + "example" : "password authentication failed for user \"exampleuser\"", + "type" : "string" + }, + "failure_code" : { + "description" : "Code for failure", + "example" : "INVALID_CREDENTIALS", + "type" : "string" + } + }, + "required" : [ "status" ] + }, "ListSyncSources_200_response" : { "properties" : { "items" : { @@ -10189,24 +10268,6 @@ } } }, - "UpdateSyncTestConnection_request" : { - "properties" : { - "status" : { - "$ref" : "#/components/schemas/SyncTestConnectionStatus" - }, - "failure_reason" : { - "description" : "Reason for failure", - "example" : "password authentication failed for user \"exampleuser\"", - "type" : "string" - }, - "failure_code" : { - "description" : "Code for failure", - "example" : "INVALID_CREDENTIALS", - "type" : "string" - } - }, - "required" : [ "status" ] - }, "GetManagedDatabases_200_response" : { "properties" : { "items" : { From 322b4bba671d27319ce667852f39b783dc01da2d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 31 Jul 2024 06:16:12 -0400 Subject: [PATCH 199/343] chore(main): Release v1.12.5 (#208) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b0ea31..a47412c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.12.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.4...v1.12.5) (2024-07-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#207](https://github.com/cloudquery/cloudquery-api-go/issues/207)) ([ac1f821](https://github.com/cloudquery/cloudquery-api-go/commit/ac1f821d8a6ee9a28014131818f5f579b3fb28ff)) +* Generate CloudQuery Go API Client from `spec.json` ([#209](https://github.com/cloudquery/cloudquery-api-go/issues/209)) ([fe9d914](https://github.com/cloudquery/cloudquery-api-go/commit/fe9d914b40884ad28a494fcc61cb08072976ab1e)) + ## [1.12.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.3...v1.12.4) (2024-07-29) From b2335062d61468d791f0719e7257752db84ced44 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 2 Aug 2024 11:57:46 +0300 Subject: [PATCH 200/343] fix: Generate CloudQuery Go API Client from `spec.json` (#210) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 1 + spec.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/models.gen.go b/models.gen.go index 273b3d8..ee33e24 100644 --- a/models.gen.go +++ b/models.gen.go @@ -98,6 +98,7 @@ const ( const ( PluginKindDestination PluginKind = "destination" PluginKindSource PluginKind = "source" + PluginKindTransformer PluginKind = "transformer" ) // Defines values for PluginNotificationRequestStatus. diff --git a/spec.json b/spec.json index c8a2949..f517b89 100644 --- a/spec.json +++ b/spec.json @@ -6359,7 +6359,7 @@ }, "PluginKind" : { "description" : "The kind of plugin, ie. source or destination.", - "enum" : [ "source", "destination" ], + "enum" : [ "source", "destination", "transformer" ], "example" : "source", "type" : "string" }, From 900d494e777f3bb70f1d7fdc42d6d4006650da72 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:44:14 +0300 Subject: [PATCH 201/343] chore(main): Release v1.12.6 (#211) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a47412c..5f7e917 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.12.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.5...v1.12.6) (2024-08-02) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#210](https://github.com/cloudquery/cloudquery-api-go/issues/210)) ([b233506](https://github.com/cloudquery/cloudquery-api-go/commit/b2335062d61468d791f0719e7257752db84ced44)) + ## [1.12.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.4...v1.12.5) (2024-07-31) From 54c40edf6254fbf3f252659c19920c9c3b155fe7 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:32:06 +0300 Subject: [PATCH 202/343] fix: Generate CloudQuery Go API Client from `spec.json` (#212) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 193 -------------------------------------------------- models.gen.go | 9 --- spec.json | 68 +----------------- 3 files changed, 1 insertion(+), 269 deletions(-) diff --git a/client.gen.go b/client.gen.go index b83ec3c..f4c350f 100644 --- a/client.gen.go +++ b/client.gen.go @@ -519,11 +519,6 @@ type ClientInterface interface { CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateSyncTestConnectionWithBody request with any body - UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetTestConnectionConnectorCredentials request GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2494,30 +2489,6 @@ func (c *Client) CreateSync(ctx context.Context, teamName TeamName, body CreateS return c.Client.Do(req) } -func (c *Client) UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionRequest(c.Server, teamName, syncTestConnectionId, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTestConnectionConnectorCredentialsRequest(c.Server, teamName, syncTestConnectionId, connectorID) if err != nil { @@ -9270,60 +9241,6 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return req, nil } -// NewUpdateSyncTestConnectionRequest calls the generic UpdateSyncTestConnection builder with application/json body -func NewUpdateSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) -} - -// NewUpdateSyncTestConnectionRequestWithBody generates requests for UpdateSyncTestConnection with any type of body -func NewUpdateSyncTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewGetTestConnectionConnectorCredentialsRequest generates requests for GetTestConnectionConnectorCredentials func NewGetTestConnectionConnectorCredentialsRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID) (*http.Request, error) { var err error @@ -11207,11 +11124,6 @@ type ClientWithResponsesInterface interface { CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) - // UpdateSyncTestConnectionWithBodyWithResponse request with any body - UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) - - UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) - // GetTestConnectionConnectorCredentialsWithResponse request GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) @@ -14217,33 +14129,6 @@ func (r CreateSyncResponse) StatusCode() int { return 0 } -type UpdateSyncTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncTestConnection - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type GetTestConnectionConnectorCredentialsResponse struct { Body []byte HTTPResponse *http.Response @@ -16266,23 +16151,6 @@ func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamNa return ParseCreateSyncResponse(rsp) } -// UpdateSyncTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionResponse -func (c *ClientWithResponses) UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { - rsp, err := c.UpdateSyncTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { - rsp, err := c.UpdateSyncTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionResponse(rsp) -} - // GetTestConnectionConnectorCredentialsWithResponse request returning *GetTestConnectionConnectorCredentialsResponse func (c *ClientWithResponses) GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) { rsp, err := c.GetTestConnectionConnectorCredentials(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) @@ -22639,67 +22507,6 @@ func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { return response, nil } -// ParseUpdateSyncTestConnectionResponse parses an HTTP response from a UpdateSyncTestConnectionWithResponse call -func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestConnectionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateSyncTestConnectionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseGetTestConnectionConnectorCredentialsResponse parses an HTTP response from a GetTestConnectionConnectorCredentialsWithResponse call func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*GetTestConnectionConnectorCredentialsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index ee33e24..f58ab56 100644 --- a/models.gen.go +++ b/models.gen.go @@ -605,9 +605,6 @@ type ConnectorAuthFinishRequestOAuth struct { // ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process type ConnectorAuthRequestAWS struct { - // AccountIDs List of AWS account IDs to authenticate - AccountIDs *[]string `json:"account_ids,omitempty"` - // PluginKind Kind of the plugin PluginKind string `json:"plugin_kind"` @@ -689,9 +686,6 @@ type ConnectorID = openapi_types.UUID // ConnectorIdentityResponseAWS AWS connector identity response type ConnectorIdentityResponseAWS struct { - // AccountIDs List of AWS account IDs - AccountIDs []string `json:"account_ids"` - // RoleARN Role ARN to assume RoleARN string `json:"role_arn"` } @@ -3270,9 +3264,6 @@ type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate // CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. type CreateSyncJSONRequestBody = SyncCreate -// UpdateSyncTestConnectionJSONRequestBody defines body for UpdateSyncTestConnection for application/json ContentType. -type UpdateSyncTestConnectionJSONRequestBody = UpdateSyncTestConnectionForSyncSourceRequest - // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. type UpdateSyncJSONRequestBody = SyncUpdate diff --git a/spec.json b/spec.json index f517b89..c25e278 100644 --- a/spec.json +++ b/spec.json @@ -5144,55 +5144,6 @@ "x-internal" : true } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { - "patch" : { - "deprecated" : true, - "description" : "DEPRECATED. Update a Sync Test Connection. Use UpdateSyncTestConnectionForSyncSource or UpdateSyncTestConnectionForSyncDestination instead.", - "operationId" : "UpdateSyncTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSyncTestConnectionForSyncSource_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Updated" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/identity" : { "get" : { "description" : "Get connector identity for a test connection.", @@ -9165,17 +9116,9 @@ "description" : "Role ARN to assume", "type" : "string", "x-go-name" : "RoleARN" - }, - "account_ids" : { - "description" : "List of AWS account IDs", - "items" : { - "type" : "string" - }, - "type" : "array", - "x-go-name" : "AccountIDs" } }, - "required" : [ "account_ids", "role_arn" ] + "required" : [ "role_arn" ] }, "ConnectorCredentialsResponseAWS" : { "additionalProperties" : false, @@ -9337,15 +9280,6 @@ "description" : "Name of the plugin", "example" : "aws", "type" : "string" - }, - "account_ids" : { - "description" : "List of AWS account IDs to authenticate", - "example" : [ "123456789012" ], - "items" : { - "type" : "string" - }, - "type" : "array", - "x-go-name" : "AccountIDs" } }, "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] From 1c65a7e2fb2b38c0a73860de6e1e897ad8eba20b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 6 Aug 2024 18:02:41 +0300 Subject: [PATCH 203/343] fix: Generate CloudQuery Go API Client from `spec.json` (#214) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 7 +++++-- spec.json | 16 ++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/models.gen.go b/models.gen.go index f58ab56..2fb7172 100644 --- a/models.gen.go +++ b/models.gen.go @@ -854,6 +854,9 @@ type FinalizePluginUIAssetUploadRequest struct { // GetConnectorAuthStatusAWS200Response defines model for GetConnectorAuthStatusAWS_200_response. type GetConnectorAuthStatusAWS200Response struct { + // ExternalID External ID used for the role + ExternalID *string `json:"external_id,omitempty"` + // RoleARN ARN of role created by the user RoleARN *string `json:"role_arn,omitempty"` } @@ -2505,8 +2508,8 @@ type TeamSubscriptionOrderStatus string // UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. type UpdateCurrentUserRequest struct { - // Name The user's name - Name *interface{} `json:"name,omitempty"` + // Name The unique name for the user. + Name *UserName `json:"name,omitempty"` AdditionalProperties map[string]interface{} `json:"-"` } diff --git a/spec.json b/spec.json index c25e278..62a8860 100644 --- a/spec.json +++ b/spec.json @@ -7719,9 +7719,10 @@ }, "UserName" : { "description" : "The unique name for the user.", - "example" : "user", + "example" : "Sarah O'Connor", "maxLength" : 255, - "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "minLength" : 1, + "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", "type" : "string" }, "User" : { @@ -9869,7 +9870,7 @@ "created_at" : "2017-07-14T16:53:42Z", "email" : "user@example.com", "id" : "12345678-1234-1234-1234-1234567890ab", - "name" : "user", + "name" : "Sarah O'Connor", "updated_at" : "2017-07-14T16:53:42Z" } } ], @@ -9997,9 +9998,7 @@ "additionalProperties" : { }, "properties" : { "name" : { - "description" : "The user's name", - "maxLength" : 255, - "minLength" : 1 + "$ref" : "#/components/schemas/UserName" } } }, @@ -10236,6 +10235,11 @@ "description" : "ARN of role created by the user", "type" : "string", "x-go-name" : "RoleARN" + }, + "external_id" : { + "description" : "External ID used for the role", + "type" : "string", + "x-go-name" : "ExternalID" } } }, From 2686c73663a98a0185e76d0d7a063eff5ec577d1 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 6 Aug 2024 18:05:26 +0300 Subject: [PATCH 204/343] chore(main): Release v1.12.7 (#213) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f7e917..8e95c18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.12.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.6...v1.12.7) (2024-08-06) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#212](https://github.com/cloudquery/cloudquery-api-go/issues/212)) ([54c40ed](https://github.com/cloudquery/cloudquery-api-go/commit/54c40edf6254fbf3f252659c19920c9c3b155fe7)) +* Generate CloudQuery Go API Client from `spec.json` ([#214](https://github.com/cloudquery/cloudquery-api-go/issues/214)) ([1c65a7e](https://github.com/cloudquery/cloudquery-api-go/commit/1c65a7e2fb2b38c0a73860de6e1e897ad8eba20b)) + ## [1.12.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.5...v1.12.6) (2024-08-02) From 1f15d68d2af2adaa53f83154cc28a2bed9c4582f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:50:31 +0300 Subject: [PATCH 205/343] fix: Generate CloudQuery Go API Client from `spec.json` (#215) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/models.gen.go b/models.gen.go index 2fb7172..aa05f6a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -306,6 +306,9 @@ type APIKey struct { // Key API key. Will be shown only in the response when creating the key. Key *string `json:"key,omitempty"` + // LastAccessAt Timestamp at which API key was last used - accurate to the day only. + LastAccessAt *time.Time `json:"last_access_at,omitempty"` + // Name Name of the API key Name APIKeyName `json:"name"` diff --git a/spec.json b/spec.json index 62a8860..71d2e5f 100644 --- a/spec.json +++ b/spec.json @@ -8280,6 +8280,12 @@ "format" : "date-time", "type" : "string" }, + "last_access_at" : { + "description" : "Timestamp at which API key was last used - accurate to the day only.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, "expired" : { "description" : "Whether the API key has expired or not", "example" : false, From d230b6b22b69ab6d6e9b788cb070d97473fab67e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:24:39 +0300 Subject: [PATCH 206/343] fix: Generate CloudQuery Go API Client from `spec.json` (#217) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 319 +++++++++++++++++++++++++++++++++++++++++++++++++- spec.json | 95 +++++++++++++-- 2 files changed, 401 insertions(+), 13 deletions(-) diff --git a/models.gen.go b/models.gen.go index aa05f6a..96fdcc9 100644 --- a/models.gen.go +++ b/models.gen.go @@ -608,14 +608,31 @@ type ConnectorAuthFinishRequestOAuth struct { // ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process type ConnectorAuthRequestAWS struct { + // Env Environment variables used in the spec. + Env *interface{} `json:"env,omitempty"` + // PluginKind Kind of the plugin - PluginKind string `json:"plugin_kind"` + PluginKind interface{} `json:"plugin_kind"` // PluginName Name of the plugin - PluginName string `json:"plugin_name"` + PluginName interface{} `json:"plugin_name"` // PluginTeam Team that owns the plugin we are authenticating the connector for - PluginTeam string `json:"plugin_team"` + PluginTeam interface{} `json:"plugin_team"` + + // PluginVersion Version of the plugin + PluginVersion *interface{} `json:"plugin_version,omitempty"` + + // SkipDependentTables Whether to skip dependent tables, setting from the outer spec + SkipDependentTables *interface{} `json:"skip_dependent_tables,omitempty"` + + // SkipTables Tables to skip authentication, setting from the outer spec + SkipTables *interface{} `json:"skip_tables,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Tables Tables to authenticate, setting from the outer spec + Tables *interface{} `json:"tables,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // ConnectorAuthRequestOAuth OAuth connector authentication request to start the authentication process @@ -633,9 +650,21 @@ type ConnectorAuthRequestOAuth struct { PluginName interface{} `json:"plugin_name"` // PluginTeam Team that owns the plugin we are authenticating the connector for - PluginTeam interface{} `json:"plugin_team"` - Spec *map[string]interface{} `json:"spec,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + PluginTeam interface{} `json:"plugin_team"` + + // PluginVersion Version of the plugin + PluginVersion *interface{} `json:"plugin_version,omitempty"` + + // SkipDependentTables Whether to skip dependent tables, setting from the outer spec + SkipDependentTables *interface{} `json:"skip_dependent_tables,omitempty"` + + // SkipTables Tables to skip authentication, setting from the outer spec + SkipTables *interface{} `json:"skip_tables,omitempty"` + Spec *map[string]interface{} `json:"spec,omitempty"` + + // Tables Tables to authenticate, setting from the outer spec + Tables *interface{} `json:"tables,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // ConnectorAuthResponseAWS AWS connector authentication response to start the authentication process @@ -824,6 +853,9 @@ type DeleteTeamInvitationRequest struct { Email openapi_types.Email `json:"email"` } +// DisplayName A human-readable display name +type DisplayName = string + // DockerError Error Returned from the Docker Authorization Handler to the Docker Registry type DockerError struct { Details string `json:"details"` @@ -1825,6 +1857,9 @@ type PriceCategorySpend struct { // PromoteSyncDestinationTestConnection Sync Destination Definition type PromoteSyncDestinationTestConnection struct { + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // MigrateMode Migrate mode for the destination MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` @@ -1837,6 +1872,9 @@ type PromoteSyncDestinationTestConnection struct { // PromoteSyncSourceTestConnection Sync Source Definition type PromoteSyncSourceTestConnection struct { + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` @@ -1931,6 +1969,9 @@ type Sync struct { // Disabled Whether the sync is disabled Disabled bool `json:"disabled"` + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Incremental Managed Sync Incremental Options definition Incremental *SyncIncremental `json:"incremental,omitempty"` @@ -1959,6 +2000,9 @@ type SyncCreate struct { // Disabled Whether the sync is disabled Disabled *bool `json:"disabled,omitempty"` + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Incremental Managed Sync Incremental Options definition Incremental *SyncIncremental `json:"incremental,omitempty"` @@ -1983,6 +2027,9 @@ type SyncDestination struct { // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Draft If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID. Draft bool `json:"draft"` @@ -2017,6 +2064,9 @@ type SyncDestinationCreate struct { // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` @@ -2100,6 +2150,9 @@ type SyncDestinationTestConnectionID = openapi_types.UUID // SyncDestinationUpdate Sync Destination Update Definition type SyncDestinationUpdate struct { + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // LastUpdateSource How was the source or destination been created or updated last LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` @@ -2238,6 +2291,9 @@ type SyncSource struct { // CreatedAt Time when the source was created CreatedAt time.Time `json:"created_at"` + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Draft If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID. Draft bool `json:"draft"` @@ -2272,6 +2328,9 @@ type SyncSourceCreate struct { // ConnectorID ID of the Connector ConnectorID *ConnectorID `json:"connector_id,omitempty"` + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Env Environment variables for the plugin. All environment variables will be stored as secrets. Env *[]SyncEnvCreate `json:"env,omitempty"` @@ -2346,6 +2405,9 @@ type SyncSourceTestConnectionID = openapi_types.UUID // SyncSourceUpdate Sync Source Update Definition type SyncSourceUpdate struct { + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // LastUpdateSource How was the source or destination been created or updated last LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` @@ -2401,6 +2463,9 @@ type SyncUpdate struct { // Disabled Whether the sync is disabled Disabled *bool `json:"disabled,omitempty"` + // DisplayName A human-readable display name + DisplayName *DisplayName `json:"display_name,omitempty"` + // Env Environment variables for the sync Env *[]SyncEnv `json:"env,omitempty"` @@ -3394,6 +3459,188 @@ func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for ConnectorAuthRequestAWS. Returns the specified +// element and whether it was found +func (a ConnectorAuthRequestAWS) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ConnectorAuthRequestAWS +func (a *ConnectorAuthRequestAWS) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ConnectorAuthRequestAWS to handle AdditionalProperties +func (a *ConnectorAuthRequestAWS) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["env"]; found { + err = json.Unmarshal(raw, &a.Env) + if err != nil { + return fmt.Errorf("error reading 'env': %w", err) + } + delete(object, "env") + } + + if raw, found := object["plugin_kind"]; found { + err = json.Unmarshal(raw, &a.PluginKind) + if err != nil { + return fmt.Errorf("error reading 'plugin_kind': %w", err) + } + delete(object, "plugin_kind") + } + + if raw, found := object["plugin_name"]; found { + err = json.Unmarshal(raw, &a.PluginName) + if err != nil { + return fmt.Errorf("error reading 'plugin_name': %w", err) + } + delete(object, "plugin_name") + } + + if raw, found := object["plugin_team"]; found { + err = json.Unmarshal(raw, &a.PluginTeam) + if err != nil { + return fmt.Errorf("error reading 'plugin_team': %w", err) + } + delete(object, "plugin_team") + } + + if raw, found := object["plugin_version"]; found { + err = json.Unmarshal(raw, &a.PluginVersion) + if err != nil { + return fmt.Errorf("error reading 'plugin_version': %w", err) + } + delete(object, "plugin_version") + } + + if raw, found := object["skip_dependent_tables"]; found { + err = json.Unmarshal(raw, &a.SkipDependentTables) + if err != nil { + return fmt.Errorf("error reading 'skip_dependent_tables': %w", err) + } + delete(object, "skip_dependent_tables") + } + + if raw, found := object["skip_tables"]; found { + err = json.Unmarshal(raw, &a.SkipTables) + if err != nil { + return fmt.Errorf("error reading 'skip_tables': %w", err) + } + delete(object, "skip_tables") + } + + if raw, found := object["spec"]; found { + err = json.Unmarshal(raw, &a.Spec) + if err != nil { + return fmt.Errorf("error reading 'spec': %w", err) + } + delete(object, "spec") + } + + if raw, found := object["tables"]; found { + err = json.Unmarshal(raw, &a.Tables) + if err != nil { + return fmt.Errorf("error reading 'tables': %w", err) + } + delete(object, "tables") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ConnectorAuthRequestAWS to handle AdditionalProperties +func (a ConnectorAuthRequestAWS) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Env != nil { + object["env"], err = json.Marshal(a.Env) + if err != nil { + return nil, fmt.Errorf("error marshaling 'env': %w", err) + } + } + + object["plugin_kind"], err = json.Marshal(a.PluginKind) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_kind': %w", err) + } + + object["plugin_name"], err = json.Marshal(a.PluginName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_name': %w", err) + } + + object["plugin_team"], err = json.Marshal(a.PluginTeam) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_team': %w", err) + } + + if a.PluginVersion != nil { + object["plugin_version"], err = json.Marshal(a.PluginVersion) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_version': %w", err) + } + } + + if a.SkipDependentTables != nil { + object["skip_dependent_tables"], err = json.Marshal(a.SkipDependentTables) + if err != nil { + return nil, fmt.Errorf("error marshaling 'skip_dependent_tables': %w", err) + } + } + + if a.SkipTables != nil { + object["skip_tables"], err = json.Marshal(a.SkipTables) + if err != nil { + return nil, fmt.Errorf("error marshaling 'skip_tables': %w", err) + } + } + + if a.Spec != nil { + object["spec"], err = json.Marshal(a.Spec) + if err != nil { + return nil, fmt.Errorf("error marshaling 'spec': %w", err) + } + } + + if a.Tables != nil { + object["tables"], err = json.Marshal(a.Tables) + if err != nil { + return nil, fmt.Errorf("error marshaling 'tables': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for ConnectorAuthRequestOAuth. Returns the specified // element and whether it was found func (a ConnectorAuthRequestOAuth) Get(fieldName string) (value interface{}, found bool) { @@ -3459,6 +3706,30 @@ func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { delete(object, "plugin_team") } + if raw, found := object["plugin_version"]; found { + err = json.Unmarshal(raw, &a.PluginVersion) + if err != nil { + return fmt.Errorf("error reading 'plugin_version': %w", err) + } + delete(object, "plugin_version") + } + + if raw, found := object["skip_dependent_tables"]; found { + err = json.Unmarshal(raw, &a.SkipDependentTables) + if err != nil { + return fmt.Errorf("error reading 'skip_dependent_tables': %w", err) + } + delete(object, "skip_dependent_tables") + } + + if raw, found := object["skip_tables"]; found { + err = json.Unmarshal(raw, &a.SkipTables) + if err != nil { + return fmt.Errorf("error reading 'skip_tables': %w", err) + } + delete(object, "skip_tables") + } + if raw, found := object["spec"]; found { err = json.Unmarshal(raw, &a.Spec) if err != nil { @@ -3467,6 +3738,14 @@ func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { delete(object, "spec") } + if raw, found := object["tables"]; found { + err = json.Unmarshal(raw, &a.Tables) + if err != nil { + return fmt.Errorf("error reading 'tables': %w", err) + } + delete(object, "tables") + } + if len(object) != 0 { a.AdditionalProperties = make(map[string]interface{}) for fieldName, fieldBuf := range object { @@ -3513,6 +3792,27 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'plugin_team': %w", err) } + if a.PluginVersion != nil { + object["plugin_version"], err = json.Marshal(a.PluginVersion) + if err != nil { + return nil, fmt.Errorf("error marshaling 'plugin_version': %w", err) + } + } + + if a.SkipDependentTables != nil { + object["skip_dependent_tables"], err = json.Marshal(a.SkipDependentTables) + if err != nil { + return nil, fmt.Errorf("error marshaling 'skip_dependent_tables': %w", err) + } + } + + if a.SkipTables != nil { + object["skip_tables"], err = json.Marshal(a.SkipTables) + if err != nil { + return nil, fmt.Errorf("error marshaling 'skip_tables': %w", err) + } + } + if a.Spec != nil { object["spec"], err = json.Marshal(a.Spec) if err != nil { @@ -3520,6 +3820,13 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { } } + if a.Tables != nil { + object["tables"], err = json.Marshal(a.Tables) + if err != nil { + return nil, fmt.Errorf("error marshaling 'tables': %w", err) + } + } + for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { diff --git a/spec.json b/spec.json index 71d2e5f..dced90c 100644 --- a/spec.json +++ b/spec.json @@ -8438,6 +8438,14 @@ "type" : "string", "x-go-name" : "SyncSourceTestConnectionID" }, + "DisplayName" : { + "description" : "A human-readable display name", + "example" : "Human Readable Name", + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", + "type" : "string" + }, "PromoteSyncSourceTestConnection" : { "description" : "Sync Source Definition", "properties" : { @@ -8447,6 +8455,9 @@ "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "tables" : { "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items" : { @@ -8479,6 +8490,9 @@ "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "path" : { "$ref" : "#/components/schemas/SyncPluginPath" }, @@ -8671,6 +8685,9 @@ "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "write_mode" : { "$ref" : "#/components/schemas/SyncDestinationWriteMode" }, @@ -8690,6 +8707,9 @@ "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "path" : { "$ref" : "#/components/schemas/SyncPluginPath" }, @@ -8761,6 +8781,9 @@ "SyncSourceUpdate" : { "description" : "Sync Source Update Definition", "properties" : { + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "tables" : { "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", "items" : { @@ -8826,6 +8849,9 @@ "SyncDestinationUpdate" : { "description" : "Sync Destination Update Definition", "properties" : { + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "write_mode" : { "$ref" : "#/components/schemas/SyncDestinationWriteMode" }, @@ -8862,6 +8888,9 @@ "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "source" : { "description" : "Unique name of the source", "type" : "string" @@ -8920,6 +8949,9 @@ "pattern" : "^[a-zA-Z0-9_-]+$", "type" : "string" }, + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "source" : { "description" : "Unique name of the source", "pattern" : "^[a-zA-Z0-9_-]+$", @@ -8978,6 +9010,9 @@ "SyncUpdate" : { "description" : "Managed Sync definition", "properties" : { + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, "source" : { "description" : "Unique name of the source", "pattern" : "^[a-zA-Z0-9_-]+$", @@ -9270,23 +9305,50 @@ } }, "ConnectorAuthRequestAWS" : { - "additionalProperties" : false, + "additionalProperties" : { }, "description" : "AWS connector authentication request to start the authentication process", "properties" : { "plugin_team" : { "description" : "Team that owns the plugin we are authenticating the connector for", - "example" : "cloudquery", - "type" : "string" + "example" : "cloudquery" }, "plugin_kind" : { "description" : "Kind of the plugin", - "example" : "source", - "type" : "string" + "example" : "source" }, "plugin_name" : { "description" : "Name of the plugin", - "example" : "aws", - "type" : "string" + "example" : "aws" + }, + "plugin_version" : { + "description" : "Version of the plugin", + "example" : "v27.1.0" + }, + "spec" : { + "additionalProperties" : false, + "format" : "Plugin parameters, specific to each plugin", + "type" : "object" + }, + "env" : { + "description" : "Environment variables used in the spec.", + "items" : { + "$ref" : "#/components/schemas/SyncEnvCreate" + } + }, + "tables" : { + "description" : "Tables to authenticate, setting from the outer spec", + "items" : { + "example" : "aws_s3_buckets" + } + }, + "skip_tables" : { + "description" : "Tables to skip authentication, setting from the outer spec", + "items" : { + "example" : "aws_s3_buckets" + } + }, + "skip_dependent_tables" : { + "description" : "Whether to skip dependent tables, setting from the outer spec" } }, "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] @@ -9354,6 +9416,10 @@ "description" : "Name of the plugin", "example" : "googleanalytics" }, + "plugin_version" : { + "description" : "Version of the plugin", + "example" : "v3.0.0" + }, "base_url" : { "description" : "Base of the URL the callback url will be constructed from", "example" : "https://cloud.cloudquery.io/oauth", @@ -9369,6 +9435,21 @@ "items" : { "$ref" : "#/components/schemas/SyncEnvCreate" } + }, + "tables" : { + "description" : "Tables to authenticate, setting from the outer spec", + "items" : { + "example" : "github_organizations" + } + }, + "skip_tables" : { + "description" : "Tables to skip authentication, setting from the outer spec", + "items" : { + "example" : "github_organizations" + } + }, + "skip_dependent_tables" : { + "description" : "Whether to skip dependent tables, setting from the outer spec" } }, "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] From 877306f88ede298d88e5821ca8a26891e78f9bc9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:55:13 +0300 Subject: [PATCH 207/343] fix: Generate CloudQuery Go API Client from `spec.json` (#218) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 505 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 27 +++ spec.json | 162 ++++++++++++++++ 3 files changed, 694 insertions(+) diff --git a/client.gen.go b/client.gen.go index f4c350f..d3fba9a 100644 --- a/client.gen.go +++ b/client.gen.go @@ -338,6 +338,17 @@ type ClientInterface interface { AuthenticateConnectorAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetConnectorAuthStatusGCP request + GetConnectorAuthStatusGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthenticateConnectorGCPWithBody request with any body + AuthenticateConnectorGCPWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AuthenticateConnectorGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthenticateConnectorFinishGCP request + AuthenticateConnectorFinishGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) + // AuthenticateConnectorFinishOAuthWithBody request with any body AuthenticateConnectorFinishOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1685,6 +1696,54 @@ func (c *Client) AuthenticateConnectorAWS(ctx context.Context, teamName TeamName return c.Client.Do(req) } +func (c *Client) GetConnectorAuthStatusGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetConnectorAuthStatusGCPRequest(c.Server, teamName, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorGCPWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorGCPRequestWithBody(c.Server, teamName, connectorID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorGCPRequest(c.Server, teamName, connectorID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AuthenticateConnectorFinishGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthenticateConnectorFinishGCPRequest(c.Server, teamName, connectorID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) AuthenticateConnectorFinishOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAuthenticateConnectorFinishOAuthRequestWithBody(c.Server, teamName, connectorID, contentType, body) if err != nil { @@ -6776,6 +6835,142 @@ func NewAuthenticateConnectorAWSRequestWithBody(server string, teamName TeamName return req, nil } +// NewGetConnectorAuthStatusGCPRequest generates requests for GetConnectorAuthStatusGCP +func NewGetConnectorAuthStatusGCPRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/gcp", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewAuthenticateConnectorGCPRequest calls the generic AuthenticateConnectorGCP builder with application/json body +func NewAuthenticateConnectorGCPRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAuthenticateConnectorGCPRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) +} + +// NewAuthenticateConnectorGCPRequestWithBody generates requests for AuthenticateConnectorGCP with any type of body +func NewAuthenticateConnectorGCPRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/gcp", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAuthenticateConnectorFinishGCPRequest generates requests for AuthenticateConnectorFinishGCP +func NewAuthenticateConnectorFinishGCPRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/gcp/finish", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewAuthenticateConnectorFinishOAuthRequest calls the generic AuthenticateConnectorFinishOAuth builder with application/json body func NewAuthenticateConnectorFinishOAuthRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -10943,6 +11138,17 @@ type ClientWithResponsesInterface interface { AuthenticateConnectorAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) + // GetConnectorAuthStatusGCPWithResponse request + GetConnectorAuthStatusGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusGCPResponse, error) + + // AuthenticateConnectorGCPWithBodyWithResponse request with any body + AuthenticateConnectorGCPWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) + + AuthenticateConnectorGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) + + // AuthenticateConnectorFinishGCPWithResponse request + AuthenticateConnectorFinishGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishGCPResponse, error) + // AuthenticateConnectorFinishOAuthWithBodyWithResponse request with any body AuthenticateConnectorFinishOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) @@ -12895,6 +13101,87 @@ func (r AuthenticateConnectorAWSResponse) StatusCode() int { return 0 } +type GetConnectorAuthStatusGCPResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetConnectorAuthStatusGCP200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetConnectorAuthStatusGCPResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetConnectorAuthStatusGCPResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AuthenticateConnectorGCPResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ConnectorAuthResponseGCP + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AuthenticateConnectorGCPResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthenticateConnectorGCPResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AuthenticateConnectorFinishGCPResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AuthenticateConnectorFinishGCPResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthenticateConnectorFinishGCPResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type AuthenticateConnectorFinishOAuthResponse struct { Body []byte HTTPResponse *http.Response @@ -15568,6 +15855,41 @@ func (c *ClientWithResponses) AuthenticateConnectorAWSWithResponse(ctx context.C return ParseAuthenticateConnectorAWSResponse(rsp) } +// GetConnectorAuthStatusGCPWithResponse request returning *GetConnectorAuthStatusGCPResponse +func (c *ClientWithResponses) GetConnectorAuthStatusGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusGCPResponse, error) { + rsp, err := c.GetConnectorAuthStatusGCP(ctx, teamName, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetConnectorAuthStatusGCPResponse(rsp) +} + +// AuthenticateConnectorGCPWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorGCPResponse +func (c *ClientWithResponses) AuthenticateConnectorGCPWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) { + rsp, err := c.AuthenticateConnectorGCPWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorGCPResponse(rsp) +} + +func (c *ClientWithResponses) AuthenticateConnectorGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) { + rsp, err := c.AuthenticateConnectorGCP(ctx, teamName, connectorID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorGCPResponse(rsp) +} + +// AuthenticateConnectorFinishGCPWithResponse request returning *AuthenticateConnectorFinishGCPResponse +func (c *ClientWithResponses) AuthenticateConnectorFinishGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishGCPResponse, error) { + rsp, err := c.AuthenticateConnectorFinishGCP(ctx, teamName, connectorID, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthenticateConnectorFinishGCPResponse(rsp) +} + // AuthenticateConnectorFinishOAuthWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishOAuthResponse func (c *ClientWithResponses) AuthenticateConnectorFinishOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) { rsp, err := c.AuthenticateConnectorFinishOAuthWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) @@ -19885,6 +20207,189 @@ func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateCon return response, nil } +// ParseGetConnectorAuthStatusGCPResponse parses an HTTP response from a GetConnectorAuthStatusGCPWithResponse call +func ParseGetConnectorAuthStatusGCPResponse(rsp *http.Response) (*GetConnectorAuthStatusGCPResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetConnectorAuthStatusGCPResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetConnectorAuthStatusGCP200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAuthenticateConnectorGCPResponse parses an HTTP response from a AuthenticateConnectorGCPWithResponse call +func ParseAuthenticateConnectorGCPResponse(rsp *http.Response) (*AuthenticateConnectorGCPResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthenticateConnectorGCPResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorAuthResponseGCP + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAuthenticateConnectorFinishGCPResponse parses an HTTP response from a AuthenticateConnectorFinishGCPWithResponse call +func ParseAuthenticateConnectorFinishGCPResponse(rsp *http.Response) (*AuthenticateConnectorFinishGCPResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthenticateConnectorFinishGCPResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseAuthenticateConnectorFinishOAuthResponse parses an HTTP response from a AuthenticateConnectorFinishOAuthWithResponse call func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*AuthenticateConnectorFinishOAuthResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 96fdcc9..3eec8ab 100644 --- a/models.gen.go +++ b/models.gen.go @@ -635,6 +635,18 @@ type ConnectorAuthRequestAWS struct { AdditionalProperties map[string]interface{} `json:"-"` } +// ConnectorAuthRequestGCP GCP connector authentication request to start the authentication process +type ConnectorAuthRequestGCP struct { + // PluginKind Kind of the plugin + PluginKind string `json:"plugin_kind"` + + // PluginName Name of the plugin + PluginName string `json:"plugin_name"` + + // PluginTeam Team that owns the plugin we are authenticating the connector for + PluginTeam string `json:"plugin_team"` +} + // ConnectorAuthRequestOAuth OAuth connector authentication request to start the authentication process type ConnectorAuthRequestOAuth struct { // BaseURL Base of the URL the callback url will be constructed from @@ -682,6 +694,12 @@ type ConnectorAuthResponseAWS struct { SuggestedPolicyARNs []string `json:"suggested_policy_arns"` } +// ConnectorAuthResponseGCP GCP connector authentication response to start the authentication process +type ConnectorAuthResponseGCP struct { + // ServiceAccount CloudQuery GCP Service Account to grant access to + ServiceAccount string `json:"service_account"` +} + // ConnectorAuthResponseOAuth OAuth connector authentication response to start the authentication process type ConnectorAuthResponseOAuth struct { // RedirectURL URL to redirect the user to, to authenticate @@ -896,6 +914,12 @@ type GetConnectorAuthStatusAWS200Response struct { RoleARN *string `json:"role_arn,omitempty"` } +// GetConnectorAuthStatusGCP200Response defines model for GetConnectorAuthStatusGCP_200_response. +type GetConnectorAuthStatusGCP200Response struct { + // ServiceAccount CloudQuery GCP Service Account to grant access to + ServiceAccount *string `json:"service_account,omitempty"` +} + // GetCurrentUserMemberships200Response defines model for GetCurrentUserMemberships_200_response. type GetCurrentUserMemberships200Response struct { Items []MembershipWithTeam `json:"items"` @@ -3275,6 +3299,9 @@ type AuthenticateConnectorFinishAWSJSONRequestBody = ConnectorAuthFinishRequestA // AuthenticateConnectorAWSJSONRequestBody defines body for AuthenticateConnectorAWS for application/json ContentType. type AuthenticateConnectorAWSJSONRequestBody = ConnectorAuthRequestAWS +// AuthenticateConnectorGCPJSONRequestBody defines body for AuthenticateConnectorGCP for application/json ContentType. +type AuthenticateConnectorGCPJSONRequestBody = ConnectorAuthRequestGCP + // AuthenticateConnectorFinishOAuthJSONRequestBody defines body for AuthenticateConnectorFinishOAuth for application/json ContentType. type AuthenticateConnectorFinishOAuthJSONRequestBody = ConnectorAuthFinishRequestOAuth diff --git a/spec.json b/spec.json index dced90c..e221819 100644 --- a/spec.json +++ b/spec.json @@ -5719,6 +5719,127 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/connectors/{connector_id}/authenticate/gcp" : { + "get" : { + "description" : "Get authentication status for the given GCP connector", + "operationId" : "GetConnectorAuthStatusGCP", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetConnectorAuthStatusGCP_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + }, + "post" : { + "description" : "Authenticate or reauthenticate the given GCP connector", + "operationId" : "AuthenticateConnectorGCP", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthRequestGCP" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseGCP" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, + "/teams/{team_name}/connectors/{connector_id}/authenticate/gcp/finish" : { + "post" : { + "description" : "Complete authentication for the given GCP connector", + "operationId" : "AuthenticateConnectorFinishGCP", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/connector_id" + } ], + "responses" : { + "204" : { + "description" : "Authentication is complete." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, "/teams/{team_name}/connectors/{connector_id}/authenticate/oauth" : { "patch" : { "description" : "Complete authentication for the given OAuth connector", @@ -9400,6 +9521,39 @@ }, "required" : [ "role_arn" ] }, + "ConnectorAuthRequestGCP" : { + "additionalProperties" : false, + "description" : "GCP connector authentication request to start the authentication process", + "properties" : { + "plugin_team" : { + "description" : "Team that owns the plugin we are authenticating the connector for", + "example" : "cloudquery", + "type" : "string" + }, + "plugin_kind" : { + "description" : "Kind of the plugin", + "example" : "source", + "type" : "string" + }, + "plugin_name" : { + "description" : "Name of the plugin", + "example" : "aws", + "type" : "string" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] + }, + "ConnectorAuthResponseGCP" : { + "additionalProperties" : false, + "description" : "GCP connector authentication response to start the authentication process", + "properties" : { + "service_account" : { + "description" : "CloudQuery GCP Service Account to grant access to", + "type" : "string" + } + }, + "required" : [ "service_account" ] + }, "ConnectorAuthRequestOAuth" : { "additionalProperties" : { }, "description" : "OAuth connector authentication request to start the authentication process", @@ -10330,6 +10484,14 @@ } } }, + "GetConnectorAuthStatusGCP_200_response" : { + "properties" : { + "service_account" : { + "description" : "CloudQuery GCP Service Account to grant access to", + "type" : "string" + } + } + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From c9ba02b6d3238c6413e193c8f7f8ff941051b3ec Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:24:43 +0300 Subject: [PATCH 208/343] fix: Generate CloudQuery Go API Client from `spec.json` (#219) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 11 +++++++++++ spec.json | 34 +++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/client.gen.go b/client.gen.go index d3fba9a..8677550 100644 --- a/client.gen.go +++ b/client.gen.go @@ -11727,6 +11727,7 @@ func (r UploadAddonAssetResponse) StatusCode() int { type CQHealthCheckResponse struct { Body []byte HTTPResponse *http.Response + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -17368,6 +17369,16 @@ func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, err HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } diff --git a/spec.json b/spec.json index e221819..43cef10 100644 --- a/spec.json +++ b/spec.json @@ -16,7 +16,8 @@ "version" : "1.0.0" }, "servers" : [ { - "url" : "https://api.cloudquery.io" + "url" : "https://api.cloudquery.io", + "x-internal" : false } ], "security" : [ { "bearerAuth" : [ ] @@ -61,6 +62,9 @@ "responses" : { "200" : { "description" : "Response" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } }, "security" : [ ], @@ -6395,19 +6399,6 @@ } }, "schemas" : { - "ImageURL" : { - "properties" : { - "upload_url" : { - "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", - "type" : "string" - }, - "download_url" : { - "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", - "type" : "string" - } - }, - "required" : [ "download_url", "upload_url" ] - }, "BasicError" : { "additionalProperties" : false, "description" : "Basic Error", @@ -6422,6 +6413,19 @@ "required" : [ "message", "status" ], "title" : "Basic Error" }, + "ImageURL" : { + "properties" : { + "upload_url" : { + "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", + "type" : "string" + }, + "download_url" : { + "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", + "type" : "string" + } + }, + "required" : [ "download_url", "upload_url" ] + }, "TeamName" : { "description" : "The unique name for the team.", "example" : "cloudquery", @@ -8564,7 +8568,7 @@ "example" : "Human Readable Name", "maxLength" : 255, "minLength" : 1, - "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", + "pattern" : "^[a-zA-Z\\p{L}\\p{N}_][a-zA-Z\\p{L}\\p{N}_ \\-']*$", "type" : "string" }, "PromoteSyncSourceTestConnection" : { From 39b9bd156dbeb2daa9495d6600f4769ab033aaa7 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 15 Aug 2024 19:31:44 +0300 Subject: [PATCH 209/343] fix: Generate CloudQuery Go API Client from `spec.json` (#220) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 2 +- spec.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index 3eec8ab..9a74182 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1994,7 +1994,7 @@ type Sync struct { Disabled bool `json:"disabled"` // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` + DisplayName DisplayName `json:"display_name"` // Incremental Managed Sync Incremental Options definition Incremental *SyncIncremental `json:"incremental,omitempty"` diff --git a/spec.json b/spec.json index 43cef10..745f0b0 100644 --- a/spec.json +++ b/spec.json @@ -9064,7 +9064,7 @@ "type" : "string" } }, - "required" : [ "cpu", "created_at", "destinations", "disabled", "memory", "name", "schedule", "source", "updated_at" ] + "required" : [ "cpu", "created_at", "destinations", "disabled", "display_name", "memory", "name", "schedule", "source", "updated_at" ] }, "SyncCreate" : { "description" : "Managed Sync definition", From cc7d1ee5ab0fbfa409e140c084cfb70fe49255dd Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 16 Aug 2024 14:12:57 +0300 Subject: [PATCH 210/343] fix: Generate CloudQuery Go API Client from `spec.json` (#221) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 2 ++ spec.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/models.gen.go b/models.gen.go index 9a74182..c83d4fd 100644 --- a/models.gen.go +++ b/models.gen.go @@ -80,9 +80,11 @@ const ( const ( PluginCategoryCloudFinops PluginCategory = "cloud-finops" PluginCategoryCloudInfrastructure PluginCategory = "cloud-infrastructure" + PluginCategoryCustomerSupport PluginCategory = "customer-support" PluginCategoryDataWarehouses PluginCategory = "data-warehouses" PluginCategoryDatabases PluginCategory = "databases" PluginCategoryEngineeringAnalytics PluginCategory = "engineering-analytics" + PluginCategoryFinance PluginCategory = "finance" PluginCategoryFleetManagement PluginCategory = "fleet-management" PluginCategoryHumanResources PluginCategory = "human-resources" PluginCategoryMarketingAnalytics PluginCategory = "marketing-analytics" diff --git a/spec.json b/spec.json index 745f0b0..eea40ba 100644 --- a/spec.json +++ b/spec.json @@ -6528,7 +6528,7 @@ }, "PluginCategory" : { "description" : "Supported categories for plugins", - "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "other" ], + "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "finance", "customer-support", "other" ], "type" : "string" }, "PluginPriceCategory" : { From 37a6d790379aeb8ecda4a759b38a1cfa11ec28e8 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 16 Aug 2024 14:15:34 +0300 Subject: [PATCH 211/343] chore(main): Release v1.12.8 (#216) --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e95c18..717006c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.12.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.7...v1.12.8) (2024-08-16) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#215](https://github.com/cloudquery/cloudquery-api-go/issues/215)) ([1f15d68](https://github.com/cloudquery/cloudquery-api-go/commit/1f15d68d2af2adaa53f83154cc28a2bed9c4582f)) +* Generate CloudQuery Go API Client from `spec.json` ([#217](https://github.com/cloudquery/cloudquery-api-go/issues/217)) ([d230b6b](https://github.com/cloudquery/cloudquery-api-go/commit/d230b6b22b69ab6d6e9b788cb070d97473fab67e)) +* Generate CloudQuery Go API Client from `spec.json` ([#218](https://github.com/cloudquery/cloudquery-api-go/issues/218)) ([877306f](https://github.com/cloudquery/cloudquery-api-go/commit/877306f88ede298d88e5821ca8a26891e78f9bc9)) +* Generate CloudQuery Go API Client from `spec.json` ([#219](https://github.com/cloudquery/cloudquery-api-go/issues/219)) ([c9ba02b](https://github.com/cloudquery/cloudquery-api-go/commit/c9ba02b6d3238c6413e193c8f7f8ff941051b3ec)) +* Generate CloudQuery Go API Client from `spec.json` ([#220](https://github.com/cloudquery/cloudquery-api-go/issues/220)) ([39b9bd1](https://github.com/cloudquery/cloudquery-api-go/commit/39b9bd156dbeb2daa9495d6600f4769ab033aaa7)) +* Generate CloudQuery Go API Client from `spec.json` ([#221](https://github.com/cloudquery/cloudquery-api-go/issues/221)) ([cc7d1ee](https://github.com/cloudquery/cloudquery-api-go/commit/cc7d1ee5ab0fbfa409e140c084cfb70fe49255dd)) + ## [1.12.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.6...v1.12.7) (2024-08-06) From 0e19de5955c01520b2decce8ebc0d848448c68ad Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:31:23 +0300 Subject: [PATCH 212/343] fix: Generate CloudQuery Go API Client from `spec.json` (#222) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 1 + spec.json | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index c83d4fd..e59f7eb 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2521,6 +2521,7 @@ type Team struct { // DisplayName The team's display name DisplayName string `json:"display_name"` + Internal bool `json:"internal"` IsTrialActive bool `json:"is_trial_active"` // Name The unique name for the team. diff --git a/spec.json b/spec.json index eea40ba..5099365 100644 --- a/spec.json +++ b/spec.json @@ -7709,9 +7709,13 @@ "example" : "CloudQuery", "maxLength" : 255, "type" : "string" + }, + "internal" : { + "example" : false, + "type" : "boolean" } }, - "required" : [ "display_name", "is_trial_active", "name", "plan" ], + "required" : [ "display_name", "internal", "is_trial_active", "name", "plan" ], "title" : "Team" }, "TeamImageCreate" : { @@ -10271,7 +10275,8 @@ "name" : "cloudquery", "display_name" : "CloudQuery", "plan" : "free", - "is_trial_active" : false + "is_trial_active" : false, + "internal" : false } } ], "items" : { From 5e3e6058b07b54568126449631aabbf46a531be7 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:30:06 +0300 Subject: [PATCH 213/343] chore(main): Release v1.12.9 (#223) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 717006c..4248a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.12.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.8...v1.12.9) (2024-08-19) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#222](https://github.com/cloudquery/cloudquery-api-go/issues/222)) ([0e19de5](https://github.com/cloudquery/cloudquery-api-go/commit/0e19de5955c01520b2decce8ebc0d848448c68ad)) + ## [1.12.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.7...v1.12.8) (2024-08-16) From 6311b438f0b50f96114f7aba5057586056ae092d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:16:42 +0300 Subject: [PATCH 214/343] fix: Generate CloudQuery Go API Client from `spec.json` (#225) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 2 +- spec.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models.gen.go b/models.gen.go index e59f7eb..7fb482f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2972,7 +2972,7 @@ type AuthRegistryRequestParams struct { // Account Username used for `docker login` Account *string `form:"account,omitempty" json:"account,omitempty"` - // Service Service requesting the JTW token + // Service Service requesting the JWT token Service *string `form:"service,omitempty" json:"service,omitempty"` // Scope Multi-value string containing the repository being access and the operation type (push/pull) diff --git a/spec.json b/spec.json index 5099365..c00a940 100644 --- a/spec.json +++ b/spec.json @@ -3808,7 +3808,7 @@ }, "style" : "form" }, { - "description" : "Service requesting the JTW token", + "description" : "Service requesting the JWT token", "explode" : true, "in" : "query", "name" : "service", From 882b4b8bcab6f55e055a8682c65e8d9249cf17af Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:59:38 +0300 Subject: [PATCH 215/343] fix: Generate CloudQuery Go API Client from `spec.json` (#227) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 305 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 82 ++++++++++++++ spec.json | 107 ++++++++++++++++++ 3 files changed, 494 insertions(+) diff --git a/client.gen.go b/client.gen.go index 8677550..67b3d2a 100644 --- a/client.gen.go +++ b/client.gen.go @@ -609,9 +609,17 @@ type ClientInterface interface { // ListCurrentUserInvitations request ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // LoginUserWithBody request with any body + LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetCurrentUserMemberships request GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateUserToken request + CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteUser request DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) } @@ -2884,6 +2892,30 @@ func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCur return c.Client.Do(req) } +func (c *Client) LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLoginUserRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLoginUserRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetCurrentUserMembershipsRequest(c.Server, params) if err != nil { @@ -2896,6 +2928,18 @@ func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurre return c.Client.Do(req) } +func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUserTokenRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteUserRequest(c.Server, userID) if err != nil { @@ -10751,6 +10795,46 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser return req, nil } +// NewLoginUserRequest calls the generic LoginUser builder with application/json body +func NewLoginUserRequest(server string, body LoginUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewLoginUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewLoginUserRequestWithBody generates requests for LoginUser with any type of body +func NewLoginUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/login") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { var err error @@ -10816,6 +10900,33 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return req, nil } +// NewCreateUserTokenRequest generates requests for CreateUserToken +func NewCreateUserTokenRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/token") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewDeleteUserRequest generates requests for DeleteUser func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { var err error @@ -11409,9 +11520,17 @@ type ClientWithResponsesInterface interface { // ListCurrentUserInvitationsWithResponse request ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) + // LoginUserWithBodyWithResponse request with any body + LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) + + LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) + // GetCurrentUserMembershipsWithResponse request GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) + // CreateUserTokenWithResponse request + CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) + // DeleteUserWithResponse request DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) } @@ -15019,6 +15138,33 @@ func (r ListCurrentUserInvitationsResponse) StatusCode() int { return 0 } +type LoginUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r LoginUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LoginUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetCurrentUserMembershipsResponse struct { Body []byte HTTPResponse *http.Response @@ -15044,6 +15190,31 @@ func (r GetCurrentUserMembershipsResponse) StatusCode() int { return 0 } +type CreateUserTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateUserToken201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateUserTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateUserTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteUserResponse struct { Body []byte HTTPResponse *http.Response @@ -16721,6 +16892,23 @@ func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context return ParseListCurrentUserInvitationsResponse(rsp) } +// LoginUserWithBodyWithResponse request with arbitrary body returning *LoginUserResponse +func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { + rsp, err := c.LoginUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLoginUserResponse(rsp) +} + +func (c *ClientWithResponses) LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { + rsp, err := c.LoginUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLoginUserResponse(rsp) +} + // GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) @@ -16730,6 +16918,15 @@ func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context. return ParseGetCurrentUserMembershipsResponse(rsp) } +// CreateUserTokenWithResponse request returning *CreateUserTokenResponse +func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) { + rsp, err := c.CreateUserToken(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateUserTokenResponse(rsp) +} + // DeleteUserWithResponse request returning *DeleteUserResponse func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { rsp, err := c.DeleteUser(ctx, userID, reqEditors...) @@ -24296,6 +24493,67 @@ func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUs return response, nil } +// ParseLoginUserResponse parses an HTTP response from a LoginUserWithResponse call +func ParseLoginUserResponse(rsp *http.Response) (*LoginUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LoginUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetCurrentUserMembershipsResponse parses an HTTP response from a GetCurrentUserMembershipsWithResponse call func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUserMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -24343,6 +24601,53 @@ func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUser return response, nil } +// ParseCreateUserTokenResponse parses an HTTP response from a CreateUserTokenWithResponse call +func ParseCreateUserTokenResponse(rsp *http.Response) (*CreateUserTokenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateUserTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateUserToken201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 7fb482f..709687a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -14,6 +14,7 @@ import ( const ( BasicAuthScopes = "basicAuth.Scopes" BearerAuthScopes = "bearerAuth.Scopes" + CookieAuthScopes = "cookieAuth.Scopes" ) // Defines values for APIKeyScope. @@ -858,6 +859,12 @@ type CreateTeamRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// CreateUserToken201Response defines model for CreateUserToken_201_response. +type CreateUserToken201Response struct { + // CustomToken Token to exchange for refresh token + CustomToken string `json:"custom_token"` +} + // DeletePluginVersionDocsRequest defines model for DeletePluginVersionDocs_request. type DeletePluginVersionDocsRequest struct { Names []PluginDocsPageName `json:"names"` @@ -1252,6 +1259,12 @@ type ListUsersByTeam200Response struct { Metadata ListMetadata `json:"metadata"` } +// LoginUserRequest defines model for LoginUser_request. +type LoginUserRequest struct { + IDToken interface{} `json:"id_token"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // ManagedDatabase Managed Database definition type ManagedDatabase struct { // ConnectionString The connection string to the database @@ -3380,6 +3393,9 @@ type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest +// LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType. +type LoginUserJSONRequestBody = LoginUserRequest + // Getter for additional properties for ConnectorAuthFinishRequestOAuth. Returns the specified // element and whether it was found func (a ConnectorAuthFinishRequestOAuth) Get(fieldName string) (value interface{}, found bool) { @@ -3945,6 +3961,72 @@ func (a CreateTeamRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for LoginUserRequest. Returns the specified +// element and whether it was found +func (a LoginUserRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for LoginUserRequest +func (a *LoginUserRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for LoginUserRequest to handle AdditionalProperties +func (a *LoginUserRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["id_token"]; found { + err = json.Unmarshal(raw, &a.IDToken) + if err != nil { + return fmt.Errorf("error reading 'id_token': %w", err) + } + delete(object, "id_token") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for LoginUserRequest to handle AdditionalProperties +func (a LoginUserRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["id_token"], err = json.Marshal(a.IDToken) + if err != nil { + return nil, fmt.Errorf("error marshaling 'id_token': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for SpendSummary. Returns the specified // element and whether it was found func (a SpendSummary) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index c00a940..0608af3 100644 --- a/spec.json +++ b/spec.json @@ -21,6 +21,8 @@ } ], "security" : [ { "bearerAuth" : [ ] + }, { + "cookieAuth" : [ ] } ], "tags" : [ { "name" : "users" @@ -3573,6 +3575,89 @@ "tags" : [ "users" ] } }, + "/user/login" : { + "post" : { + "description" : "Start a session using ID token", + "operationId" : "LoginUser", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/LoginUser_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Authentication is complete.", + "headers" : { + "Set-Cookie" : { + "description" : "Session cookie", + "explode" : false, + "schema" : { + "example" : "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=Strict; Path=/; Max-Age=3600", + "type" : "string" + }, + "style" : "simple" + } + } + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ] + } + }, + "/user/token" : { + "post" : { + "description" : "Start a CLI session and create a custom token", + "operationId" : "CreateUserToken", + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateUserToken_201_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ { + "cookieAuth" : [ ] + } ], + "tags" : [ "users" ] + } + }, "/user/invitations" : { "get" : { "description" : "List of the current user's unaccepted invitations", @@ -10251,6 +10336,24 @@ } } }, + "LoginUser_request" : { + "additionalProperties" : { }, + "properties" : { + "id_token" : { + "x-go-name" : "IDToken" + } + }, + "required" : [ "id_token" ] + }, + "CreateUserToken_201_response" : { + "properties" : { + "custom_token" : { + "description" : "Token to exchange for refresh token", + "type" : "string" + } + }, + "required" : [ "custom_token" ] + }, "ListCurrentUserInvitations_200_response" : { "properties" : { "items" : { @@ -10567,6 +10670,10 @@ "basicAuth" : { "scheme" : "basic", "type" : "http" + }, + "cookieAuth" : { + "scheme" : "cookie", + "type" : "http" } } } From b29625e4e682c352996f846d5eca30c54498287c Mon Sep 17 00:00:00 2001 From: James Riley Wilburn Date: Wed, 21 Aug 2024 09:45:45 -0400 Subject: [PATCH 216/343] feat: add team_internal config key (#224) This adds a `team_internal` config key to be used to store if the current team is CloudQuery-internal. --- config/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/config/config.go b/config/config.go index 7b259e3..1d97b55 100644 --- a/config/config.go +++ b/config/config.go @@ -14,6 +14,7 @@ const configPath = "cloudquery/config.json" var configKeys = []string{ "team", + "team_internal", } // SetConfigHome sets the configuration home directory - useful for testing From 621b8bff383fbbff60e39de0d257aeea0fdeedb4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 21 Aug 2024 18:53:26 +0300 Subject: [PATCH 217/343] chore(main): Release v1.13.0 (#226) --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4248a18..e8f64bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.13.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.9...v1.13.0) (2024-08-21) + + +### Features + +* add team_internal config key ([#224](https://github.com/cloudquery/cloudquery-api-go/issues/224)) ([b29625e](https://github.com/cloudquery/cloudquery-api-go/commit/b29625e4e682c352996f846d5eca30c54498287c)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#225](https://github.com/cloudquery/cloudquery-api-go/issues/225)) ([6311b43](https://github.com/cloudquery/cloudquery-api-go/commit/6311b438f0b50f96114f7aba5057586056ae092d)) +* Generate CloudQuery Go API Client from `spec.json` ([#227](https://github.com/cloudquery/cloudquery-api-go/issues/227)) ([882b4b8](https://github.com/cloudquery/cloudquery-api-go/commit/882b4b8bcab6f55e055a8682c65e8d9249cf17af)) + ## [1.12.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.8...v1.12.9) (2024-08-19) From 310278f4b5c9871cf3588007d4eb49e0f56b8e13 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:51:39 +0300 Subject: [PATCH 218/343] fix: Generate CloudQuery Go API Client from `spec.json` (#228) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ++++++ spec.json | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/models.gen.go b/models.gen.go index 709687a..6de30a2 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1905,6 +1905,9 @@ type PromoteSyncDestinationTestConnection struct { // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` + // OverwriteDestination Set this to allow overwriting an existing sync destination. Defaults to true to preserve compatibility. + OverwriteDestination *bool `json:"overwrite_destination,omitempty"` + // WriteMode Write mode for the destination WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } @@ -1917,6 +1920,9 @@ type PromoteSyncSourceTestConnection struct { // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. Name string `json:"name"` + // OverwriteSource Set this to allow overwriting an existing sync source. Defaults to true to preserve compatibility. + OverwriteSource *bool `json:"overwrite_source,omitempty"` + // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. SkipTables *[]string `json:"skip_tables,omitempty"` diff --git a/spec.json b/spec.json index 0608af3..f861376 100644 --- a/spec.json +++ b/spec.json @@ -8685,6 +8685,10 @@ "type" : "string" }, "type" : "array" + }, + "overwrite_source" : { + "type" : "boolean", + "Description" : "Set this to allow overwriting an existing sync source. Defaults to true to preserve compatibility." } }, "required" : [ "name", "tables" ], @@ -8907,6 +8911,10 @@ }, "migrate_mode" : { "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + }, + "overwrite_destination" : { + "type" : "boolean", + "Description" : "Set this to allow overwriting an existing sync destination. Defaults to true to preserve compatibility." } }, "required" : [ "name" ], From 9fe67555586fc9ef924c361e06d96345b3af8f2d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 23 Aug 2024 15:40:12 +0300 Subject: [PATCH 219/343] fix: Generate CloudQuery Go API Client from `spec.json` (#230) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 7 +++++-- spec.json | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/models.gen.go b/models.gen.go index 6de30a2..625e023 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2786,8 +2786,11 @@ type User struct { ID openapi_types.UUID `json:"id"` // Name The unique name for the user. - Name *UserName `json:"name,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + Name *UserName `json:"name,omitempty"` + + // ProfileImageURL Profile image URL of user + ProfileImageURL *string `json:"profile_image_url,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` } // UserID ID of the User diff --git a/spec.json b/spec.json index f861376..960aa46 100644 --- a/spec.json +++ b/spec.json @@ -3597,7 +3597,7 @@ "description" : "Session cookie", "explode" : false, "schema" : { - "example" : "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=Strict; Path=/; Max-Age=3600", + "example" : "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600", "type" : "string" }, "style" : "simple" @@ -7966,6 +7966,11 @@ "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" + }, + "profile_image_url" : { + "description" : "Profile image URL of user", + "type" : "string", + "x-go-name" : "ProfileImageURL" } }, "required" : [ "email", "id" ], From b456ab79a3eea0ad6414c79b1fa9c8fb64f532f2 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:36:35 +0300 Subject: [PATCH 220/343] fix: Generate CloudQuery Go API Client from `spec.json` (#231) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++ spec.json | 39 ++++++++++++++ 2 files changed, 181 insertions(+) diff --git a/client.gen.go b/client.gen.go index 67b3d2a..13118e1 100644 --- a/client.gen.go +++ b/client.gen.go @@ -609,6 +609,9 @@ type ClientInterface interface { // ListCurrentUserInvitations request ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // LogoutUser request + LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // LoginUserWithBody request with any body LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2892,6 +2895,18 @@ func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCur return c.Client.Do(req) } +func (c *Client) LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLogoutUserRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewLoginUserRequestWithBody(c.Server, contentType, body) if err != nil { @@ -10795,6 +10810,33 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser return req, nil } +// NewLogoutUserRequest generates requests for LogoutUser +func NewLogoutUserRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/login") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewLoginUserRequest calls the generic LoginUser builder with application/json body func NewLoginUserRequest(server string, body LoginUserJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -11520,6 +11562,9 @@ type ClientWithResponsesInterface interface { // ListCurrentUserInvitationsWithResponse request ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) + // LogoutUserWithResponse request + LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) + // LoginUserWithBodyWithResponse request with any body LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) @@ -15138,6 +15183,33 @@ func (r ListCurrentUserInvitationsResponse) StatusCode() int { return 0 } +type LogoutUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r LogoutUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LogoutUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type LoginUserResponse struct { Body []byte HTTPResponse *http.Response @@ -16892,6 +16964,15 @@ func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context return ParseListCurrentUserInvitationsResponse(rsp) } +// LogoutUserWithResponse request returning *LogoutUserResponse +func (c *ClientWithResponses) LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) { + rsp, err := c.LogoutUser(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseLogoutUserResponse(rsp) +} + // LoginUserWithBodyWithResponse request with arbitrary body returning *LoginUserResponse func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { rsp, err := c.LoginUserWithBody(ctx, contentType, body, reqEditors...) @@ -24493,6 +24574,67 @@ func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUs return response, nil } +// ParseLogoutUserResponse parses an HTTP response from a LogoutUserWithResponse call +func ParseLogoutUserResponse(rsp *http.Response) (*LogoutUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LogoutUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseLoginUserResponse parses an HTTP response from a LoginUserWithResponse call func ParseLoginUserResponse(rsp *http.Response) (*LoginUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/spec.json b/spec.json index 960aa46..0f71c26 100644 --- a/spec.json +++ b/spec.json @@ -3576,6 +3576,45 @@ } }, "/user/login" : { + "delete" : { + "description" : "Logout a session", + "operationId" : "LogoutUser", + "responses" : { + "204" : { + "description" : "Logout is complete.", + "headers" : { + "Set-Cookie" : { + "description" : "Empty session cookie", + "explode" : false, + "schema" : { + "example" : "__session=; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600", + "type" : "string" + }, + "style" : "simple" + } + } + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + }, "post" : { "description" : "Start a session using ID token", "operationId" : "LoginUser", From 1e64d94a9a313dce58b77a7927e5c18d06d57b23 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:27:51 +0300 Subject: [PATCH 221/343] fix: Generate CloudQuery Go API Client from `spec.json` (#232) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 680 ++++++++++++++++++++++++++++++++++++++++++++++++-- models.gen.go | 428 +++++++++++++++++++++++++++++++ spec.json | 206 +++++++++++++++ 3 files changed, 1296 insertions(+), 18 deletions(-) diff --git a/client.gen.go b/client.gen.go index 13118e1..1f120b4 100644 --- a/client.gen.go +++ b/client.gen.go @@ -606,6 +606,16 @@ type ClientInterface interface { UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // SendAnonymousEventWithBody request with any body + SendAnonymousEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SendUserEventWithBody request with any body + SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SendUserEvent(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListCurrentUserInvitations request ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -620,9 +630,19 @@ type ClientInterface interface { // GetCurrentUserMemberships request GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // ResetUserPasswordWithBody request with any body + ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ResetUserPassword(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateUserToken request CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // VerifyUserEmailWithBody request with any body + VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + VerifyUserEmail(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteUser request DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) } @@ -2883,6 +2903,54 @@ func (c *Client) UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJS return c.Client.Do(req) } +func (c *Client) SendAnonymousEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendAnonymousEventRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendAnonymousEventRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendUserEventRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendUserEvent(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendUserEventRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListCurrentUserInvitationsRequest(c.Server, params) if err != nil { @@ -2943,6 +3011,30 @@ func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurre return c.Client.Do(req) } +func (c *Client) ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewResetUserPasswordRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ResetUserPassword(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewResetUserPasswordRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateUserTokenRequest(c.Server) if err != nil { @@ -2955,6 +3047,30 @@ func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEdito return c.Client.Do(req) } +func (c *Client) VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVerifyUserEmailRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) VerifyUserEmail(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVerifyUserEmailRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDeleteUserRequest(c.Server, userID) if err != nil { @@ -10745,6 +10861,86 @@ func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body return req, nil } +// NewSendAnonymousEventRequest calls the generic SendAnonymousEvent builder with application/json body +func NewSendAnonymousEventRequest(server string, body SendAnonymousEventJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendAnonymousEventRequestWithBody(server, "application/json", bodyReader) +} + +// NewSendAnonymousEventRequestWithBody generates requests for SendAnonymousEvent with any type of body +func NewSendAnonymousEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/anon-event") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSendUserEventRequest calls the generic SendUserEvent builder with application/json body +func NewSendUserEventRequest(server string, body SendUserEventJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendUserEventRequestWithBody(server, "application/json", bodyReader) +} + +// NewSendUserEventRequestWithBody generates requests for SendUserEvent with any type of body +func NewSendUserEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/event") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { var err error @@ -10942,6 +11138,46 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return req, nil } +// NewResetUserPasswordRequest calls the generic ResetUserPassword builder with application/json body +func NewResetUserPasswordRequest(server string, body ResetUserPasswordJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewResetUserPasswordRequestWithBody(server, "application/json", bodyReader) +} + +// NewResetUserPasswordRequestWithBody generates requests for ResetUserPassword with any type of body +func NewResetUserPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/reset-password") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewCreateUserTokenRequest generates requests for CreateUserToken func NewCreateUserTokenRequest(server string) (*http.Request, error) { var err error @@ -10969,6 +11205,46 @@ func NewCreateUserTokenRequest(server string) (*http.Request, error) { return req, nil } +// NewVerifyUserEmailRequest calls the generic VerifyUserEmail builder with application/json body +func NewVerifyUserEmailRequest(server string, body VerifyUserEmailJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewVerifyUserEmailRequestWithBody(server, "application/json", bodyReader) +} + +// NewVerifyUserEmailRequestWithBody generates requests for VerifyUserEmail with any type of body +func NewVerifyUserEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/verify-email") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewDeleteUserRequest generates requests for DeleteUser func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { var err error @@ -11559,6 +11835,16 @@ type ClientWithResponsesInterface interface { UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + // SendAnonymousEventWithBodyWithResponse request with any body + SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) + + SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) + + // SendUserEventWithBodyWithResponse request with any body + SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) + + SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) + // ListCurrentUserInvitationsWithResponse request ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) @@ -11573,9 +11859,19 @@ type ClientWithResponsesInterface interface { // GetCurrentUserMembershipsWithResponse request GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) + // ResetUserPasswordWithBodyWithResponse request with any body + ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) + + ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) + // CreateUserTokenWithResponse request CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) + // VerifyUserEmailWithBodyWithResponse request with any body + VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) + + VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) + // DeleteUserWithResponse request DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) } @@ -15160,15 +15456,16 @@ func (r UpdateCurrentUserResponse) StatusCode() int { return 0 } -type ListCurrentUserInvitationsResponse struct { +type SendAnonymousEventResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListCurrentUserInvitations200Response + JSON400 *BadRequest + JSON404 *NotFound JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r ListCurrentUserInvitationsResponse) Status() string { +func (r SendAnonymousEventResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15176,26 +15473,24 @@ func (r ListCurrentUserInvitationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListCurrentUserInvitationsResponse) StatusCode() int { +func (r SendAnonymousEventResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type LogoutUserResponse struct { +type SendUserEventResponse struct { Body []byte HTTPResponse *http.Response JSON400 *BadRequest JSON401 *RequiresAuthentication - JSON403 *Forbidden JSON404 *NotFound - JSON405 *MethodNotAllowed JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r LogoutUserResponse) Status() string { +func (r SendUserEventResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15203,26 +15498,22 @@ func (r LogoutUserResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r LogoutUserResponse) StatusCode() int { +func (r SendUserEventResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type LoginUserResponse struct { +type ListCurrentUserInvitationsResponse struct { Body []byte HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed + JSON200 *ListCurrentUserInvitations200Response JSON500 *InternalError } // Status returns HTTPResponse.Status -func (r LoginUserResponse) Status() string { +func (r ListCurrentUserInvitationsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -15230,14 +15521,68 @@ func (r LoginUserResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r LoginUserResponse) StatusCode() int { +func (r ListCurrentUserInvitationsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCurrentUserMembershipsResponse struct { +type LogoutUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r LogoutUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LogoutUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LoginUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r LoginUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LoginUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCurrentUserMembershipsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *GetCurrentUserMemberships200Response @@ -15262,6 +15607,31 @@ func (r GetCurrentUserMembershipsResponse) StatusCode() int { return 0 } +type ResetUserPasswordResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ResetUserPasswordResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ResetUserPasswordResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CreateUserTokenResponse struct { Body []byte HTTPResponse *http.Response @@ -15287,6 +15657,31 @@ func (r CreateUserTokenResponse) StatusCode() int { return 0 } +type VerifyUserEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r VerifyUserEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r VerifyUserEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type DeleteUserResponse struct { Body []byte HTTPResponse *http.Response @@ -16955,6 +17350,40 @@ func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, return ParseUpdateCurrentUserResponse(rsp) } +// SendAnonymousEventWithBodyWithResponse request with arbitrary body returning *SendAnonymousEventResponse +func (c *ClientWithResponses) SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { + rsp, err := c.SendAnonymousEventWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendAnonymousEventResponse(rsp) +} + +func (c *ClientWithResponses) SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { + rsp, err := c.SendAnonymousEvent(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendAnonymousEventResponse(rsp) +} + +// SendUserEventWithBodyWithResponse request with arbitrary body returning *SendUserEventResponse +func (c *ClientWithResponses) SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { + rsp, err := c.SendUserEventWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendUserEventResponse(rsp) +} + +func (c *ClientWithResponses) SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { + rsp, err := c.SendUserEvent(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendUserEventResponse(rsp) +} + // ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) @@ -16999,6 +17428,23 @@ func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context. return ParseGetCurrentUserMembershipsResponse(rsp) } +// ResetUserPasswordWithBodyWithResponse request with arbitrary body returning *ResetUserPasswordResponse +func (c *ClientWithResponses) ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { + rsp, err := c.ResetUserPasswordWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseResetUserPasswordResponse(rsp) +} + +func (c *ClientWithResponses) ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { + rsp, err := c.ResetUserPassword(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseResetUserPasswordResponse(rsp) +} + // CreateUserTokenWithResponse request returning *CreateUserTokenResponse func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) { rsp, err := c.CreateUserToken(ctx, reqEditors...) @@ -17008,6 +17454,23 @@ func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, r return ParseCreateUserTokenResponse(rsp) } +// VerifyUserEmailWithBodyWithResponse request with arbitrary body returning *VerifyUserEmailResponse +func (c *ClientWithResponses) VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { + rsp, err := c.VerifyUserEmailWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVerifyUserEmailResponse(rsp) +} + +func (c *ClientWithResponses) VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { + rsp, err := c.VerifyUserEmail(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVerifyUserEmailResponse(rsp) +} + // DeleteUserWithResponse request returning *DeleteUserResponse func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { rsp, err := c.DeleteUser(ctx, userID, reqEditors...) @@ -24541,6 +25004,93 @@ func ParseUpdateCurrentUserResponse(rsp *http.Response) (*UpdateCurrentUserRespo return response, nil } +// ParseSendAnonymousEventResponse parses an HTTP response from a SendAnonymousEventWithResponse call +func ParseSendAnonymousEventResponse(rsp *http.Response) (*SendAnonymousEventResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SendAnonymousEventResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseSendUserEventResponse parses an HTTP response from a SendUserEventWithResponse call +func ParseSendUserEventResponse(rsp *http.Response) (*SendUserEventResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SendUserEventResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListCurrentUserInvitationsResponse parses an HTTP response from a ListCurrentUserInvitationsWithResponse call func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUserInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -24743,6 +25293,53 @@ func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUser return response, nil } +// ParseResetUserPasswordResponse parses an HTTP response from a ResetUserPasswordWithResponse call +func ParseResetUserPasswordResponse(rsp *http.Response) (*ResetUserPasswordResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ResetUserPasswordResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateUserTokenResponse parses an HTTP response from a CreateUserTokenWithResponse call func ParseCreateUserTokenResponse(rsp *http.Response) (*CreateUserTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -24790,6 +25387,53 @@ func ParseCreateUserTokenResponse(rsp *http.Response) (*CreateUserTokenResponse, return response, nil } +// ParseVerifyUserEmailResponse parses an HTTP response from a VerifyUserEmailWithResponse call +func ParseVerifyUserEmailResponse(rsp *http.Response) (*VerifyUserEmailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &VerifyUserEmailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 625e023..c7352f9 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1946,6 +1946,39 @@ type RemoveTeamMembershipRequest struct { Email string `json:"email"` } +// ResetUserPasswordRequest defines model for ResetUserPassword_request. +type ResetUserPasswordRequest struct { + // Email Email address to reset + Email interface{} `json:"email"` + + // Subdomain Subdomain to use in the URL + Subdomain *interface{} `json:"subdomain,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// SendAnonymousEventRequest defines model for SendAnonymousEvent_request. +type SendAnonymousEventRequest struct { + // AnonymousID Anonymous ID identifying the user + AnonymousID interface{} `json:"anonymous_id"` + + // Name Name of event + Name interface{} `json:"name"` + + // Properties Properties of event, keys should be of string type + Properties *interface{} `json:"properties,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// SendUserEventRequest defines model for SendUserEvent_request. +type SendUserEventRequest struct { + // Name Name of event + Name interface{} `json:"name"` + + // Properties Properties of event, keys should be of string type + Properties *interface{} `json:"properties,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // SpendSummary A spend summary for a team, summarizing the spend by each price category over a given time range. // Note that empty or all-zero values are not included in the response. type SpendSummary struct { @@ -2799,6 +2832,22 @@ type UserID = openapi_types.UUID // UserName The unique name for the user. type UserName = string +// VerifyUserEmailRequest defines model for VerifyUserEmail_request. +type VerifyUserEmailRequest struct { + // Email Email address to verify + Email interface{} `json:"email"` + + // ReturnTo Return to this URL after verification + ReturnTo *interface{} `json:"return_to,omitempty"` + + // State Additional state to pass + State *interface{} `json:"state,omitempty"` + + // Subdomain Subdomain to use in the URL + Subdomain *interface{} `json:"subdomain,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // VersionName The version in semantic version format. type VersionName = string @@ -3402,9 +3451,21 @@ type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest +// SendAnonymousEventJSONRequestBody defines body for SendAnonymousEvent for application/json ContentType. +type SendAnonymousEventJSONRequestBody = SendAnonymousEventRequest + +// SendUserEventJSONRequestBody defines body for SendUserEvent for application/json ContentType. +type SendUserEventJSONRequestBody = SendUserEventRequest + // LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType. type LoginUserJSONRequestBody = LoginUserRequest +// ResetUserPasswordJSONRequestBody defines body for ResetUserPassword for application/json ContentType. +type ResetUserPasswordJSONRequestBody = ResetUserPasswordRequest + +// VerifyUserEmailJSONRequestBody defines body for VerifyUserEmail for application/json ContentType. +type VerifyUserEmailJSONRequestBody = VerifyUserEmailRequest + // Getter for additional properties for ConnectorAuthFinishRequestOAuth. Returns the specified // element and whether it was found func (a ConnectorAuthFinishRequestOAuth) Get(fieldName string) (value interface{}, found bool) { @@ -4036,6 +4097,262 @@ func (a LoginUserRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for ResetUserPasswordRequest. Returns the specified +// element and whether it was found +func (a ResetUserPasswordRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ResetUserPasswordRequest +func (a *ResetUserPasswordRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ResetUserPasswordRequest to handle AdditionalProperties +func (a *ResetUserPasswordRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["email"]; found { + err = json.Unmarshal(raw, &a.Email) + if err != nil { + return fmt.Errorf("error reading 'email': %w", err) + } + delete(object, "email") + } + + if raw, found := object["subdomain"]; found { + err = json.Unmarshal(raw, &a.Subdomain) + if err != nil { + return fmt.Errorf("error reading 'subdomain': %w", err) + } + delete(object, "subdomain") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ResetUserPasswordRequest to handle AdditionalProperties +func (a ResetUserPasswordRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["email"], err = json.Marshal(a.Email) + if err != nil { + return nil, fmt.Errorf("error marshaling 'email': %w", err) + } + + if a.Subdomain != nil { + object["subdomain"], err = json.Marshal(a.Subdomain) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subdomain': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SendAnonymousEventRequest. Returns the specified +// element and whether it was found +func (a SendAnonymousEventRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SendAnonymousEventRequest +func (a *SendAnonymousEventRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SendAnonymousEventRequest to handle AdditionalProperties +func (a *SendAnonymousEventRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["anonymous_id"]; found { + err = json.Unmarshal(raw, &a.AnonymousID) + if err != nil { + return fmt.Errorf("error reading 'anonymous_id': %w", err) + } + delete(object, "anonymous_id") + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if raw, found := object["properties"]; found { + err = json.Unmarshal(raw, &a.Properties) + if err != nil { + return fmt.Errorf("error reading 'properties': %w", err) + } + delete(object, "properties") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SendAnonymousEventRequest to handle AdditionalProperties +func (a SendAnonymousEventRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["anonymous_id"], err = json.Marshal(a.AnonymousID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'anonymous_id': %w", err) + } + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + if a.Properties != nil { + object["properties"], err = json.Marshal(a.Properties) + if err != nil { + return nil, fmt.Errorf("error marshaling 'properties': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SendUserEventRequest. Returns the specified +// element and whether it was found +func (a SendUserEventRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SendUserEventRequest +func (a *SendUserEventRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SendUserEventRequest to handle AdditionalProperties +func (a *SendUserEventRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if raw, found := object["properties"]; found { + err = json.Unmarshal(raw, &a.Properties) + if err != nil { + return fmt.Errorf("error reading 'properties': %w", err) + } + delete(object, "properties") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SendUserEventRequest to handle AdditionalProperties +func (a SendUserEventRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + if a.Properties != nil { + object["properties"], err = json.Marshal(a.Properties) + if err != nil { + return nil, fmt.Errorf("error marshaling 'properties': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for SpendSummary. Returns the specified // element and whether it was found func (a SpendSummary) Get(fieldName string) (value interface{}, found bool) { @@ -4408,3 +4725,114 @@ func (a UsageSummary) MarshalJSON() ([]byte, error) { } return json.Marshal(object) } + +// Getter for additional properties for VerifyUserEmailRequest. Returns the specified +// element and whether it was found +func (a VerifyUserEmailRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for VerifyUserEmailRequest +func (a *VerifyUserEmailRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for VerifyUserEmailRequest to handle AdditionalProperties +func (a *VerifyUserEmailRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["email"]; found { + err = json.Unmarshal(raw, &a.Email) + if err != nil { + return fmt.Errorf("error reading 'email': %w", err) + } + delete(object, "email") + } + + if raw, found := object["return_to"]; found { + err = json.Unmarshal(raw, &a.ReturnTo) + if err != nil { + return fmt.Errorf("error reading 'return_to': %w", err) + } + delete(object, "return_to") + } + + if raw, found := object["state"]; found { + err = json.Unmarshal(raw, &a.State) + if err != nil { + return fmt.Errorf("error reading 'state': %w", err) + } + delete(object, "state") + } + + if raw, found := object["subdomain"]; found { + err = json.Unmarshal(raw, &a.Subdomain) + if err != nil { + return fmt.Errorf("error reading 'subdomain': %w", err) + } + delete(object, "subdomain") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for VerifyUserEmailRequest to handle AdditionalProperties +func (a VerifyUserEmailRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["email"], err = json.Marshal(a.Email) + if err != nil { + return nil, fmt.Errorf("error marshaling 'email': %w", err) + } + + if a.ReturnTo != nil { + object["return_to"], err = json.Marshal(a.ReturnTo) + if err != nil { + return nil, fmt.Errorf("error marshaling 'return_to': %w", err) + } + } + + if a.State != nil { + object["state"], err = json.Marshal(a.State) + if err != nil { + return nil, fmt.Errorf("error marshaling 'state': %w", err) + } + } + + if a.Subdomain != nil { + object["subdomain"], err = json.Marshal(a.Subdomain) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subdomain': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} diff --git a/spec.json b/spec.json index 0f71c26..ae2f025 100644 --- a/spec.json +++ b/spec.json @@ -42,6 +42,8 @@ "name" : "syncs" }, { "name" : "managed-databases" + }, { + "name" : "analytics" } ], "paths" : { "/" : { @@ -3697,6 +3699,83 @@ "tags" : [ "users" ] } }, + "/user/reset-password" : { + "post" : { + "description" : "Reset user password from email", + "operationId" : "ResetUserPassword", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ResetUserPassword_request" + } + } + } + }, + "responses" : { + "202" : { + "description" : "Email failed to send" + }, + "204" : { + "description" : "Password reset email was sent" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ] + } + }, + "/user/verify-email" : { + "post" : { + "description" : "Verify user email", + "operationId" : "VerifyUserEmail", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VerifyUserEmail_request" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Email is already verified" + }, + "202" : { + "description" : "Email failed to send" + }, + "204" : { + "description" : "Verification email was sent" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ] + } + }, "/user/invitations" : { "get" : { "description" : "List of the current user's unaccepted invitations", @@ -3757,6 +3836,72 @@ "tags" : [ "users" ] } }, + "/user/event" : { + "post" : { + "description" : "Send a user event", + "operationId" : "SendUserEvent", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SendUserEvent_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "analytics" ] + } + }, + "/user/anon-event" : { + "post" : { + "description" : "Send an anonymous event", + "operationId" : "SendAnonymousEvent", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SendAnonymousEvent_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "analytics" ] + } + }, "/users/{user_id}" : { "delete" : { "description" : "Delete user", @@ -10406,6 +10551,39 @@ }, "required" : [ "custom_token" ] }, + "ResetUserPassword_request" : { + "additionalProperties" : { }, + "properties" : { + "email" : { + "description" : "Email address to reset", + "format" : "email" + }, + "subdomain" : { + "description" : "Subdomain to use in the URL" + } + }, + "required" : [ "email" ] + }, + "VerifyUserEmail_request" : { + "additionalProperties" : { }, + "properties" : { + "email" : { + "description" : "Email address to verify", + "format" : "email" + }, + "return_to" : { + "description" : "Return to this URL after verification", + "format" : "url" + }, + "state" : { + "description" : "Additional state to pass" + }, + "subdomain" : { + "description" : "Subdomain to use in the URL" + } + }, + "required" : [ "email" ] + }, "ListCurrentUserInvitations_200_response" : { "properties" : { "items" : { @@ -10445,6 +10623,34 @@ }, "required" : [ "items", "metadata" ] }, + "SendUserEvent_request" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "description" : "Name of event" + }, + "properties" : { + "description" : "Properties of event, keys should be of string type" + } + }, + "required" : [ "name" ] + }, + "SendAnonymousEvent_request" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "description" : "Name of event" + }, + "anonymous_id" : { + "description" : "Anonymous ID identifying the user", + "x-go-name" : "AnonymousID" + }, + "properties" : { + "description" : "Properties of event, keys should be of string type" + } + }, + "required" : [ "anonymous_id", "name" ] + }, "ListTeamAPIKeys_200_response" : { "properties" : { "items" : { From 94adb274aba69874a0de62012f77c383eba69c60 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:10:39 +0300 Subject: [PATCH 222/343] fix: Generate CloudQuery Go API Client from `spec.json` (#233) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 121 +++++++++++++++++++++++++++++++++++++ spec.json | 52 ++++++++++++++++ 3 files changed, 336 insertions(+) diff --git a/client.gen.go b/client.gen.go index 1f120b4..8e799a6 100644 --- a/client.gen.go +++ b/client.gen.go @@ -611,6 +611,11 @@ type ClientInterface interface { SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateCustomerWithBody request with any body + UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCustomer(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // SendUserEventWithBody request with any body SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2927,6 +2932,30 @@ func (c *Client) SendAnonymousEvent(ctx context.Context, body SendAnonymousEvent return c.Client.Do(req) } +func (c *Client) UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCustomerRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCustomer(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCustomerRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSendUserEventRequestWithBody(c.Server, contentType, body) if err != nil { @@ -10901,6 +10930,46 @@ func NewSendAnonymousEventRequestWithBody(server string, contentType string, bod return req, nil } +// NewUpdateCustomerRequest calls the generic UpdateCustomer builder with application/json body +func NewUpdateCustomerRequest(server string, body UpdateCustomerJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCustomerRequestWithBody(server, "application/json", bodyReader) +} + +// NewUpdateCustomerRequestWithBody generates requests for UpdateCustomer with any type of body +func NewUpdateCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/customer") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewSendUserEventRequest calls the generic SendUserEvent builder with application/json body func NewSendUserEventRequest(server string, body SendUserEventJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -11840,6 +11909,11 @@ type ClientWithResponsesInterface interface { SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) + // UpdateCustomerWithBodyWithResponse request with any body + UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) + + UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) + // SendUserEventWithBodyWithResponse request with any body SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) @@ -15480,6 +15554,31 @@ func (r SendAnonymousEventResponse) StatusCode() int { return 0 } +type UpdateCustomerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateCustomerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCustomerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type SendUserEventResponse struct { Body []byte HTTPResponse *http.Response @@ -17367,6 +17466,23 @@ func (c *ClientWithResponses) SendAnonymousEventWithResponse(ctx context.Context return ParseSendAnonymousEventResponse(rsp) } +// UpdateCustomerWithBodyWithResponse request with arbitrary body returning *UpdateCustomerResponse +func (c *ClientWithResponses) UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { + rsp, err := c.UpdateCustomerWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCustomerResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { + rsp, err := c.UpdateCustomer(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCustomerResponse(rsp) +} + // SendUserEventWithBodyWithResponse request with arbitrary body returning *SendUserEventResponse func (c *ClientWithResponses) SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { rsp, err := c.SendUserEventWithBody(ctx, contentType, body, reqEditors...) @@ -25044,6 +25160,53 @@ func ParseSendAnonymousEventResponse(rsp *http.Response) (*SendAnonymousEventRes return response, nil } +// ParseUpdateCustomerResponse parses an HTTP response from a UpdateCustomerWithResponse call +func ParseUpdateCustomerResponse(rsp *http.Response) (*UpdateCustomerResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateCustomerResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseSendUserEventResponse parses an HTTP response from a SendUserEventWithResponse call func ParseSendUserEventResponse(rsp *http.Response) (*SendUserEventResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index c7352f9..28c7c7f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2660,6 +2660,15 @@ type UpdateCurrentUserRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// UpdateCustomerRequest defines model for UpdateCustomer_request. +type UpdateCustomerRequest struct { + CompanyName *string `json:"company_name,omitempty"` + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + LearnedAboutCqFrom *string `json:"learned_about_cq_from,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // UpdateSyncRunRequest defines model for UpdateSyncRun_request. type UpdateSyncRunRequest struct { // Status The status of the sync run @@ -3454,6 +3463,9 @@ type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest // SendAnonymousEventJSONRequestBody defines body for SendAnonymousEvent for application/json ContentType. type SendAnonymousEventJSONRequestBody = SendAnonymousEventRequest +// UpdateCustomerJSONRequestBody defines body for UpdateCustomer for application/json ContentType. +type UpdateCustomerJSONRequestBody = UpdateCustomerRequest + // SendUserEventJSONRequestBody defines body for SendUserEvent for application/json ContentType. type SendUserEventJSONRequestBody = SendUserEventRequest @@ -4566,6 +4578,115 @@ func (a UpdateCurrentUserRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for UpdateCustomerRequest. Returns the specified +// element and whether it was found +func (a UpdateCustomerRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateCustomerRequest +func (a *UpdateCustomerRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateCustomerRequest to handle AdditionalProperties +func (a *UpdateCustomerRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["company_name"]; found { + err = json.Unmarshal(raw, &a.CompanyName) + if err != nil { + return fmt.Errorf("error reading 'company_name': %w", err) + } + delete(object, "company_name") + } + + if raw, found := object["first_name"]; found { + err = json.Unmarshal(raw, &a.FirstName) + if err != nil { + return fmt.Errorf("error reading 'first_name': %w", err) + } + delete(object, "first_name") + } + + if raw, found := object["last_name"]; found { + err = json.Unmarshal(raw, &a.LastName) + if err != nil { + return fmt.Errorf("error reading 'last_name': %w", err) + } + delete(object, "last_name") + } + + if raw, found := object["learned_about_cq_from"]; found { + err = json.Unmarshal(raw, &a.LearnedAboutCqFrom) + if err != nil { + return fmt.Errorf("error reading 'learned_about_cq_from': %w", err) + } + delete(object, "learned_about_cq_from") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateCustomerRequest to handle AdditionalProperties +func (a UpdateCustomerRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.CompanyName != nil { + object["company_name"], err = json.Marshal(a.CompanyName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'company_name': %w", err) + } + } + + object["first_name"], err = json.Marshal(a.FirstName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'first_name': %w", err) + } + + object["last_name"], err = json.Marshal(a.LastName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'last_name': %w", err) + } + + if a.LearnedAboutCqFrom != nil { + object["learned_about_cq_from"], err = json.Marshal(a.LearnedAboutCqFrom) + if err != nil { + return nil, fmt.Errorf("error marshaling 'learned_about_cq_from': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for UpdateTeamRequest. Returns the specified // element and whether it was found func (a UpdateTeamRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index ae2f025..757c0e1 100644 --- a/spec.json +++ b/spec.json @@ -3902,6 +3902,40 @@ "tags" : [ "analytics" ] } }, + "/user/customer" : { + "patch" : { + "description" : "Update customer details", + "operationId" : "UpdateCustomer", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateCustomer_request" + } + } + } + }, + "responses" : { + "201" : { + "description" : "Queued for processing" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "analytics" ] + } + }, "/users/{user_id}" : { "delete" : { "description" : "Delete user", @@ -10651,6 +10685,24 @@ }, "required" : [ "anonymous_id", "name" ] }, + "UpdateCustomer_request" : { + "additionalProperties" : { }, + "properties" : { + "first_name" : { + "type" : "string" + }, + "last_name" : { + "type" : "string" + }, + "company_name" : { + "type" : "string" + }, + "learned_about_cq_from" : { + "type" : "string" + } + }, + "required" : [ "first_name", "last_name" ] + }, "ListTeamAPIKeys_200_response" : { "properties" : { "items" : { From e4e7c1d55ca709e835d351d28ee5bc3c7a44fb07 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 2 Sep 2024 12:59:13 +0300 Subject: [PATCH 223/343] fix: Generate CloudQuery Go API Client from `spec.json` (#234) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 18 ------------------ spec.json | 3 --- 2 files changed, 21 deletions(-) diff --git a/models.gen.go b/models.gen.go index 28c7c7f..90c9329 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2849,9 +2849,6 @@ type VerifyUserEmailRequest struct { // ReturnTo Return to this URL after verification ReturnTo *interface{} `json:"return_to,omitempty"` - // State Additional state to pass - State *interface{} `json:"state,omitempty"` - // Subdomain Subdomain to use in the URL Subdomain *interface{} `json:"subdomain,omitempty"` AdditionalProperties map[string]interface{} `json:"-"` @@ -4888,14 +4885,6 @@ func (a *VerifyUserEmailRequest) UnmarshalJSON(b []byte) error { delete(object, "return_to") } - if raw, found := object["state"]; found { - err = json.Unmarshal(raw, &a.State) - if err != nil { - return fmt.Errorf("error reading 'state': %w", err) - } - delete(object, "state") - } - if raw, found := object["subdomain"]; found { err = json.Unmarshal(raw, &a.Subdomain) if err != nil { @@ -4935,13 +4924,6 @@ func (a VerifyUserEmailRequest) MarshalJSON() ([]byte, error) { } } - if a.State != nil { - object["state"], err = json.Marshal(a.State) - if err != nil { - return nil, fmt.Errorf("error marshaling 'state': %w", err) - } - } - if a.Subdomain != nil { object["subdomain"], err = json.Marshal(a.Subdomain) if err != nil { diff --git a/spec.json b/spec.json index 757c0e1..0124b6e 100644 --- a/spec.json +++ b/spec.json @@ -10609,9 +10609,6 @@ "description" : "Return to this URL after verification", "format" : "url" }, - "state" : { - "description" : "Additional state to pass" - }, "subdomain" : { "description" : "Subdomain to use in the URL" } From 2436ba03d681d6c0f9a925f07201a57c8a6a322d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:44:51 +0300 Subject: [PATCH 224/343] fix: Generate CloudQuery Go API Client from `spec.json` (#235) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++---- spec.json | 7 +++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/client.gen.go b/client.gen.go index 8e799a6..477a96a 100644 --- a/client.gen.go +++ b/client.gen.go @@ -15011,6 +15011,7 @@ type DeleteSyncResponse struct { JSON400 *BadRequest JSON401 *RequiresAuthentication JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -15761,7 +15762,7 @@ type VerifyUserEmailResponse struct { HTTPResponse *http.Response JSON400 *BadRequest JSON404 *NotFound - JSON405 *MethodNotAllowed + JSON429 *TooManyRequests JSON500 *InternalError } @@ -24037,6 +24038,13 @@ func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25578,12 +25586,12 @@ func ParseVerifyUserEmailResponse(rsp *http.Response) (*VerifyUserEmailResponse, } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: - var dest MethodNotAllowed + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON405 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError diff --git a/spec.json b/spec.json index 0124b6e..41c5393 100644 --- a/spec.json +++ b/spec.json @@ -3765,8 +3765,8 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, - "405" : { - "$ref" : "#/components/responses/MethodNotAllowed" + "429" : { + "$ref" : "#/components/responses/TooManyRequests" }, "500" : { "$ref" : "#/components/responses/InternalError" @@ -5005,6 +5005,9 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } From 2eb8ecf59bffb2ebd43dceab4e198de73d8b1c7a Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:48:51 +0300 Subject: [PATCH 225/343] fix: Generate CloudQuery Go API Client from `spec.json` (#236) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ spec.json | 3 +++ 2 files changed, 11 insertions(+) diff --git a/client.gen.go b/client.gen.go index 477a96a..092afcf 100644 --- a/client.gen.go +++ b/client.gen.go @@ -15536,6 +15536,7 @@ type SendAnonymousEventResponse struct { HTTPResponse *http.Response JSON400 *BadRequest JSON404 *NotFound + JSON429 *TooManyRequests JSON500 *InternalError } @@ -25156,6 +25157,13 @@ func ParseSendAnonymousEventResponse(rsp *http.Response) (*SendAnonymousEventRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/spec.json b/spec.json index 41c5393..5492310 100644 --- a/spec.json +++ b/spec.json @@ -3894,6 +3894,9 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, "500" : { "$ref" : "#/components/responses/InternalError" } From 528ba1ced05a74bb8223e03f0fe1da2af56ed7df Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:34:43 +0300 Subject: [PATCH 226/343] fix: Generate CloudQuery Go API Client from `spec.json` (#237) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/spec.json b/spec.json index 5492310..0101611 100644 --- a/spec.json +++ b/spec.json @@ -3696,7 +3696,8 @@ "security" : [ { "cookieAuth" : [ ] } ], - "tags" : [ "users" ] + "tags" : [ "users" ], + "x-internal" : true } }, "/user/reset-password" : { @@ -3773,7 +3774,8 @@ } }, "security" : [ ], - "tags" : [ "users" ] + "tags" : [ "users" ], + "x-internal" : true } }, "/user/invitations" : { @@ -3867,7 +3869,8 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "analytics" ] + "tags" : [ "analytics" ], + "x-internal" : true } }, "/user/anon-event" : { @@ -3902,7 +3905,8 @@ } }, "security" : [ ], - "tags" : [ "analytics" ] + "tags" : [ "analytics" ], + "x-internal" : true } }, "/user/customer" : { @@ -3936,7 +3940,8 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "analytics" ] + "tags" : [ "analytics" ], + "x-internal" : true } }, "/users/{user_id}" : { From 02a1381bc54cbb876239f35a1e035d619fa2a438 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:17:11 +0300 Subject: [PATCH 227/343] fix: Generate CloudQuery Go API Client from `spec.json` (#238) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 470 +++++++++++++++++++++++++++++++++++++++++++++++++- models.gen.go | 30 +++- spec.json | 161 ++++++++++++++--- 3 files changed, 623 insertions(+), 38 deletions(-) diff --git a/client.gen.go b/client.gen.go index 092afcf..ddc4d5b 100644 --- a/client.gen.go +++ b/client.gen.go @@ -140,6 +140,9 @@ type ClientInterface interface { // CQHealthCheck request CQHealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetOpenAPIJSON request + GetOpenAPIJSON(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginNotificationRequests request ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -484,6 +487,9 @@ type ClientInterface interface { UpdateSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncDestinationSyncs request + ListSyncDestinationSyncs(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTestConnectionForSyncDestination request GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -519,6 +525,9 @@ type ClientInterface interface { UpdateSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSyncSourceSyncs request + ListSyncSourceSyncs(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTestConnectionForSyncSource request GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -856,6 +865,18 @@ func (c *Client) CQHealthCheck(ctx context.Context, reqEditors ...RequestEditorF return c.Client.Do(req) } +func (c *Client) GetOpenAPIJSON(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOpenAPIJSONRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginNotificationRequestsRequest(c.Server, params) if err != nil { @@ -2380,6 +2401,18 @@ func (c *Client) UpdateSyncDestination(ctx context.Context, teamName TeamName, s return c.Client.Do(req) } +func (c *Client) ListSyncDestinationSyncs(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSyncDestinationSyncsRequest(c.Server, teamName, syncDestinationName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, syncTestConnectionId) if err != nil { @@ -2536,6 +2569,18 @@ func (c *Client) UpdateSyncSource(ctx context.Context, teamName TeamName, syncSo return c.Client.Do(req) } +func (c *Client) ListSyncSourceSyncs(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSyncSourceSyncsRequest(c.Server, teamName, syncSourceName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, syncTestConnectionId) if err != nil { @@ -3878,6 +3923,33 @@ func NewCQHealthCheckRequest(server string) (*http.Request, error) { return req, nil } +// NewGetOpenAPIJSONRequest generates requests for GetOpenAPIJSON +func NewGetOpenAPIJSONRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/openapi.json") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { var err error @@ -9021,6 +9093,85 @@ func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, s return req, nil } +// NewListSyncDestinationSyncsRequest generates requests for ListSyncDestinationSyncs +func NewListSyncDestinationSyncsRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/syncs", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetTestConnectionForSyncDestinationRequest generates requests for GetTestConnectionForSyncDestination func NewGetTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { var err error @@ -9473,6 +9624,85 @@ func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSo return req, nil } +// NewListSyncSourceSyncsRequest generates requests for ListSyncSourceSyncs +func NewListSyncSourceSyncsRequest(server string, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/syncs", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetTestConnectionForSyncSourceRequest generates requests for GetTestConnectionForSyncSource func NewGetTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { var err error @@ -11438,6 +11668,9 @@ type ClientWithResponsesInterface interface { // CQHealthCheckWithResponse request CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) + // GetOpenAPIJSONWithResponse request + GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) + // ListPluginNotificationRequestsWithResponse request ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) @@ -11782,6 +12015,9 @@ type ClientWithResponsesInterface interface { UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) + // ListSyncDestinationSyncsWithResponse request + ListSyncDestinationSyncsWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationSyncsResponse, error) + // GetTestConnectionForSyncDestinationWithResponse request GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) @@ -11817,6 +12053,9 @@ type ClientWithResponsesInterface interface { UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) + // ListSyncSourceSyncsWithResponse request + ListSyncSourceSyncsWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncSourceSyncsResponse, error) + // GetTestConnectionForSyncSourceWithResponse request GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) @@ -12280,6 +12519,28 @@ func (r CQHealthCheckResponse) StatusCode() int { return 0 } +type GetOpenAPIJSONResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]interface{} +} + +// Status returns HTTPResponse.Status +func (r GetOpenAPIJSONResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOpenAPIJSONResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginNotificationRequestsResponse struct { Body []byte HTTPResponse *http.Response @@ -14637,6 +14898,31 @@ func (r UpdateSyncDestinationResponse) StatusCode() int { return 0 } +type ListSyncDestinationSyncsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListSyncSourceSyncs200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSyncDestinationSyncsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSyncDestinationSyncsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetTestConnectionForSyncDestinationResponse struct { Body []byte HTTPResponse *http.Response @@ -14874,6 +15160,31 @@ func (r UpdateSyncSourceResponse) StatusCode() int { return 0 } +type ListSyncSourceSyncsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListSyncSourceSyncs200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSyncSourceSyncsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSyncSourceSyncsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetTestConnectionForSyncSourceResponse struct { Body []byte HTTPResponse *http.Response @@ -14903,7 +15214,7 @@ func (r GetTestConnectionForSyncSourceResponse) StatusCode() int { type ListSyncsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListSyncs200Response + JSON200 *ListSyncSourceSyncs200Response JSON401 *RequiresAuthentication JSON404 *NotFound JSON500 *InternalError @@ -15713,7 +16024,7 @@ type ResetUserPasswordResponse struct { HTTPResponse *http.Response JSON400 *BadRequest JSON404 *NotFound - JSON405 *MethodNotAllowed + JSON429 *TooManyRequests JSON500 *InternalError } @@ -15959,6 +16270,15 @@ func (c *ClientWithResponses) CQHealthCheckWithResponse(ctx context.Context, req return ParseCQHealthCheckResponse(rsp) } +// GetOpenAPIJSONWithResponse request returning *GetOpenAPIJSONResponse +func (c *ClientWithResponses) GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) { + rsp, err := c.GetOpenAPIJSON(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOpenAPIJSONResponse(rsp) +} + // ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) @@ -17065,6 +17385,15 @@ func (c *ClientWithResponses) UpdateSyncDestinationWithResponse(ctx context.Cont return ParseUpdateSyncDestinationResponse(rsp) } +// ListSyncDestinationSyncsWithResponse request returning *ListSyncDestinationSyncsResponse +func (c *ClientWithResponses) ListSyncDestinationSyncsWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationSyncsResponse, error) { + rsp, err := c.ListSyncDestinationSyncs(ctx, teamName, syncDestinationName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSyncDestinationSyncsResponse(rsp) +} + // GetTestConnectionForSyncDestinationWithResponse request returning *GetTestConnectionForSyncDestinationResponse func (c *ClientWithResponses) GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) { rsp, err := c.GetTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, syncTestConnectionId, reqEditors...) @@ -17178,6 +17507,15 @@ func (c *ClientWithResponses) UpdateSyncSourceWithResponse(ctx context.Context, return ParseUpdateSyncSourceResponse(rsp) } +// ListSyncSourceSyncsWithResponse request returning *ListSyncSourceSyncsResponse +func (c *ClientWithResponses) ListSyncSourceSyncsWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncSourceSyncsResponse, error) { + rsp, err := c.ListSyncSourceSyncs(ctx, teamName, syncSourceName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSyncSourceSyncsResponse(rsp) +} + // GetTestConnectionForSyncSourceWithResponse request returning *GetTestConnectionForSyncSourceResponse func (c *ClientWithResponses) GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) { rsp, err := c.GetTestConnectionForSyncSource(ctx, teamName, syncSourceName, syncTestConnectionId, reqEditors...) @@ -18241,6 +18579,32 @@ func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, err return response, nil } +// ParseGetOpenAPIJSONResponse parses an HTTP response from a GetOpenAPIJSONWithResponse call +func ParseGetOpenAPIJSONResponse(rsp *http.Response) (*GetOpenAPIJSONResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOpenAPIJSONResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -23220,6 +23584,53 @@ func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinat return response, nil } +// ParseListSyncDestinationSyncsResponse parses an HTTP response from a ListSyncDestinationSyncsWithResponse call +func ParseListSyncDestinationSyncsResponse(rsp *http.Response) (*ListSyncDestinationSyncsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListSyncDestinationSyncsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListSyncSourceSyncs200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetTestConnectionForSyncDestinationResponse parses an HTTP response from a GetTestConnectionForSyncDestinationWithResponse call func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetTestConnectionForSyncDestinationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -23727,6 +24138,53 @@ func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceRespons return response, nil } +// ParseListSyncSourceSyncsResponse parses an HTTP response from a ListSyncSourceSyncsWithResponse call +func ParseListSyncSourceSyncsResponse(rsp *http.Response) (*ListSyncSourceSyncsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListSyncSourceSyncsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListSyncSourceSyncs200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetTestConnectionForSyncSourceResponse parses an HTTP response from a GetTestConnectionForSyncSourceWithResponse call func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestConnectionForSyncSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -23796,7 +24254,7 @@ func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncs200Response + var dest ListSyncSourceSyncs200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -25500,12 +25958,12 @@ func ParseResetUserPasswordResponse(rsp *http.Response) (*ResetUserPasswordRespo } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: - var dest MethodNotAllowed + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON405 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError diff --git a/models.gen.go b/models.gen.go index 90c9329..68de4c6 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1217,15 +1217,15 @@ type ListSyncRuns200Response struct { Metadata ListMetadata `json:"metadata"` } -// ListSyncSources200Response defines model for ListSyncSources_200_response. -type ListSyncSources200Response struct { - Items []SyncSource `json:"items"` +// ListSyncSourceSyncs200Response defines model for ListSyncSourceSyncs_200_response. +type ListSyncSourceSyncs200Response struct { + Items []Sync `json:"items"` Metadata ListMetadata `json:"metadata"` } -// ListSyncs200Response defines model for ListSyncs_200_response. -type ListSyncs200Response struct { - Items []Sync `json:"items"` +// ListSyncSources200Response defines model for ListSyncSources_200_response. +type ListSyncSources200Response struct { + Items []SyncSource `json:"items"` Metadata ListMetadata `json:"metadata"` } @@ -3201,6 +3201,15 @@ type ListSyncDestinationsParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } +// ListSyncDestinationSyncsParams defines parameters for ListSyncDestinationSyncs. +type ListSyncDestinationSyncsParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` +} + // ListSyncSourcesParams defines parameters for ListSyncSources. type ListSyncSourcesParams struct { // PerPage The number of results per page (max 1000). @@ -3210,6 +3219,15 @@ type ListSyncSourcesParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } +// ListSyncSourceSyncsParams defines parameters for ListSyncSourceSyncs. +type ListSyncSourceSyncsParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` +} + // ListSyncsParams defines parameters for ListSyncs. type ListSyncsParams struct { // PerPage The number of results per page (max 1000). diff --git a/spec.json b/spec.json index 0101611..cf2bcba 100644 --- a/spec.json +++ b/spec.json @@ -52,13 +52,48 @@ "operationId" : "HealthCheck", "responses" : { "200" : { - "description" : "Response" + "description" : "Response", + "headers" : { + "Link" : { + "description" : "RFC 8631 compliant link relation information", + "explode" : false, + "schema" : { + "items" : { + "example" : "; rel=\"service-doc\"", + "type" : "string" + }, + "type" : "array" + }, + "style" : "simple" + } + } } }, "security" : [ ], "tags" : [ "healthcheck" ] } }, + "/openapi.json" : { + "get" : { + "description" : "Returns the OpenAPI definition in JSON format.", + "operationId" : "GetOpenAPIJSON", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "description" : "The OpenAPI document for this API in JSON format", + "type" : "object" + } + } + }, + "description" : "OpenAPI specification in JSON format" + } + }, + "security" : [ ], + "summary" : "Get OpenAPI JSON" + } + }, "/cq-healthcheck" : { "get" : { "description" : "Health check endpoint, returns 200", @@ -3726,8 +3761,8 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, - "405" : { - "$ref" : "#/components/responses/MethodNotAllowed" + "429" : { + "$ref" : "#/components/responses/TooManyRequests" }, "500" : { "$ref" : "#/components/responses/InternalError" @@ -4734,6 +4769,43 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/sync-sources/{sync_source_name}/syncs" : { + "get" : { + "description" : "List all Syncs for a given sync source.", + "operationId" : "ListSyncSourceSyncs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_source_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSyncSourceSyncs_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, "/teams/{team_name}/sync-destinations" : { "get" : { "description" : "List all sync destination definitions.", @@ -4914,6 +4986,43 @@ "tags" : [ "syncs" ] } }, + "/teams/{team_name}/sync-destinations/{sync_destination_name}/syncs" : { + "get" : { + "description" : "List all Syncs for a given sync destination.", + "operationId" : "ListSyncDestinationSyncs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/sync_destination_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSyncSourceSyncs_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "syncs" ] + } + }, "/teams/{team_name}/syncs" : { "get" : { "description" : "List all Syncs.", @@ -4930,7 +5039,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ListSyncs_200_response" + "$ref" : "#/components/schemas/ListSyncSourceSyncs_200_response" } } }, @@ -9302,24 +9411,6 @@ }, "required" : [ "created_at", "id", "status" ] }, - "SyncDestinationUpdate" : { - "description" : "Sync Destination Update Definition", - "properties" : { - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" - }, - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" - }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" - } - }, - "title" : "Sync Destination definition for updating a destination" - }, "SyncIncremental" : { "description" : "Managed Sync Incremental Options definition", "properties" : { @@ -9397,6 +9488,24 @@ }, "required" : [ "cpu", "created_at", "destinations", "disabled", "display_name", "memory", "name", "schedule", "source", "updated_at" ] }, + "SyncDestinationUpdate" : { + "description" : "Sync Destination Update Definition", + "properties" : { + "display_name" : { + "$ref" : "#/components/schemas/DisplayName" + }, + "write_mode" : { + "$ref" : "#/components/schemas/SyncDestinationWriteMode" + }, + "migrate_mode" : { + "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + }, + "last_update_source" : { + "$ref" : "#/components/schemas/SyncLastUpdateSource" + } + }, + "title" : "Sync Destination definition for updating a destination" + }, "SyncCreate" : { "description" : "Managed Sync definition", "properties" : { @@ -10769,11 +10878,11 @@ }, "required" : [ "items", "metadata" ] }, - "ListSyncDestinations_200_response" : { + "ListSyncSourceSyncs_200_response" : { "properties" : { "items" : { "items" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/Sync" }, "type" : "array" }, @@ -10783,11 +10892,11 @@ }, "required" : [ "items", "metadata" ] }, - "ListSyncs_200_response" : { + "ListSyncDestinations_200_response" : { "properties" : { "items" : { "items" : { - "$ref" : "#/components/schemas/Sync" + "$ref" : "#/components/schemas/SyncDestination" }, "type" : "array" }, From 7a6847b7ae94d9d13ae66cc946b9164c14005513 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 6 Sep 2024 13:54:55 +0300 Subject: [PATCH 228/343] fix: Generate CloudQuery Go API Client from `spec.json` (#239) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec.json b/spec.json index cf2bcba..25f8fd0 100644 --- a/spec.json +++ b/spec.json @@ -58,11 +58,8 @@ "description" : "RFC 8631 compliant link relation information", "explode" : false, "schema" : { - "items" : { - "example" : "; rel=\"service-doc\"", - "type" : "string" - }, - "type" : "array" + "example" : "; rel=\"service-doc\"", + "type" : "string" }, "style" : "simple" } From 1684c0524f802b48a7f30d015c013ca4461103a2 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:43:13 +0300 Subject: [PATCH 229/343] fix: Generate CloudQuery Go API Client from `spec.json` (#240) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 61 +++++++++++++++++++++++++++++++++++++++++---------- models.gen.go | 31 +++++++++++++++++++++++++- spec.json | 55 +++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 129 insertions(+), 18 deletions(-) diff --git a/client.gen.go b/client.gen.go index ddc4d5b..0e8a595 100644 --- a/client.gen.go +++ b/client.gen.go @@ -604,8 +604,10 @@ type ClientInterface interface { // ListUsersByTeam request ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // UploadImage request - UploadImage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // UploadImageWithBody request with any body + UploadImageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UploadImage(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetCurrentUser request GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2905,8 +2907,20 @@ func (c *Client) ListUsersByTeam(ctx context.Context, teamName TeamName, params return c.Client.Do(req) } -func (c *Client) UploadImage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUploadImageRequest(c.Server) +func (c *Client) UploadImageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadImageRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UploadImage(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadImageRequest(c.Server, body) if err != nil { return nil, err } @@ -11026,8 +11040,19 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return req, nil } -// NewUploadImageRequest generates requests for UploadImage -func NewUploadImageRequest(server string) (*http.Request, error) { +// NewUploadImageRequest calls the generic UploadImage builder with application/json body +func NewUploadImageRequest(server string, body UploadImageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUploadImageRequestWithBody(server, "application/json", bodyReader) +} + +// NewUploadImageRequestWithBody generates requests for UploadImage with any type of body +func NewUploadImageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -11045,11 +11070,13 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } @@ -12132,8 +12159,10 @@ type ClientWithResponsesInterface interface { // ListUsersByTeamWithResponse request ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) - // UploadImageWithResponse request - UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + // UploadImageWithBodyWithResponse request with any body + UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + + UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) // GetCurrentUserWithResponse request GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) @@ -17754,9 +17783,17 @@ func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, t return ParseListUsersByTeamResponse(rsp) } -// UploadImageWithResponse request returning *UploadImageResponse -func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { - rsp, err := c.UploadImage(ctx, reqEditors...) +// UploadImageWithBodyWithResponse request with arbitrary body returning *UploadImageResponse +func (c *ClientWithResponses) UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImageWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadImageResponse(rsp) +} + +func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImage(ctx, body, reqEditors...) if err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 68de4c6..fb6939a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -63,6 +63,14 @@ const ( ConnectorStatusRevoked ConnectorStatus = "revoked" ) +// Defines values for ContentType. +const ( + ContentTypeImagegif ContentType = "image/gif" + ContentTypeImagejpeg ContentType = "image/jpeg" + ContentTypeImagepng ContentType = "image/png" + ContentTypeImagewebp ContentType = "image/webp" +) + // Defines values for EmailTeamInvitationRequestRole. const ( EmailTeamInvitationRequestRoleAdmin EmailTeamInvitationRequestRole = "admin" @@ -752,6 +760,9 @@ type ConnectorUpdate struct { Name *string `json:"name,omitempty"` } +// ContentType The HTTP Content-Type of the image or asset +type ContentType string + // CreateAddonVersionRequest defines model for CreateAddonVersion_request. type CreateAddonVersionRequest struct { // AddonDeps addon dependencies in the format of ['team_name/type/addon_name@version'] @@ -965,7 +976,10 @@ type GetTeamMemberships200Response struct { // ImageURL defines model for ImageURL. type ImageURL struct { DownloadUrl string `json:"download_url"` - UploadUrl string `json:"upload_url"` + + // RequiredHeaders Required HTTP headers to include for the upload + RequiredHeaders map[string]interface{} `json:"required_headers"` + UploadUrl string `json:"upload_url"` } // Invitation defines model for Invitation. @@ -2593,6 +2607,9 @@ type TeamImage struct { // Name Name of image Name string `json:"name"` + // RequiredHeaders Required HTTP headers to include for the upload + RequiredHeaders map[string]interface{} `json:"required_headers"` + // UploadURL URL to upload image UploadURL *string `json:"upload_url,omitempty"` @@ -2605,6 +2622,9 @@ type TeamImageCreate struct { // Checksum SHA1 checksum of image Checksum string `json:"checksum"` + // ContentType The HTTP Content-Type of the image or asset + ContentType *ContentType `json:"content_type,omitempty"` + // Name Name of image Name string `json:"name"` } @@ -2697,6 +2717,12 @@ type UpdateTeamRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// UploadImageRequest defines model for UploadImage_request. +type UploadImageRequest struct { + // ContentType The HTTP Content-Type of the image or asset + ContentType *ContentType `json:"content_type,omitempty"` +} + // UploadPluginUIAssets201Response defines model for UploadPluginUIAssets_201_response. type UploadPluginUIAssets201Response struct { Assets []PluginUIAsset `json:"assets"` @@ -3472,6 +3498,9 @@ type CreateSyncRunProgressJSONRequestBody = CreateSyncRunProgressRequest // IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease +// UploadImageJSONRequestBody defines body for UploadImage for application/json ContentType. +type UploadImageJSONRequestBody = UploadImageRequest + // UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest diff --git a/spec.json b/spec.json index 25f8fd0..8a1ba91 100644 --- a/spec.json +++ b/spec.json @@ -113,6 +113,16 @@ "description" : "Get a URL to upload image that will be publicly accessible", "operationId" : "UploadImage", "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadImage_request" + } + } + }, + "required" : false + }, "responses" : { "200" : { "content" : { @@ -6833,6 +6843,12 @@ "required" : [ "message", "status" ], "title" : "Basic Error" }, + "ContentType" : { + "description" : "The HTTP Content-Type of the image or asset", + "enum" : [ "image/jpeg", "image/png", "image/gif", "image/webp" ], + "example" : "image/png", + "type" : "string" + }, "ImageURL" : { "properties" : { "upload_url" : { @@ -6842,9 +6858,17 @@ "download_url" : { "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", "type" : "string" + }, + "required_headers" : { + "additionalProperties" : { + "items" : { + "type" : "string" + } + }, + "description" : "Required HTTP headers to include for the upload" } }, - "required" : [ "download_url", "upload_url" ] + "required" : [ "download_url", "required_headers", "upload_url" ] }, "TeamName" : { "description" : "The unique name for the team.", @@ -8153,6 +8177,9 @@ "minLength" : 40, "pattern" : "^[a-f0-9]+$", "type" : "string" + }, + "content_type" : { + "$ref" : "#/components/schemas/ContentType" } }, "required" : [ "checksum", "name" ], @@ -8177,9 +8204,17 @@ "description" : "URL to upload image", "type" : "string", "x-go-name" : "UploadURL" + }, + "required_headers" : { + "additionalProperties" : { + "items" : { + "type" : "string" + } + }, + "description" : "Required HTTP headers to include for the upload" } }, - "required" : [ "checksum", "name", "url" ] + "required" : [ "checksum", "name", "required_headers", "url" ] }, "AddonOrderID" : { "description" : "ID of the addon order", @@ -10088,6 +10123,13 @@ }, "required" : [ "base_url", "return_url" ] }, + "UploadImage_request" : { + "properties" : { + "content_type" : { + "$ref" : "#/components/schemas/ContentType" + } + } + }, "ListPluginNotificationRequests_200_response" : { "properties" : { "items" : { @@ -10710,7 +10752,8 @@ "format" : "email" }, "subdomain" : { - "description" : "Subdomain to use in the URL" + "description" : "Subdomain to use in the URL", + "pattern" : "^[a-zA-Z0-9-]+$" } }, "required" : [ "email" ] @@ -10724,10 +10767,12 @@ }, "return_to" : { "description" : "Return to this URL after verification", - "format" : "url" + "format" : "url", + "pattern" : "^https:\\/\\/(.*\\.)?cloudquery\\.io(\\/.*)?$" }, "subdomain" : { - "description" : "Subdomain to use in the URL" + "description" : "Subdomain to use in the URL", + "pattern" : "^[a-zA-Z0-9-]+$" } }, "required" : [ "email" ] From 36913c80e7b43d0e85f6ece270f953b2e6f092cd Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:39:30 +0300 Subject: [PATCH 230/343] fix: Generate CloudQuery Go API Client from `spec.json` (#241) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ models.gen.go | 18 ++++++++++++++++++ spec.json | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/client.gen.go b/client.gen.go index 0e8a595..0f316a5 100644 --- a/client.gen.go +++ b/client.gen.go @@ -14010,6 +14010,7 @@ func (r AuthenticateConnectorFinishGCPResponse) StatusCode() int { type AuthenticateConnectorFinishOAuthResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ConnectorAuthResponseOAuth JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden @@ -21675,6 +21676,13 @@ func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*Authent } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorAuthResponseOAuth + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index fb6939a..5c64b44 100644 --- a/models.gen.go +++ b/models.gen.go @@ -666,6 +666,9 @@ type ConnectorAuthRequestOAuth struct { // Env Environment variables used in the spec. Env *interface{} `json:"env,omitempty"` + // Flavor Override default flavor + Flavor *interface{} `json:"flavor,omitempty"` + // PluginKind Kind of the plugin PluginKind interface{} `json:"plugin_kind"` @@ -3854,6 +3857,14 @@ func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { delete(object, "env") } + if raw, found := object["flavor"]; found { + err = json.Unmarshal(raw, &a.Flavor) + if err != nil { + return fmt.Errorf("error reading 'flavor': %w", err) + } + delete(object, "flavor") + } + if raw, found := object["plugin_kind"]; found { err = json.Unmarshal(raw, &a.PluginKind) if err != nil { @@ -3949,6 +3960,13 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { } } + if a.Flavor != nil { + object["flavor"], err = json.Marshal(a.Flavor) + if err != nil { + return nil, fmt.Errorf("error marshaling 'flavor': %w", err) + } + } + object["plugin_kind"], err = json.Marshal(a.PluginKind) if err != nil { return nil, fmt.Errorf("error marshaling 'plugin_kind': %w", err) diff --git a/spec.json b/spec.json index 8a1ba91..a8d26a9 100644 --- a/spec.json +++ b/spec.json @@ -6294,6 +6294,16 @@ "required" : true }, "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" + } + } + }, + "description" : "First part of authentication is complete, follow redirect to continue" + }, "204" : { "description" : "Authentication is complete." }, @@ -10080,6 +10090,9 @@ }, "skip_dependent_tables" : { "description" : "Whether to skip dependent tables, setting from the outer spec" + }, + "flavor" : { + "description" : "Override default flavor" } }, "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] From a8d14601bf2d7880cf285d7c95deb5c6cc19082d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 24 Sep 2024 07:06:04 -0400 Subject: [PATCH 231/343] fix: Generate CloudQuery Go API Client from `spec.json` (#242) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 5 ++--- spec.json | 9 +++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/models.gen.go b/models.gen.go index 5c64b44..9ab1792 100644 --- a/models.gen.go +++ b/models.gen.go @@ -65,7 +65,6 @@ const ( // Defines values for ContentType. const ( - ContentTypeImagegif ContentType = "image/gif" ContentTypeImagejpeg ContentType = "image/jpeg" ContentTypeImagepng ContentType = "image/png" ContentTypeImagewebp ContentType = "image/webp" @@ -2626,7 +2625,7 @@ type TeamImageCreate struct { Checksum string `json:"checksum"` // ContentType The HTTP Content-Type of the image or asset - ContentType *ContentType `json:"content_type,omitempty"` + ContentType ContentType `json:"content_type"` // Name Name of image Name string `json:"name"` @@ -2723,7 +2722,7 @@ type UpdateTeamRequest struct { // UploadImageRequest defines model for UploadImage_request. type UploadImageRequest struct { // ContentType The HTTP Content-Type of the image or asset - ContentType *ContentType `json:"content_type,omitempty"` + ContentType ContentType `json:"content_type"` } // UploadPluginUIAssets201Response defines model for UploadPluginUIAssets_201_response. diff --git a/spec.json b/spec.json index a8d26a9..719f897 100644 --- a/spec.json +++ b/spec.json @@ -121,7 +121,7 @@ } } }, - "required" : false + "required" : true }, "responses" : { "200" : { @@ -6855,7 +6855,7 @@ }, "ContentType" : { "description" : "The HTTP Content-Type of the image or asset", - "enum" : [ "image/jpeg", "image/png", "image/gif", "image/webp" ], + "enum" : [ "image/jpeg", "image/png", "image/webp" ], "example" : "image/png", "type" : "string" }, @@ -8192,7 +8192,7 @@ "$ref" : "#/components/schemas/ContentType" } }, - "required" : [ "checksum", "name" ], + "required" : [ "checksum", "content_type", "name" ], "title" : "Create Team Image Request" }, "TeamImage" : { @@ -10141,7 +10141,8 @@ "content_type" : { "$ref" : "#/components/schemas/ContentType" } - } + }, + "required" : [ "content_type" ] }, "ListPluginNotificationRequests_200_response" : { "properties" : { From 269dcea5509f3329f895444e0c53b76a01bda5ee Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 14 Oct 2024 06:11:14 -0400 Subject: [PATCH 232/343] chore(main): Release v1.13.1 (#229) :robot: I have created a release *beep* *boop* --- ## [1.13.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.0...v1.13.1) (2024-09-24) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#228](https://github.com/cloudquery/cloudquery-api-go/issues/228)) ([310278f](https://github.com/cloudquery/cloudquery-api-go/commit/310278f4b5c9871cf3588007d4eb49e0f56b8e13)) * Generate CloudQuery Go API Client from `spec.json` ([#230](https://github.com/cloudquery/cloudquery-api-go/issues/230)) ([9fe6755](https://github.com/cloudquery/cloudquery-api-go/commit/9fe67555586fc9ef924c361e06d96345b3af8f2d)) * Generate CloudQuery Go API Client from `spec.json` ([#231](https://github.com/cloudquery/cloudquery-api-go/issues/231)) ([b456ab7](https://github.com/cloudquery/cloudquery-api-go/commit/b456ab79a3eea0ad6414c79b1fa9c8fb64f532f2)) * Generate CloudQuery Go API Client from `spec.json` ([#232](https://github.com/cloudquery/cloudquery-api-go/issues/232)) ([1e64d94](https://github.com/cloudquery/cloudquery-api-go/commit/1e64d94a9a313dce58b77a7927e5c18d06d57b23)) * Generate CloudQuery Go API Client from `spec.json` ([#233](https://github.com/cloudquery/cloudquery-api-go/issues/233)) ([94adb27](https://github.com/cloudquery/cloudquery-api-go/commit/94adb274aba69874a0de62012f77c383eba69c60)) * Generate CloudQuery Go API Client from `spec.json` ([#234](https://github.com/cloudquery/cloudquery-api-go/issues/234)) ([e4e7c1d](https://github.com/cloudquery/cloudquery-api-go/commit/e4e7c1d55ca709e835d351d28ee5bc3c7a44fb07)) * Generate CloudQuery Go API Client from `spec.json` ([#235](https://github.com/cloudquery/cloudquery-api-go/issues/235)) ([2436ba0](https://github.com/cloudquery/cloudquery-api-go/commit/2436ba03d681d6c0f9a925f07201a57c8a6a322d)) * Generate CloudQuery Go API Client from `spec.json` ([#236](https://github.com/cloudquery/cloudquery-api-go/issues/236)) ([2eb8ecf](https://github.com/cloudquery/cloudquery-api-go/commit/2eb8ecf59bffb2ebd43dceab4e198de73d8b1c7a)) * Generate CloudQuery Go API Client from `spec.json` ([#237](https://github.com/cloudquery/cloudquery-api-go/issues/237)) ([528ba1c](https://github.com/cloudquery/cloudquery-api-go/commit/528ba1ced05a74bb8223e03f0fe1da2af56ed7df)) * Generate CloudQuery Go API Client from `spec.json` ([#238](https://github.com/cloudquery/cloudquery-api-go/issues/238)) ([02a1381](https://github.com/cloudquery/cloudquery-api-go/commit/02a1381bc54cbb876239f35a1e035d619fa2a438)) * Generate CloudQuery Go API Client from `spec.json` ([#239](https://github.com/cloudquery/cloudquery-api-go/issues/239)) ([7a6847b](https://github.com/cloudquery/cloudquery-api-go/commit/7a6847b7ae94d9d13ae66cc946b9164c14005513)) * Generate CloudQuery Go API Client from `spec.json` ([#240](https://github.com/cloudquery/cloudquery-api-go/issues/240)) ([1684c05](https://github.com/cloudquery/cloudquery-api-go/commit/1684c0524f802b48a7f30d015c013ca4461103a2)) * Generate CloudQuery Go API Client from `spec.json` ([#241](https://github.com/cloudquery/cloudquery-api-go/issues/241)) ([36913c8](https://github.com/cloudquery/cloudquery-api-go/commit/36913c80e7b43d0e85f6ece270f953b2e6f092cd)) * Generate CloudQuery Go API Client from `spec.json` ([#242](https://github.com/cloudquery/cloudquery-api-go/issues/242)) ([a8d1460](https://github.com/cloudquery/cloudquery-api-go/commit/a8d14601bf2d7880cf285d7c95deb5c6cc19082d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8f64bf..ffefebe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [1.13.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.0...v1.13.1) (2024-09-24) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#228](https://github.com/cloudquery/cloudquery-api-go/issues/228)) ([310278f](https://github.com/cloudquery/cloudquery-api-go/commit/310278f4b5c9871cf3588007d4eb49e0f56b8e13)) +* Generate CloudQuery Go API Client from `spec.json` ([#230](https://github.com/cloudquery/cloudquery-api-go/issues/230)) ([9fe6755](https://github.com/cloudquery/cloudquery-api-go/commit/9fe67555586fc9ef924c361e06d96345b3af8f2d)) +* Generate CloudQuery Go API Client from `spec.json` ([#231](https://github.com/cloudquery/cloudquery-api-go/issues/231)) ([b456ab7](https://github.com/cloudquery/cloudquery-api-go/commit/b456ab79a3eea0ad6414c79b1fa9c8fb64f532f2)) +* Generate CloudQuery Go API Client from `spec.json` ([#232](https://github.com/cloudquery/cloudquery-api-go/issues/232)) ([1e64d94](https://github.com/cloudquery/cloudquery-api-go/commit/1e64d94a9a313dce58b77a7927e5c18d06d57b23)) +* Generate CloudQuery Go API Client from `spec.json` ([#233](https://github.com/cloudquery/cloudquery-api-go/issues/233)) ([94adb27](https://github.com/cloudquery/cloudquery-api-go/commit/94adb274aba69874a0de62012f77c383eba69c60)) +* Generate CloudQuery Go API Client from `spec.json` ([#234](https://github.com/cloudquery/cloudquery-api-go/issues/234)) ([e4e7c1d](https://github.com/cloudquery/cloudquery-api-go/commit/e4e7c1d55ca709e835d351d28ee5bc3c7a44fb07)) +* Generate CloudQuery Go API Client from `spec.json` ([#235](https://github.com/cloudquery/cloudquery-api-go/issues/235)) ([2436ba0](https://github.com/cloudquery/cloudquery-api-go/commit/2436ba03d681d6c0f9a925f07201a57c8a6a322d)) +* Generate CloudQuery Go API Client from `spec.json` ([#236](https://github.com/cloudquery/cloudquery-api-go/issues/236)) ([2eb8ecf](https://github.com/cloudquery/cloudquery-api-go/commit/2eb8ecf59bffb2ebd43dceab4e198de73d8b1c7a)) +* Generate CloudQuery Go API Client from `spec.json` ([#237](https://github.com/cloudquery/cloudquery-api-go/issues/237)) ([528ba1c](https://github.com/cloudquery/cloudquery-api-go/commit/528ba1ced05a74bb8223e03f0fe1da2af56ed7df)) +* Generate CloudQuery Go API Client from `spec.json` ([#238](https://github.com/cloudquery/cloudquery-api-go/issues/238)) ([02a1381](https://github.com/cloudquery/cloudquery-api-go/commit/02a1381bc54cbb876239f35a1e035d619fa2a438)) +* Generate CloudQuery Go API Client from `spec.json` ([#239](https://github.com/cloudquery/cloudquery-api-go/issues/239)) ([7a6847b](https://github.com/cloudquery/cloudquery-api-go/commit/7a6847b7ae94d9d13ae66cc946b9164c14005513)) +* Generate CloudQuery Go API Client from `spec.json` ([#240](https://github.com/cloudquery/cloudquery-api-go/issues/240)) ([1684c05](https://github.com/cloudquery/cloudquery-api-go/commit/1684c0524f802b48a7f30d015c013ca4461103a2)) +* Generate CloudQuery Go API Client from `spec.json` ([#241](https://github.com/cloudquery/cloudquery-api-go/issues/241)) ([36913c8](https://github.com/cloudquery/cloudquery-api-go/commit/36913c80e7b43d0e85f6ece270f953b2e6f092cd)) +* Generate CloudQuery Go API Client from `spec.json` ([#242](https://github.com/cloudquery/cloudquery-api-go/issues/242)) ([a8d1460](https://github.com/cloudquery/cloudquery-api-go/commit/a8d14601bf2d7880cf285d7c95deb5c6cc19082d)) + ## [1.13.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.9...v1.13.0) (2024-08-21) From 75fe815a0062fa103c6e1a7c307d64b6cf5862f1 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:31:36 -0400 Subject: [PATCH 233/343] fix: Generate CloudQuery Go API Client from `spec.json` (#243) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 4 ++-- spec.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models.gen.go b/models.gen.go index 9ab1792..3f9c47e 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1313,7 +1313,7 @@ type MembershipWithTeam struct { Role string `json:"role"` // Team CloudQuery Team - Team *Team `json:"team,omitempty"` + Team Team `json:"team"` } // MembershipWithUser defines model for MembershipWithUser. @@ -1321,7 +1321,7 @@ type MembershipWithUser struct { Role string `json:"role"` // User CloudQuery User - User *User `json:"user,omitempty"` + User User `json:"user"` } // Plugin CloudQuery Plugin diff --git a/spec.json b/spec.json index 719f897..f74c942 100644 --- a/spec.json +++ b/spec.json @@ -8367,7 +8367,7 @@ "$ref" : "#/components/schemas/User" } }, - "required" : [ "role" ], + "required" : [ "role", "user" ], "title" : "CloudQuery User Membership" }, "SpendingLimit" : { @@ -8731,7 +8731,7 @@ "$ref" : "#/components/schemas/Team" } }, - "required" : [ "role" ], + "required" : [ "role", "team" ], "title" : "CloudQuery Team Membership" }, "TeamSubscriptionOrderID" : { From 1ba37dac1a79ecad11d4b683728ee34c8c3e992f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:40:01 -0400 Subject: [PATCH 234/343] fix: Generate CloudQuery Go API Client from `spec.json` (#245) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/spec.json b/spec.json index f74c942..b3f0d0b 100644 --- a/spec.json +++ b/spec.json @@ -2787,7 +2787,18 @@ } } }, - "description" : "Plugin usage for the current calendar month." + "description" : "Plugin usage for the current calendar month.", + "headers" : { + "x-cq-query-interval" : { + "explode" : false, + "schema" : { + "description" : "Suggested interval in seconds between usage queries.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + } + } }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" From 10b3917a5b8e17819090f27636b64d0ee4d429c9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 6 Nov 2024 04:14:13 -0500 Subject: [PATCH 235/343] fix: Generate CloudQuery Go API Client from `spec.json` (#246) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 358 ++++++++++++++++++++++++++++++++++++++ models.gen.go | 471 ++++++++++++++++++++++++++++++++++++++++++++++++++ spec.json | 182 +++++++++++++++++++ 3 files changed, 1011 insertions(+) diff --git a/client.gen.go b/client.gen.go index 0f316a5..7ff868a 100644 --- a/client.gen.go +++ b/client.gen.go @@ -143,6 +143,16 @@ type ClientInterface interface { // GetOpenAPIJSON request GetOpenAPIJSON(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ActivatePlatformWithBody request with any body + ActivatePlatformWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ActivatePlatform(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RenewPlatformActivationWithBody request with any body + RenewPlatformActivationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + RenewPlatformActivation(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginNotificationRequests request ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -879,6 +889,54 @@ func (c *Client) GetOpenAPIJSON(ctx context.Context, reqEditors ...RequestEditor return c.Client.Do(req) } +func (c *Client) ActivatePlatformWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewActivatePlatformRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ActivatePlatform(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewActivatePlatformRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RenewPlatformActivationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRenewPlatformActivationRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RenewPlatformActivation(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRenewPlatformActivationRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginNotificationRequestsRequest(c.Server, params) if err != nil { @@ -3964,6 +4022,86 @@ func NewGetOpenAPIJSONRequest(server string) (*http.Request, error) { return req, nil } +// NewActivatePlatformRequest calls the generic ActivatePlatform builder with application/json body +func NewActivatePlatformRequest(server string, body ActivatePlatformJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewActivatePlatformRequestWithBody(server, "application/json", bodyReader) +} + +// NewActivatePlatformRequestWithBody generates requests for ActivatePlatform with any type of body +func NewActivatePlatformRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/platform/activate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewRenewPlatformActivationRequest calls the generic RenewPlatformActivation builder with application/json body +func NewRenewPlatformActivationRequest(server string, body RenewPlatformActivationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRenewPlatformActivationRequestWithBody(server, "application/json", bodyReader) +} + +// NewRenewPlatformActivationRequestWithBody generates requests for RenewPlatformActivation with any type of body +func NewRenewPlatformActivationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/platform/activate/renew") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { var err error @@ -11698,6 +11836,16 @@ type ClientWithResponsesInterface interface { // GetOpenAPIJSONWithResponse request GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) + // ActivatePlatformWithBodyWithResponse request with any body + ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) + + ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) + + // RenewPlatformActivationWithBodyWithResponse request with any body + RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) + + RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) + // ListPluginNotificationRequestsWithResponse request ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) @@ -12570,6 +12718,60 @@ func (r GetOpenAPIJSONResponse) StatusCode() int { return 0 } +type ActivatePlatformResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActivatePlatform200Response + JSON205 *ActivatePlatform205Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ActivatePlatformResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ActivatePlatformResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RenewPlatformActivationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RenewPlatformActivation200Response + JSON205 *ActivatePlatform205Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RenewPlatformActivationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RenewPlatformActivationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginNotificationRequestsResponse struct { Body []byte HTTPResponse *http.Response @@ -16309,6 +16511,40 @@ func (c *ClientWithResponses) GetOpenAPIJSONWithResponse(ctx context.Context, re return ParseGetOpenAPIJSONResponse(rsp) } +// ActivatePlatformWithBodyWithResponse request with arbitrary body returning *ActivatePlatformResponse +func (c *ClientWithResponses) ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { + rsp, err := c.ActivatePlatformWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseActivatePlatformResponse(rsp) +} + +func (c *ClientWithResponses) ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { + rsp, err := c.ActivatePlatform(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseActivatePlatformResponse(rsp) +} + +// RenewPlatformActivationWithBodyWithResponse request with arbitrary body returning *RenewPlatformActivationResponse +func (c *ClientWithResponses) RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { + rsp, err := c.RenewPlatformActivationWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRenewPlatformActivationResponse(rsp) +} + +func (c *ClientWithResponses) RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { + rsp, err := c.RenewPlatformActivation(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRenewPlatformActivationResponse(rsp) +} + // ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) @@ -18643,6 +18879,128 @@ func ParseGetOpenAPIJSONResponse(rsp *http.Response) (*GetOpenAPIJSONResponse, e return response, nil } +// ParseActivatePlatformResponse parses an HTTP response from a ActivatePlatformWithResponse call +func ParseActivatePlatformResponse(rsp *http.Response) (*ActivatePlatformResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ActivatePlatformResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ActivatePlatform200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: + var dest ActivatePlatform205Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON205 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseRenewPlatformActivationResponse parses an HTTP response from a RenewPlatformActivationWithResponse call +func ParseRenewPlatformActivationResponse(rsp *http.Response) (*RenewPlatformActivationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RenewPlatformActivationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RenewPlatformActivation200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: + var dest ActivatePlatform205Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON205 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 3f9c47e..8a8c866 100644 --- a/models.gen.go +++ b/models.gen.go @@ -340,6 +340,42 @@ type AcceptTeamInvitationRequest struct { Token openapi_types.UUID `json:"token"` } +// ActivatePlatform200Response defines model for ActivatePlatform_200_response. +type ActivatePlatform200Response struct { + // ActivationID Activation ID for the platform + ActivationID interface{} `json:"activation_id"` + + // NextCheckInSeconds Time in seconds until the next check in + NextCheckInSeconds interface{} `json:"next_check_in_seconds"` + + // TeamName Name of the team that was activated + TeamName interface{} `json:"team_name"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// ActivatePlatform205Response defines model for ActivatePlatform_205_response. +type ActivatePlatform205Response struct { + // ButtonText Text for the button + ButtonText *interface{} `json:"button_text,omitempty"` + + // ButtonURL URL for the button + ButtonURL *interface{} `json:"button_url,omitempty"` + + // Error Error message + Error interface{} `json:"error"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// ActivatePlatformRequest defines model for ActivatePlatform_request. +type ActivatePlatformRequest struct { + // APIKey Team API key to activate platform with + APIKey interface{} `json:"api_key"` + + // InstallationID Installation ID of the platform + InstallationID interface{} `json:"installation_id"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // Addon CloudQuery Addon type Addon struct { // AddonFormat Supported formats for addons @@ -1962,6 +1998,23 @@ type RemoveTeamMembershipRequest struct { Email string `json:"email"` } +// RenewPlatformActivation200Response defines model for RenewPlatformActivation_200_response. +type RenewPlatformActivation200Response struct { + // NextCheckInSeconds Time in seconds until the next check in + NextCheckInSeconds interface{} `json:"next_check_in_seconds"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// RenewPlatformActivationRequest defines model for RenewPlatformActivation_request. +type RenewPlatformActivationRequest struct { + // ActivationID Previous activation ID + ActivationID interface{} `json:"activation_id"` + + // InstallationID Installation ID of the platform + InstallationID interface{} `json:"installation_id"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // ResetUserPasswordRequest defines model for ResetUserPassword_request. type ResetUserPasswordRequest struct { // Email Email address to reset @@ -3362,6 +3415,12 @@ type UpdateAddonVersionJSONRequestBody = AddonVersionUpdate // CreateAddonVersionJSONRequestBody defines body for CreateAddonVersion for application/json ContentType. type CreateAddonVersionJSONRequestBody = CreateAddonVersionRequest +// ActivatePlatformJSONRequestBody defines body for ActivatePlatform for application/json ContentType. +type ActivatePlatformJSONRequestBody = ActivatePlatformRequest + +// RenewPlatformActivationJSONRequestBody defines body for RenewPlatformActivation for application/json ContentType. +type RenewPlatformActivationJSONRequestBody = RenewPlatformActivationRequest + // CreatePluginNotificationRequestJSONRequestBody defines body for CreatePluginNotificationRequest for application/json ContentType. type CreatePluginNotificationRequestJSONRequestBody = PluginNotificationRequestCreate @@ -3524,6 +3583,273 @@ type ResetUserPasswordJSONRequestBody = ResetUserPasswordRequest // VerifyUserEmailJSONRequestBody defines body for VerifyUserEmail for application/json ContentType. type VerifyUserEmailJSONRequestBody = VerifyUserEmailRequest +// Getter for additional properties for ActivatePlatform200Response. Returns the specified +// element and whether it was found +func (a ActivatePlatform200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ActivatePlatform200Response +func (a *ActivatePlatform200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties +func (a *ActivatePlatform200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["activation_id"]; found { + err = json.Unmarshal(raw, &a.ActivationID) + if err != nil { + return fmt.Errorf("error reading 'activation_id': %w", err) + } + delete(object, "activation_id") + } + + if raw, found := object["next_check_in_seconds"]; found { + err = json.Unmarshal(raw, &a.NextCheckInSeconds) + if err != nil { + return fmt.Errorf("error reading 'next_check_in_seconds': %w", err) + } + delete(object, "next_check_in_seconds") + } + + if raw, found := object["team_name"]; found { + err = json.Unmarshal(raw, &a.TeamName) + if err != nil { + return fmt.Errorf("error reading 'team_name': %w", err) + } + delete(object, "team_name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties +func (a ActivatePlatform200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["activation_id"], err = json.Marshal(a.ActivationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'activation_id': %w", err) + } + + object["next_check_in_seconds"], err = json.Marshal(a.NextCheckInSeconds) + if err != nil { + return nil, fmt.Errorf("error marshaling 'next_check_in_seconds': %w", err) + } + + object["team_name"], err = json.Marshal(a.TeamName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'team_name': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ActivatePlatform205Response. Returns the specified +// element and whether it was found +func (a ActivatePlatform205Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ActivatePlatform205Response +func (a *ActivatePlatform205Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties +func (a *ActivatePlatform205Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["button_text"]; found { + err = json.Unmarshal(raw, &a.ButtonText) + if err != nil { + return fmt.Errorf("error reading 'button_text': %w", err) + } + delete(object, "button_text") + } + + if raw, found := object["button_url"]; found { + err = json.Unmarshal(raw, &a.ButtonURL) + if err != nil { + return fmt.Errorf("error reading 'button_url': %w", err) + } + delete(object, "button_url") + } + + if raw, found := object["error"]; found { + err = json.Unmarshal(raw, &a.Error) + if err != nil { + return fmt.Errorf("error reading 'error': %w", err) + } + delete(object, "error") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties +func (a ActivatePlatform205Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.ButtonText != nil { + object["button_text"], err = json.Marshal(a.ButtonText) + if err != nil { + return nil, fmt.Errorf("error marshaling 'button_text': %w", err) + } + } + + if a.ButtonURL != nil { + object["button_url"], err = json.Marshal(a.ButtonURL) + if err != nil { + return nil, fmt.Errorf("error marshaling 'button_url': %w", err) + } + } + + object["error"], err = json.Marshal(a.Error) + if err != nil { + return nil, fmt.Errorf("error marshaling 'error': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ActivatePlatformRequest. Returns the specified +// element and whether it was found +func (a ActivatePlatformRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ActivatePlatformRequest +func (a *ActivatePlatformRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties +func (a *ActivatePlatformRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["api_key"]; found { + err = json.Unmarshal(raw, &a.APIKey) + if err != nil { + return fmt.Errorf("error reading 'api_key': %w", err) + } + delete(object, "api_key") + } + + if raw, found := object["installation_id"]; found { + err = json.Unmarshal(raw, &a.InstallationID) + if err != nil { + return fmt.Errorf("error reading 'installation_id': %w", err) + } + delete(object, "installation_id") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties +func (a ActivatePlatformRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["api_key"], err = json.Marshal(a.APIKey) + if err != nil { + return nil, fmt.Errorf("error marshaling 'api_key': %w", err) + } + + object["installation_id"], err = json.Marshal(a.InstallationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for ConnectorAuthFinishRequestOAuth. Returns the specified // element and whether it was found func (a ConnectorAuthFinishRequestOAuth) Get(fieldName string) (value interface{}, found bool) { @@ -4170,6 +4496,151 @@ func (a LoginUserRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for RenewPlatformActivation200Response. Returns the specified +// element and whether it was found +func (a RenewPlatformActivation200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for RenewPlatformActivation200Response +func (a *RenewPlatformActivation200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for RenewPlatformActivation200Response to handle AdditionalProperties +func (a *RenewPlatformActivation200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["next_check_in_seconds"]; found { + err = json.Unmarshal(raw, &a.NextCheckInSeconds) + if err != nil { + return fmt.Errorf("error reading 'next_check_in_seconds': %w", err) + } + delete(object, "next_check_in_seconds") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for RenewPlatformActivation200Response to handle AdditionalProperties +func (a RenewPlatformActivation200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["next_check_in_seconds"], err = json.Marshal(a.NextCheckInSeconds) + if err != nil { + return nil, fmt.Errorf("error marshaling 'next_check_in_seconds': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for RenewPlatformActivationRequest. Returns the specified +// element and whether it was found +func (a RenewPlatformActivationRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for RenewPlatformActivationRequest +func (a *RenewPlatformActivationRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for RenewPlatformActivationRequest to handle AdditionalProperties +func (a *RenewPlatformActivationRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["activation_id"]; found { + err = json.Unmarshal(raw, &a.ActivationID) + if err != nil { + return fmt.Errorf("error reading 'activation_id': %w", err) + } + delete(object, "activation_id") + } + + if raw, found := object["installation_id"]; found { + err = json.Unmarshal(raw, &a.InstallationID) + if err != nil { + return fmt.Errorf("error reading 'installation_id': %w", err) + } + delete(object, "installation_id") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for RenewPlatformActivationRequest to handle AdditionalProperties +func (a RenewPlatformActivationRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["activation_id"], err = json.Marshal(a.ActivationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'activation_id': %w", err) + } + + object["installation_id"], err = json.Marshal(a.InstallationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for ResetUserPasswordRequest. Returns the specified // element and whether it was found func (a ResetUserPasswordRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index b3f0d0b..e7fc06e 100644 --- a/spec.json +++ b/spec.json @@ -44,6 +44,8 @@ "name" : "managed-databases" }, { "name" : "analytics" + }, { + "name" : "platform" } ], "paths" : { "/" : { @@ -6386,6 +6388,112 @@ }, "tags" : [ "syncs" ] } + }, + "/platform/activate" : { + "post" : { + "description" : "Activate platform usage by API key", + "operationId" : "ActivatePlatform", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_request" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_200_response" + } + } + }, + "description" : "Success" + }, + "205" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_205_response" + } + } + }, + "description" : "Activation method is no longer valid" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "platform" ], + "x-internal" : true + } + }, + "/platform/activate/renew" : { + "post" : { + "description" : "Renew platform activation", + "operationId" : "RenewPlatformActivation", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RenewPlatformActivation_request" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RenewPlatformActivation_200_response" + } + } + }, + "description" : "Success" + }, + "205" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_205_response" + } + } + }, + "description" : "Activation method is no longer valid" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "platform" ], + "x-internal" : true + } } }, "components" : { @@ -11098,6 +11206,80 @@ } } }, + "ActivatePlatform_request" : { + "additionalProperties" : { }, + "properties" : { + "api_key" : { + "description" : "Team API key to activate platform with", + "x-go-name" : "APIKey" + }, + "installation_id" : { + "description" : "Installation ID of the platform", + "pattern" : "^[a-z0-9]{64}$", + "x-go-name" : "InstallationID" + } + }, + "required" : [ "api_key", "installation_id" ] + }, + "ActivatePlatform_200_response" : { + "additionalProperties" : { }, + "properties" : { + "activation_id" : { + "description" : "Activation ID for the platform", + "format" : "uuid", + "x-go-name" : "ActivationID" + }, + "team_name" : { + "description" : "Name of the team that was activated" + }, + "next_check_in_seconds" : { + "description" : "Time in seconds until the next check in" + } + }, + "required" : [ "activation_id", "next_check_in_seconds", "team_name" ] + }, + "ActivatePlatform_205_response" : { + "additionalProperties" : { }, + "properties" : { + "error" : { + "description" : "Error message" + }, + "button_text" : { + "description" : "Text for the button" + }, + "button_url" : { + "description" : "URL for the button", + "format" : "url", + "x-go-name" : "ButtonURL" + } + }, + "required" : [ "error" ] + }, + "RenewPlatformActivation_request" : { + "additionalProperties" : { }, + "properties" : { + "installation_id" : { + "description" : "Installation ID of the platform", + "pattern" : "^[a-z0-9]{64}$", + "x-go-name" : "InstallationID" + }, + "activation_id" : { + "description" : "Previous activation ID", + "format" : "uuid", + "x-go-name" : "ActivationID" + } + }, + "required" : [ "activation_id", "installation_id" ] + }, + "RenewPlatformActivation_200_response" : { + "additionalProperties" : { }, + "properties" : { + "next_check_in_seconds" : { + "description" : "Time in seconds until the next check in" + } + }, + "required" : [ "next_check_in_seconds" ] + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From de64e703f5be9449d4db9c9695b7e1a0532192ca Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:07:04 -0500 Subject: [PATCH 236/343] fix: Generate CloudQuery Go API Client from `spec.json` (#247) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ spec.json | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/client.gen.go b/client.gen.go index 7ff868a..06ffe79 100644 --- a/client.gen.go +++ b/client.gen.go @@ -14557,6 +14557,7 @@ type RemoveTeamMembershipResponse struct { JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -14610,6 +14611,7 @@ type DeleteTeamMembershipResponse struct { JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound + JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -22785,6 +22787,13 @@ func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershi } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22900,6 +22909,13 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/spec.json b/spec.json index e7fc06e..1c444b1 100644 --- a/spec.json +++ b/spec.json @@ -2396,6 +2396,9 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } @@ -2468,6 +2471,9 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, "500" : { "$ref" : "#/components/responses/InternalError" } From e20a7e92338e9925a1c8894891a87fd4bedc38de Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 20 Nov 2024 04:59:59 -0500 Subject: [PATCH 237/343] fix: Generate CloudQuery Go API Client from `spec.json` (#248) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 16 ++++++++++++++++ spec.json | 3 +++ 2 files changed, 19 insertions(+) diff --git a/models.gen.go b/models.gen.go index 8a8c866..399d374 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2741,6 +2741,7 @@ type UpdateCustomerRequest struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` LearnedAboutCqFrom *string `json:"learned_about_cq_from,omitempty"` + Phone *string `json:"phone,omitempty"` AdditionalProperties map[string]interface{} `json:"-"` } @@ -5167,6 +5168,14 @@ func (a *UpdateCustomerRequest) UnmarshalJSON(b []byte) error { delete(object, "learned_about_cq_from") } + if raw, found := object["phone"]; found { + err = json.Unmarshal(raw, &a.Phone) + if err != nil { + return fmt.Errorf("error reading 'phone': %w", err) + } + delete(object, "phone") + } + if len(object) != 0 { a.AdditionalProperties = make(map[string]interface{}) for fieldName, fieldBuf := range object { @@ -5210,6 +5219,13 @@ func (a UpdateCustomerRequest) MarshalJSON() ([]byte, error) { } } + if a.Phone != nil { + object["phone"], err = json.Marshal(a.Phone) + if err != nil { + return nil, fmt.Errorf("error marshaling 'phone': %w", err) + } + } + for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { diff --git a/spec.json b/spec.json index 1c444b1..f484f33 100644 --- a/spec.json +++ b/spec.json @@ -10997,6 +10997,9 @@ }, "learned_about_cq_from" : { "type" : "string" + }, + "phone" : { + "type" : "string" } }, "required" : [ "first_name", "last_name" ] From 9f8c47b22672e40942d0f9860dc36a25566cc246 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 27 Nov 2024 03:54:01 -0500 Subject: [PATCH 238/343] fix: Generate CloudQuery Go API Client from `spec.json` (#249) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 30 ++++++++++++++++++++++++------ spec.json | 12 +++++++++++- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/models.gen.go b/models.gen.go index 399d374..100b625 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1144,6 +1144,8 @@ type ListInvoicesByTeam200Response struct { // ListMetadata defines model for ListMetadata. type ListMetadata struct { LastPage *int `json:"last_page,omitempty"` + PageSize int `json:"page_size"` + TimeMs *int `json:"time_ms,omitempty"` TotalCount *int `json:"total_count,omitempty"` } @@ -2737,12 +2739,13 @@ type UpdateCurrentUserRequest struct { // UpdateCustomerRequest defines model for UpdateCustomer_request. type UpdateCustomerRequest struct { - CompanyName *string `json:"company_name,omitempty"` - FirstName string `json:"first_name"` - LastName string `json:"last_name"` - LearnedAboutCqFrom *string `json:"learned_about_cq_from,omitempty"` - Phone *string `json:"phone,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + CompanyName *string `json:"company_name,omitempty"` + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + LearnedAboutCqFrom *string `json:"learned_about_cq_from,omitempty"` + LearnedAboutCqFromOther *string `json:"learned_about_cq_from_other,omitempty"` + Phone *string `json:"phone,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UpdateSyncRunRequest defines model for UpdateSyncRun_request. @@ -5168,6 +5171,14 @@ func (a *UpdateCustomerRequest) UnmarshalJSON(b []byte) error { delete(object, "learned_about_cq_from") } + if raw, found := object["learned_about_cq_from_other"]; found { + err = json.Unmarshal(raw, &a.LearnedAboutCqFromOther) + if err != nil { + return fmt.Errorf("error reading 'learned_about_cq_from_other': %w", err) + } + delete(object, "learned_about_cq_from_other") + } + if raw, found := object["phone"]; found { err = json.Unmarshal(raw, &a.Phone) if err != nil { @@ -5219,6 +5230,13 @@ func (a UpdateCustomerRequest) MarshalJSON() ([]byte, error) { } } + if a.LearnedAboutCqFromOther != nil { + object["learned_about_cq_from_other"], err = json.Marshal(a.LearnedAboutCqFromOther) + if err != nil { + return nil, fmt.Errorf("error marshaling 'learned_about_cq_from_other': %w", err) + } + } + if a.Phone != nil { object["phone"], err = json.Marshal(a.Phone) if err != nil { diff --git a/spec.json b/spec.json index f484f33..416d094 100644 --- a/spec.json +++ b/spec.json @@ -7067,8 +7067,15 @@ }, "last_page" : { "type" : "integer" + }, + "page_size" : { + "type" : "integer" + }, + "time_ms" : { + "type" : "integer" } - } + }, + "required" : [ "page_size" ] }, "PluginNotificationRequestCreate" : { "additionalProperties" : false, @@ -10998,6 +11005,9 @@ "learned_about_cq_from" : { "type" : "string" }, + "learned_about_cq_from_other" : { + "type" : "string" + }, "phone" : { "type" : "string" } From c49fede7906195bd5dfe1038a9f7fdda93682a80 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:54:33 -0500 Subject: [PATCH 239/343] fix: Generate CloudQuery Go API Client from `spec.json` (#250) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 27 +++++++++++++++++++++++---- spec.json | 14 ++++++++++++-- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/models.gen.go b/models.gen.go index 100b625..eec83ce 100644 --- a/models.gen.go +++ b/models.gen.go @@ -164,6 +164,12 @@ const ( SyncDestinationMigrateModeSafe SyncDestinationMigrateMode = "safe" ) +// Defines values for SyncDestinationMigrateModeUpdate. +const ( + SyncDestinationMigrateModeUpdateForced SyncDestinationMigrateModeUpdate = "forced" + SyncDestinationMigrateModeUpdateSafe SyncDestinationMigrateModeUpdate = "safe" +) + // Defines values for SyncDestinationWriteMode. const ( SyncDestinationWriteModeAppend SyncDestinationWriteMode = "append" @@ -171,6 +177,13 @@ const ( SyncDestinationWriteModeOverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" ) +// Defines values for SyncDestinationWriteModeUpdate. +const ( + SyncDestinationWriteModeUpdateAppend SyncDestinationWriteModeUpdate = "append" + SyncDestinationWriteModeUpdateOverwrite SyncDestinationWriteModeUpdate = "overwrite" + SyncDestinationWriteModeUpdateOverwriteDeleteStale SyncDestinationWriteModeUpdate = "overwrite-delete-stale" +) + // Defines values for SyncLastUpdateSource. const ( SyncLastUpdateSourceUi SyncLastUpdateSource = "ui" @@ -2242,6 +2255,9 @@ type SyncDestinationCreate struct { // SyncDestinationMigrateMode Migrate mode for the destination type SyncDestinationMigrateMode string +// SyncDestinationMigrateModeUpdate Migrate mode for the destination, for updating +type SyncDestinationMigrateModeUpdate string + // SyncDestinationTestConnection defines model for SyncDestinationTestConnection. type SyncDestinationTestConnection struct { // CompletedAt Time the test connection was completed @@ -2305,16 +2321,19 @@ type SyncDestinationUpdate struct { // LastUpdateSource How was the source or destination been created or updated last LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` + // MigrateMode Migrate mode for the destination, for updating + MigrateMode *SyncDestinationMigrateModeUpdate `json:"migrate_mode,omitempty"` - // WriteMode Write mode for the destination - WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` + // WriteMode Write mode for the destination, for updating + WriteMode *SyncDestinationWriteModeUpdate `json:"write_mode,omitempty"` } // SyncDestinationWriteMode Write mode for the destination type SyncDestinationWriteMode string +// SyncDestinationWriteModeUpdate Write mode for the destination, for updating +type SyncDestinationWriteModeUpdate string + // SyncEnv Environment variable. Environment variables are assumed to be secret. type SyncEnv struct { // Name Name of the environment variable diff --git a/spec.json b/spec.json index 416d094..ef277a0 100644 --- a/spec.json +++ b/spec.json @@ -9662,6 +9662,16 @@ }, "required" : [ "cpu", "created_at", "destinations", "disabled", "display_name", "memory", "name", "schedule", "source", "updated_at" ] }, + "SyncDestinationWriteModeUpdate" : { + "description" : "Write mode for the destination, for updating", + "enum" : [ "append", "overwrite", "overwrite-delete-stale" ], + "type" : "string" + }, + "SyncDestinationMigrateModeUpdate" : { + "description" : "Migrate mode for the destination, for updating", + "enum" : [ "safe", "forced" ], + "type" : "string" + }, "SyncDestinationUpdate" : { "description" : "Sync Destination Update Definition", "properties" : { @@ -9669,10 +9679,10 @@ "$ref" : "#/components/schemas/DisplayName" }, "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" + "$ref" : "#/components/schemas/SyncDestinationWriteModeUpdate" }, "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + "$ref" : "#/components/schemas/SyncDestinationMigrateModeUpdate" }, "last_update_source" : { "$ref" : "#/components/schemas/SyncLastUpdateSource" From e87e20e12ed6c5ec5a580e76d655cba00fb9dad2 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:58:18 +0200 Subject: [PATCH 240/343] chore(main): Release v1.13.2 (#244) :robot: I have created a release *beep* *boop* --- ## [1.13.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.1...v1.13.2) (2024-11-27) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#243](https://github.com/cloudquery/cloudquery-api-go/issues/243)) ([75fe815](https://github.com/cloudquery/cloudquery-api-go/commit/75fe815a0062fa103c6e1a7c307d64b6cf5862f1)) * Generate CloudQuery Go API Client from `spec.json` ([#245](https://github.com/cloudquery/cloudquery-api-go/issues/245)) ([1ba37da](https://github.com/cloudquery/cloudquery-api-go/commit/1ba37dac1a79ecad11d4b683728ee34c8c3e992f)) * Generate CloudQuery Go API Client from `spec.json` ([#246](https://github.com/cloudquery/cloudquery-api-go/issues/246)) ([10b3917](https://github.com/cloudquery/cloudquery-api-go/commit/10b3917a5b8e17819090f27636b64d0ee4d429c9)) * Generate CloudQuery Go API Client from `spec.json` ([#247](https://github.com/cloudquery/cloudquery-api-go/issues/247)) ([de64e70](https://github.com/cloudquery/cloudquery-api-go/commit/de64e703f5be9449d4db9c9695b7e1a0532192ca)) * Generate CloudQuery Go API Client from `spec.json` ([#248](https://github.com/cloudquery/cloudquery-api-go/issues/248)) ([e20a7e9](https://github.com/cloudquery/cloudquery-api-go/commit/e20a7e92338e9925a1c8894891a87fd4bedc38de)) * Generate CloudQuery Go API Client from `spec.json` ([#249](https://github.com/cloudquery/cloudquery-api-go/issues/249)) ([9f8c47b](https://github.com/cloudquery/cloudquery-api-go/commit/9f8c47b22672e40942d0f9860dc36a25566cc246)) * Generate CloudQuery Go API Client from `spec.json` ([#250](https://github.com/cloudquery/cloudquery-api-go/issues/250)) ([c49fede](https://github.com/cloudquery/cloudquery-api-go/commit/c49fede7906195bd5dfe1038a9f7fdda93682a80)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffefebe..f852cdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.13.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.1...v1.13.2) (2024-11-27) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#243](https://github.com/cloudquery/cloudquery-api-go/issues/243)) ([75fe815](https://github.com/cloudquery/cloudquery-api-go/commit/75fe815a0062fa103c6e1a7c307d64b6cf5862f1)) +* Generate CloudQuery Go API Client from `spec.json` ([#245](https://github.com/cloudquery/cloudquery-api-go/issues/245)) ([1ba37da](https://github.com/cloudquery/cloudquery-api-go/commit/1ba37dac1a79ecad11d4b683728ee34c8c3e992f)) +* Generate CloudQuery Go API Client from `spec.json` ([#246](https://github.com/cloudquery/cloudquery-api-go/issues/246)) ([10b3917](https://github.com/cloudquery/cloudquery-api-go/commit/10b3917a5b8e17819090f27636b64d0ee4d429c9)) +* Generate CloudQuery Go API Client from `spec.json` ([#247](https://github.com/cloudquery/cloudquery-api-go/issues/247)) ([de64e70](https://github.com/cloudquery/cloudquery-api-go/commit/de64e703f5be9449d4db9c9695b7e1a0532192ca)) +* Generate CloudQuery Go API Client from `spec.json` ([#248](https://github.com/cloudquery/cloudquery-api-go/issues/248)) ([e20a7e9](https://github.com/cloudquery/cloudquery-api-go/commit/e20a7e92338e9925a1c8894891a87fd4bedc38de)) +* Generate CloudQuery Go API Client from `spec.json` ([#249](https://github.com/cloudquery/cloudquery-api-go/issues/249)) ([9f8c47b](https://github.com/cloudquery/cloudquery-api-go/commit/9f8c47b22672e40942d0f9860dc36a25566cc246)) +* Generate CloudQuery Go API Client from `spec.json` ([#250](https://github.com/cloudquery/cloudquery-api-go/issues/250)) ([c49fede](https://github.com/cloudquery/cloudquery-api-go/commit/c49fede7906195bd5dfe1038a9f7fdda93682a80)) + ## [1.13.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.0...v1.13.1) (2024-09-24) From fba35bb6907fdf07f3324fb3e6a6d327497f8c2c Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:45:11 +0200 Subject: [PATCH 241/343] fix: Generate CloudQuery Go API Client from `spec.json` (#251) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.json b/spec.json index ef277a0..3a14bde 100644 --- a/spec.json +++ b/spec.json @@ -10924,7 +10924,7 @@ "return_to" : { "description" : "Return to this URL after verification", "format" : "url", - "pattern" : "^https:\\/\\/(.*\\.)?cloudquery\\.io(\\/.*)?$" + "pattern" : "^(https:\\/\\/(.*\\.)?cloudquery\\.io(\\/.*)?|http:\\/\\/localhost(:\\d+)?\\/callback)$" }, "subdomain" : { "description" : "Subdomain to use in the URL", From 71f5b0f27e5c99eda5fb2018080074e62df92997 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:05:15 +0200 Subject: [PATCH 242/343] chore(main): Release v1.13.3 (#252) :robot: I have created a release *beep* *boop* --- ## [1.13.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.2...v1.13.3) (2024-12-02) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#251](https://github.com/cloudquery/cloudquery-api-go/issues/251)) ([fba35bb](https://github.com/cloudquery/cloudquery-api-go/commit/fba35bb6907fdf07f3324fb3e6a6d327497f8c2c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f852cdf..d686ad4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.13.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.2...v1.13.3) (2024-12-02) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#251](https://github.com/cloudquery/cloudquery-api-go/issues/251)) ([fba35bb](https://github.com/cloudquery/cloudquery-api-go/commit/fba35bb6907fdf07f3324fb3e6a6d327497f8c2c)) + ## [1.13.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.1...v1.13.2) (2024-11-27) From c628e2add9f77e8a1dfe5fa7dad213cb86eb5d44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:59:38 +0000 Subject: [PATCH 243/343] fix(deps): Bump github.com/hashicorp/go-retryablehttp from 0.7.5 to 0.7.7 (#255) Bumps [github.com/hashicorp/go-retryablehttp](https://github.com/hashicorp/go-retryablehttp) from 0.7.5 to 0.7.7.
Changelog

Sourced from github.com/hashicorp/go-retryablehttp's changelog.

0.7.7 (May 30, 2024)

BUG FIXES:

  • client: avoid potentially leaking URL-embedded basic authentication credentials in logs (#158)

0.7.6 (May 9, 2024)

ENHANCEMENTS:

  • client: support a RetryPrepare function for modifying the request before retrying (#216)
  • client: support HTTP-date values for Retry-After header value (#138)
  • client: avoid reading entire body when the body is a *bytes.Reader (#197)

BUG FIXES:

  • client: fix a broken check for invalid server certificate in go 1.20+ (#210)
Commits
  • 1542b31 v0.7.7
  • defb9f4 v0.7.7
  • a99f07b Merge pull request #158 from dany74q/danny/redacted-url-in-logs
  • 8a28c57 Merge branch 'main' into danny/redacted-url-in-logs
  • 86e852d Merge pull request #227 from hashicorp/dependabot/github_actions/actions/chec...
  • 47fe99e Bump actions/checkout from 4.1.5 to 4.1.6
  • 490fc06 Merge pull request #226 from testwill/ioutil
  • f3e9417 chore: remove refs to deprecated io/ioutil
  • d969eaa Merge pull request #225 from hashicorp/manicminer-patch-2
  • 2ad8ed4 v0.7.6
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/hashicorp/go-retryablehttp&package-manager=go_modules&previous-version=0.7.5&new-version=0.7.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/cloudquery/cloudquery-api-go/network/alerts).
--- go.mod | 4 ++-- go.sum | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index f7512df..a3147b4 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21.0 require ( github.com/adrg/xdg v0.4.0 - github.com/hashicorp/go-retryablehttp v0.7.5 + github.com/hashicorp/go-retryablehttp v0.7.7 github.com/oapi-codegen/runtime v1.1.1 github.com/stretchr/testify v1.8.4 ) @@ -16,7 +16,7 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.20.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index c6d51f1..f873a09 100644 --- a/go.sum +++ b/go.sum @@ -7,18 +7,24 @@ github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvF github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= -github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= +github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= @@ -27,14 +33,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 12bc3161876ca7b7e3218bbaa2507adb22d6b9f7 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:05:17 +0200 Subject: [PATCH 244/343] chore(main): Release v1.13.4 (#256) :robot: I have created a release *beep* *boop* --- ## [1.13.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.3...v1.13.4) (2024-12-02) ### Bug Fixes * **deps:** Bump github.com/hashicorp/go-retryablehttp from 0.7.5 to 0.7.7 ([#255](https://github.com/cloudquery/cloudquery-api-go/issues/255)) ([c628e2a](https://github.com/cloudquery/cloudquery-api-go/commit/c628e2add9f77e8a1dfe5fa7dad213cb86eb5d44)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d686ad4..6462ecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.13.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.3...v1.13.4) (2024-12-02) + + +### Bug Fixes + +* **deps:** Bump github.com/hashicorp/go-retryablehttp from 0.7.5 to 0.7.7 ([#255](https://github.com/cloudquery/cloudquery-api-go/issues/255)) ([c628e2a](https://github.com/cloudquery/cloudquery-api-go/commit/c628e2add9f77e8a1dfe5fa7dad213cb86eb5d44)) + ## [1.13.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.2...v1.13.3) (2024-12-02) From 8cbec6f966a332d13724cce5e5f4b91e361c147f Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 2 Dec 2024 20:01:03 +0000 Subject: [PATCH 245/343] chore: Create CODEOWNERS (#254) This client is mostly used in the CLI hence data framework team as the owner --- CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..f97b2a9 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,4 @@ +* @cloudquery/cloudquery-framework + +go.mod +go.sum From 00ec95081553a4878c58b66287dcc913a90df722 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 2 Dec 2024 20:01:21 +0000 Subject: [PATCH 246/343] chore: Create renovate.json5 (#253) To allow automatic updates of dependencies --- .github/renovate.json5 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/renovate.json5 diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..fe4b671 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,5 @@ +{ + extends: [ + "github>cloudquery/.github//.github/renovate-go-default.json5", + ], +} From f0e0eb609be7c48351301ef095f585db69d63ced Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:31:07 +0200 Subject: [PATCH 247/343] chore(deps): Update dependency golangci/golangci-lint to v1.62.2 (#258) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | minor | `v1.54.2` -> `v1.62.2` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v1.62.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1622) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.62.0...v1.62.2) 1. Updated linters - `fatcontext`: from 0.5.2 to 0.5.3 - `ginkgolinter`: from 0.18.0 to 0.18.3 - `go-errorlint`: from 1.6.0 to 1.7.0 - `iface`: from 1.2.0 to 1.2.1 - `revive`: from 1.5.0 to 1.5.1 - `testifylint`: from 1.5.0 to 1.5.2 2. Misc. - fix: ignore cache error when file not found ### [`v1.62.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1620) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.61.0...v1.62.0) 1. New linters - Add `recvcheck` linter https://github.com/raeperd/recvcheck - Add `iface` linter https://github.com/uudashr/iface 2. Updated linters - ⚠️ `execinquery`: deprecation step 2 - ⚠️ `gomnd`: deprecation step 2 (replaced by `mnd`) - `bidichk`: from 0.2.7 to 0.3.2 (important performance improvement) - `canonicalheader`: from 1.1.1 to 1.1.2 - `cyclop`: from 1.2.1 to 1.2.3 - `dupword`: from 0.1.1 to 0.1.3 - `errcheck`: from 1.7.0 to 1.8.0 - `errchkjson`: from 0.3.6 to 0.4.0 - `errname`: from 0.1.13 to 1.0.0 - `ginkgolinter`: from 0.17.0 to 0.18.0 (new option: `force-succeed`) - `go-check-sumtype`: from 0.1.4 to 0.2.0 (new option: `default-signifies-exhaustive`) - `go-critic`: from 0.11.4 to 0.11.5 - `go-printf-func-name`: from [`7558a9e`](https://togithub.com/golangci/golangci-lint/commit/7558a9eaa5af) to v0.1.0 - `godot`: from 1.4.17 to 1.4.18 - `gosec`: from 2.21.2 to 2.21.4 - `intrange`: from 0.2.0 to 0.2.1 - `loggercheck`: from 0.9.4 to 0.10.1 (`log/slog` support) - `musttag`: from 0.12.2 to 0.13.0 - `nakedret`: from 2.0.4 to 2.0.5 - `nilnil`: from 0.1.9 to 1.0.0 (new option: `detect-opposite`) - `noctx`: from 0.0.2 to 0.1.0 - `protogetter`: from 0.3.6 to 0.3.8 - `revive`: from 1.3.9 to 1.5.0 (new rules: `filename-format`, and `file-length-limit`) - `tenv`: from 1.10.0 to 1.12.1 (handle dot import) - `testifylint`: from 1.4.3 to 1.5.0 (new checkers: `contains`, `encoded-compare`, `regexp`) 3. Misc. - Type sizing when cross-compiling (32-bit). - code-climate: add check_name field - Improve Go version detection - Fix Go version propagation 4. Documentation - Adds a section about `exclude-dirs-use-default` - Improve 'install from sources' section - Improve FAQ about Go versions - Improve linter/rule/check docs - Improve new linter section - Improve `forbidigo` pattern examples for built-in functions ### [`v1.61.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1610) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.60.3...v1.61.0) 1. Enhancements - Add `junit-xml-extended` format - Exclude Swagger Codegen files by default 2. Updated linters - `dupword`: from 0.0.14 to 0.1.1 - `fatcontext`: from 0.4.0 to 0.5.2 - `gci`: from 0.13.4 to 0.13.5 (new option `no-lex-order`) - `go-ruleguard`: from 0.4.2 to [`0fe6f58`](https://togithub.com/golangci/golangci-lint/commit/0fe6f58b47b1) (fix panic with custom linters) - `godot`: from 1.4.16 to 1.4.17 - `gomodguard`: from 1.3.3 to 1.3.5 - `gosec`: disable temporarily `G407` - `gosec`: from [`ab3f6c1`](https://togithub.com/golangci/golangci-lint/commit/ab3f6c1c83a0) to 2.21.2 (partially fix `G115`) - `intrange`: from 0.1.2 to 0.2.0 - `nolintlint`: remove the empty line in the directive replacement 3. Misc. - Improve runtime version parsing 4. Documentation - Add additional info about `typecheck` ### [`v1.60.3`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1603) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.60.2...v1.60.3) 1. Updated linters - `gosec`: from [`81cda2f`](https://togithub.com/golangci/golangci-lint/commit/81cda2f91fbe) to [`ab3f6c1`](https://togithub.com/golangci/golangci-lint/commit/ab3f6c1c83a0) (fix `G115` false positives) 2. Misc. - Check that the Go version use to build is greater or equals to the Go version of the project ### [`v1.60.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1602) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.60.1...v1.60.2) 1. Updated linters - `gofmt`: update to HEAD (go1.22) - `gofumpt`: from 0.6.0 to 0.7.0 - `gosec`: fix G602 analyzer - `gosec`: from [`5f0084e`](https://togithub.com/golangci/golangci-lint/commit/5f0084eb01a9) to [`81cda2f`](https://togithub.com/golangci/golangci-lint/commit/81cda2f91fbe) (adds `G115`, `G405`, `G406`, `G506`, `G507`) - `staticcheck`: from 0.5.0 to 0.5.1 - `staticcheck`: propagate Go version - `wrapcheck`: from 2.8.3 to 2.9.0 - ⚠️ `exportloopref`: deprecation ### [`v1.60.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1601) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.59.1...v1.60.1) 1. Updated linters - `errorlint`: from 1.5.2 to 1.6.0 - `exhaustruct`: from 3.2.0 to 3.3.0 (recognize custom error values in return) - `fatcontext`: from 0.2.2 to 0.4.0 (fix false positives for context stored in structs) - `gocognit`: from 1.1.2 to 1.1.3 - `gomodguard`: from 1.3.2 to 1.3.3 - `govet` (`printf`): report non-constant format, no args - `lll`: advertise max line length instead of just reporting failure - `revive`: from 1.3.7 to 1.3.9 (new rule: `comments-density`) - `sloglint`: from 0.7.1 to 0.7.2 - `spancheck`: from 0.6.1 to 0.6.2 - `staticcheck`: from 0.4.7 to 0.5.0 - `tenv`: from 1.7.1 to 1.10.0 (remove reports on fuzzing) - `testifylint`: from 1.3.1 to 1.4.3 (new options: `formatter`, `suite-broken-parallel`, `suite-subtest-run`) - `tparallel`: from 0.3.1 to 0.3.2 - `usestdlibvars`: from 1.26.0 to 1.27.0 (fix false-positive with number used inside a mathematical operations) - `wsl`: from 4.2.1 to 4.4.1 - ️⚠️ `unused`: remove `exported-is-used` option 2. Fixes - SARIF: sanitize level property - ️⚠️ `typecheck` issues should never be ignored 3. Documentation - Add link on linter without configuration - Remove 'trusted by' page - `wsl` update documentation of the configuration 4. misc. - 🎉 go1.23 support ### [`v1.59.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1591) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.59.0...v1.59.1) 1. Updated linters - `errorlint`: from 1.5.1 to 1.5.2 - `gomnd`: deprecated configuration compatibility - `intrange`: add `style` preset - `misspell`: from 0.5.1 to 0.6.0 - `sloglint`: from 0.7.0 to 0.7.1 - `testifylint`: from 1.3.0 to 1.3.1 - `unparam`: bump to HEAD - `usestdlibvars`: from 1.25.0 to 1.26.0 2. Fixes - SARIF: init empty result slice - SARIF: issue column >= 1 3. Documentation - `revive`: update documentation of the configuration ### [`v1.59.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1590) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.2...v1.59.0) 1. Enhancements - Add SARIF output format - Allow the analysis of generated files (`issues.exclude-generated: disable`) 2. Updated linters - `errcheck`: fix deprecation warning - `go-critic`: from 0.11.3 to 0.11.4 - `gosec`: from 2.20.0 to [`5f0084e`](https://togithub.com/golangci/golangci-lint/commit/5f0084eb01a9) (fix G601 and G113 performance issues) - `sloglint`: from 0.6.0 to 0.7.0 (new option `forbidden-keys`) - `testifylint`: from 1.2.0 to 1.3.0 (new checker `negative-positive` and new option `go-require.ignore-http-handlers`) 3. Misc. - ️️⚠️ Deprecate `github-action` output format - ️️⚠️ Deprecate `issues.exclude-generated-strict` option (replaced by `issues.exclude-generated: strict`) - ️️⚠️ Add warning about disabled and deprecated linters (level 2) ### [`v1.58.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1582) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.1...v1.58.2) 1. Updated linters - `canonicalheader`: from 1.0.6 to 1.1.1 - `gosec`: from 2.19.0 to 2.20.0 - `musttag`: from 0.12.1 to 0.12.2 - `nilnil`: from 0.1.8 to 0.1.9 2. Documentation - Improve integrations and install pages ### [`v1.58.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1581) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.58.0...v1.58.1) 1. Updated linters - `tagalign`: from 1.3.3 to 1.3.4 - `protogetter`: from 0.3.5 to 0.3.6 - `gochecknoinits`: fix analyzer name 2. Fixes - Restores previous `gihub-actions` output format (removes GitHub Action problem matchers) ### [`v1.58.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1580) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.2...v1.58.0) 1. New linters - `fatcontext`: https://github.com/Crocmagnon/fatcontext - `canonicalheader`: https://github.com/lasiar/canonicalheader 2. Updated linters - `copyloopvar`: from 1.0.10 to 1.1.0 (`ignore-alias` is replaced by `check-alias` with the opposite behavior) - `decorder`: from 0.4.1 to 0.4.2 - `errname`: from 0.1.12 to 0.1.13 - `errorlint`: from 1.4.8 to 1.5.1 (new options `allowed-errors` and `allowed-errors-wildcard`) - `execinquery`: deprecate linter ⚠️ - `gci`: from 0.12.3 to 0.13.4 (new section `localModule`) - `gocritic`: from 0.11.2 to 0.11.3 - `spancheck`: from 0.5.3 to 0.6.1 - `goerr113` is replaced by `err113` ⚠️ - `gomnd` is replaced by `mnd` ⚠️ - `gomodguard`: from 1.3.1 to 1.3.2 - `grouper`: from 1.1.1 to 1.1.2 - `intrange`: from 0.1.1 to 0.1.2 - `mirror`: from 1.1.0 to 1.2.0 - `misspell`: from 0.4.1 to 0.5.1 - `musttag`: from 0.9.0 to 0.12.1 - `nilnil`: from 0.1.7 to 0.1.8 - `nonamedreturns`: from 1.0.4 to 1.0.5 - `promlinter`: from 0.2.0 to 0.3.0 - `sloglint`: from 0.5.0 to 0.6.0 - `unparam`: bump to HEAD ([`063aff9`](https://togithub.com/golangci/golangci-lint/commit/063aff900ca150b80930c8de76f11d7e6488222f)) - `whitespace`: from 0.1.0 to 0.1.1 3. Enhancements - Speed up "fast" linters when only "fast" linters are run: between 40% and 80% faster at first run (i.e. without cache) 4. Fixes - Use version with module plugins - Skip `go.mod` report inside autogenerated processor - Keep only `typecheck` issues when needed - Don't hide `typecheck` errors inside diff processor 5. Misc. - ⚠️ log an error when using previously deprecated linters ([Linter Deprecation Cycle](https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle)) - [`deadcode`](https://togithub.com/remyoudompheng/go-misc/tree/master/deadcode): deprecated since v1.49.0 (2022-08-23). - [`exhaustivestruct`](https://togithub.com/mbilski/exhaustivestruct): deprecated since v1.46.0 (2022-05-08). - [`golint`](https://togithub.com/golang/lint): deprecated since v1.41.0 (2021-06-15). - [`ifshort`](https://togithub.com/esimonov/ifshort): deprecated since v1.48.0 (2022-08-04). - [`interfacer`](https://togithub.com/mvdan/interfacer): deprecated since v1.38.0 (2021-03-03). - [`maligned`](https://togithub.com/mdempsky/maligned): deprecated since v1.38.0 (2021-03-03). - [`nosnakecase`](https://togithub.com/sivchari/nosnakecase): deprecated since v1.48.0 (2022-08-04). - [`scopelint`](https://togithub.com/kyoh86/scopelint): deprecated since v1.39.0 (2021-03-25). - [`structcheck`](https://togithub.com/opennota/check): deprecated since v1.49.0 (2022-08-23). - [`varcheck`](https://togithub.com/opennota/check): deprecated since v1.49.0 (2022-08-23). - ⚠️ Deprecate usage of linter alternative names - Remove help display on errors with `config verify` command - Add `pre-commit` hook to run `config verify` - Improve `github-action` output 6. Documentation - Remove deprecated Atom from Editor Integrations GitHub Action (v5.1.0) for golangci-lint: - supports for `pull`, `pull_request_target`, and `merge_group` events with the option `only-new-issues`. - ️️⚠️ `skip-pkg-cache` and `skip-build-cache` have been removed because the cache related to Go itself is already handled by `actions/setup-go`. - with golangci-lint v1.58, the file information (path and position) will be displayed on the log. ### [`v1.57.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1572) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.1...v1.57.2) 1. Updated linters - `contextcheck`: from 1.1.4 to 1.1.5 - `copyloopvar`: from 1.0.8 to 1.0.10 - `ginkgolinter`: from 0.16.1 to 0.16.2 - `goconst`: from 1.7.0 to 1.7.1 - `gomoddirectives`: from 0.2.3 to 0.2.4 - `intrange`: from 0.1.0 to 0.1.1 2. Misc. - Display warnings on deprecated linter options - Fix missing `colored-tab` output format - Fix TeamCity `inspectionType` service message 3. Documentation - Remove invalid example about mixing files and directory - Improve linters page ### [`v1.57.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1571) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.57.0...v1.57.1) 1. Fixes - Ignore issues with invalid position (e.g. `contextcheck`). ### [`v1.57.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1570) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.2...v1.57.0) 1. New linters - `copyloopvar`: https://github.com/karamaru-alpha/copyloopvar - `intrange`: https://github.com/ckaznocha/intrange 2. Updated linters - `dupword`: from 0.0.13 to 0.0.14 - `gci`: from 0.12.1 to 0.12.3 - `ginkgolinter`: from 0.15.2 to 0.16.1 (new option `force-expect-to`, `validate-async-intervals`, and `forbid-spec-pollution`) - `go-critic`: from 0.11.1 to 0.11.2 - `go-critic`: support of `enable-all` and `disable-all` options - `go-spancheck`: from 0.5.2 to 0.5.3 - `gomodguard`: from 1.3.0 to 1.3.1 - `govet`: deprecation of `check-shadowing` ⚠️ - `govet`: disable temporarily `httpresponse` because of a bug [https://github.com/golang/go/issues/66259](https://togithub.com/golang/go/issues/66259) - `misspell`: add `extra-words` - `musttag`: from 0.8.0 to 0.9.0 - `nakedret`: from 2.0.2 to 2.0.4 - `paralleltest`: from 1.0.9 to 1.0.10 - `perfsprint`: from 0.6.0 to 0.7.1 (new option `strconcat`) - `protogetter`: from 0.3.4 to 0.3.5 - `revive`: add `exclude` option - `sloglint`: from 0.4.0 to 0.5.0 (new option `no-global`) - `staticcheck`: from 0.4.6 to 0.4.7 - `testifylint`: from 1.1.2 to 1.2.0 (new option `bool-compare`) - `unconvert`: to HEAD (new options `fast-math` and `safe`) - `wrapcheck`: from 2.8.1 to 2.8.3 - Disable `copyloopvar` and `intrange` on Go < 1.22 3. Enhancements - 🧩New custom linters system https://golangci-lint.run/plugins/module-plugins/ - Allow running only a specific linter without modifying the file configuration (`--enable-only`) - Allow custom sort order for the reports (`output.sort-order`) - Automatically adjust the maximum concurrency to the container CPU quota if `run.concurrency=0` - Add `config verify` command to check the configuration against the JSON Schema - Option to strictly follow Go generated file convention (`issues.exclude-generated-strict`) - Syntax to not override `severity` from linters (`@linter`) - Use severities from `gosec` - Create automatically directory related to `output.formats.path` - Use the first issue without inline on `mergeLineIssues` on multiple issues 4. Misc. - ⚠️ Inactivate deprecated linters (`deadcode`, `exhaustivestruct`, `golint`, `ifshort`, `interfacer`, `maligned`, `nosnakecase`, `scopelint`, `structcheck`, `varcheck`) - ⚠️ Deprecated CLI flags have been removed (deprecated since 2018) - ⚠️ Move `show-stats` option from `run` to `output` configuration section - ⚠️ Replace `run.skip-xxx` options by `issues.exclude-xxx` options - ⚠️ Replace `output.format` by `output.formats` with a new file configuration syntax - Internal rewrite of the CLI - Improve 'no go files to analyze' message - Use `GOTOOLCHAIN=auto` inside the Docker images 5. Documentation - ⚠️ Define the linter deprecation cycle https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle - 🎉Use information from the previous release to create linter pages - Publish JSON schema on https://golangci-lint.run/jsonschema/golangci.jsonschema.json - Reorganize documentation pages - Add an explanation about the configuration file inside golangci-lint repository **⚠️ Important ⚠️** 1. Deprecated linters are inactivated, you still need to disable them if you are using `enable-all`. 2. Deprecated CLI flags (about linter settings and `deadline`) have been removed. ### [`v1.56.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1562) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.1...v1.56.2) 1. updated linters - `go-critic`: from 0.11.0 to 0.11.1 - `gosec`: from 2.18.2 to 2.19.0 - `testifylint`: from 1.1.1 to 1.1.2 - `usestdlibvars`: from 1.24.0 to 1.25.0 - `wsl`: from 4.2.0 to 4.2.1 2. misc. - Fix missing version in Docker image 3. Documentation - Explain the limitation of `new-from-rev` and `new-from-patch` ### [`v1.56.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1561) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.56.0...v1.56.1) 1. updated linters - `errcheck`: from 1.6.3 to 1.7.0 - `govet`: disable `loopclosure` with go1.22 - `revive`: from 1.3.6 to 1.3.7 - `testifylint`: from 1.1.0 to 1.1.1 ### [`v1.56.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1560) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.2...v1.56.0) 1. new linters - `spancheck`: https://github.com/jjti/go-spancheck 2. updated linters - `depguard`: from 2.1.0 to 2.2.0 - `exhaustive`: from 0.11.0 to 0.12.0 - `exhaustruct`: from 3.1.0 to 3.2.0 - `gci`: from 0.11.2 to 0.12.1 - `ginkgolinter`: from 0.14.1 to 0.15.2 - `go-check-sumtype`: from 0.1.3 to 0.1.4 - `go-critic`: from 0.9.0 to 0.11.0 - `go-errorlint`: from 1.4.5 to 1.4.8 - `go-spancheck`: from 0.4.2 to 0.5.2 - `goconst`: from 1.6.0 to 1.7.0 - `godot`: from 1.4.15 to 1.4.16 - `gofumpt`: from 0.5.0 to 0.6.0 - `inamedparam`: from 0.1.2 to 0.1.3 - `ineffassign`: from 0.0.0-20230610083614-0e73809eb601 to 0.1.0 - `ireturn`: from 0.2.2 to 0.3.0 - `misspell`: add mode option - `musttag`: from v0.7.2 to v0.8.0 - `paralleltest`: from 1.0.8 to 1.0.9 - `perfsprint`: from 0.2.0 to 0.6.0 - `protogetter`: from 0.2.3 to 0.3.4 - `revive`: from 1.3.4 to 1.3.6 - `sloglint`: add static-msg option - `sloglint`: from 0.1.2 to 0.4.0 - `testifylint`: from 0.2.3 to 1.1.0 - `unparam`: from [`2022122`](https://togithub.com/golangci/golangci-lint/commit/20221223090309)-7455f1af531d to [`2024010`](https://togithub.com/golangci/golangci-lint/commit/20240104100049)-c549a3470d14 - `whitespace`: update after moving to the `analysis` package - `wsl`: from 3.4.0 to 4.2.0 - `zerologlint`: from 0.1.3 to 0.1.5 3. misc. - 🎉 go1.22 support - Implement stats per linter with a flag - Make versioning inside Docker image consistent with binaries - Parse Go RC version 4. Documentation - Fix `noctx` description - Add missing fields to `.golangci.reference.yml` - Improve `.golangci.reference.yml` defaults - `typecheck`: improve FAQ - `exhaustruct`: note that struct regular expressions are expected to match the entire `package/name/structname` - `wrapcheck`: adjust `ignoreSigs` to new defaults **Important** `testifylint` has [breaking changes](https://togithub.com/Antonboom/testifylint/releases/tag/v1.0.0) about enabling/disabling checks: - If you were using the option `enable` with a filtered list of checks, you should either add `disable-all: true` (1) or use `disable` field (2). ```yml ``` ### Example (1) testifylint: disable-all: true enable: - bool-compare - compares - empty - error-is-as - error-nil - expected-actual - go-require - float-compare - len - nil-compare - require-error ### - suite-dont-use-pkg - suite-extra-assert-call - suite-thelper ``` ```yml ### Example (2) testifylint: disable: - suite-dont-use-pkg ``` ### [`v1.55.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1552) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.1...v1.55.2) 1. updated linters - `ireturn`: from 0.2.1 to 0.2.2 - `ginkgolinter`: from 0.14.0 to 0.14.1 ### [`v1.55.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1551) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.0...v1.55.1) 1. updated linters - `gosec`: from 2.18.1 to 2.18.2 2. misc. - `revgrep`: from v0.5.0 to v0.5.2 (support git < 2.41.0) - output: convert backslashes to forward slashes for GitHub Action annotations printer ### [`v1.55.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1550) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.2...v1.55.0) 1. new linters - `gochecksumtype`: https://github.com/alecthomas/go-check-sumtype - `inamedparam`: https://github.com/macabu/inamedparam - `perfsprint`: https://github.com/catenacyber/perfsprint - `protogetter`: https://github.com/ghostiam/protogetter - `sloglint`: https://github.com/go-simpler/sloglint - `testifylint`: https://github.com/Antonboom/testifylint 2. updated linters - `bidichk`: from 0.2.4 to 0.2.7 - `decorder`: from 0.4.0 to 0.4.1 - `dupword`: from 0.0.12 to 0.0.13 - `errchkjson`: from 0.3.1 to 0.3.6 - `gci`: from 0.11.0 to 0.11.2 - `ginkgolinter`: from 0.13.5 to 0.14.0 - `go-errorlint`: from 1.4.4 to 1.4.5 - `gocognit`: from 1.0.7 to 1.1.0 - `goconst`: from 1.5.1 to 1.6.0 - `godot`: from 1.4.14 to 1.4.15 - `gofmt`: update to HEAD - `goimports`: update to HEAD - `gosec`: from 2.17.0 to 2.18.1 - `gosmopolitan`: from 1.2.1 to 1.2.2 - `govet`: add `appends` analyzer - `ireturn`: from 0.2.0 to 0.2.1 - `protogetter`: from 0.2.2 to 0.2.3 - `revgrep`: from [`745bb2f`](https://togithub.com/golangci/golangci-lint/commit/745bb2f7c2e6) to v0.5.0 - `revive`: from 1.3.2 to 1.3.4 - `sqlclosecheck`: from 0.4.0 to 0.5.1 - `staticcheck`: from 0.4.5 to 0.4.6 - `tagalign`: from 1.3.2 to 1.3.3 - `unused`: support passing in options 3. misc. - Add a pre-commit hook to check all files 4. Documentation - add source options to exclude-rules docs - `gosec`: add G602 to includes/excludes inside .golangci.reference.yml
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index e7eb9c7..b60804f 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.54.2 + version: v1.62.2 From 9c97ad9edca9906f86bd717fbf5ad9d2a1bf9dc2 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:32:00 +0200 Subject: [PATCH 248/343] fix(deps): Update module github.com/adrg/xdg to v0.5.3 (#259) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/adrg/xdg](https://togithub.com/adrg/xdg) | require | minor | `v0.4.0` -> `v0.5.3` | --- ### Release Notes
adrg/xdg (github.com/adrg/xdg) ### [`v0.5.3`](https://togithub.com/adrg/xdg/releases/tag/v0.5.3) [Compare Source](https://togithub.com/adrg/xdg/compare/v0.5.2...v0.5.3) ##### Changelog - Updated `xdg.SearchRuntimeFile` to also look in the operating system's temporary directory for runtime files. This covers unlikely cases in which runtime files cannot be written relative to the base runtime directory either because it does not exist or it is not accessible, so `xdg.RuntimeFile` suggests the operating system's temporary directory as a suitable fallback location. ##### Internal - Improved package testing. ### [`v0.5.2`](https://togithub.com/adrg/xdg/releases/tag/v0.5.2) [Compare Source](https://togithub.com/adrg/xdg/compare/v0.5.1...v0.5.2) ##### Changelog - Updated logic of `xdg.RuntimeFile`: due to the special nature of the `runtime directory`, the function no longer attempts to create it if it does not exist. If that's the case, the function uses the operating system's `temporary directory` as a fallback. The function still creates subdirectories relative to the base runtime directory or its fallback. Justification: the creation of the runtime directory is not in the scope of this package as it has special requirements defined by the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/latest). Relevant excerpt: > The lifetime of the directory MUST be bound to the user being logged in. It MUST be created when the user first logs in and if the user fully logs out the directory MUST be removed. If the user logs in more than once they should get pointed to the same directory, and it is mandatory that the directory continues to exist from their first login to their last logout on the system, and not removed in between. Files in the directory MUST not survive reboot or a full logout/login cycle. Also, on `Linux`, the parent directories of the default user runtime directory are owned by the root user so they cannot be created by a regular user. [pam_systemd](https://www.freedesktop.org/software/systemd/man/latest/pam_systemd.html) is usually responsible for creating the runtime directory (`/run/user/$UID`). ### [`v0.5.1`](https://togithub.com/adrg/xdg/releases/tag/v0.5.1) [Compare Source](https://togithub.com/adrg/xdg/compare/v0.5.0...v0.5.1) ##### Changelog - Added support for the non-standard `XDG_BIN_HOME` base directory. See [XDG base directories](https://togithub.com/adrg/xdg?tab=readme-ov-file#xdg-base-directory) README section for more details. - Added more config and data search locations on `macOS`. - Added `~/.config` at the end of the list of default locations for `XDG_CONFIG_DIRS`. - Added `~/.local/share` at the end of the list of default locations for `XDG_DATA_DIRS`. - Added more application search locations on `Windows`: - `%ProgramFiles%` - `%ProgramFiles%\Common Files` - `%LOCALAPPDATA%\Programs` - `%LOCALAPPDATA%\Programs\Common` ##### Internal - Updated `golang.org/x/sys` dependency to the latest version. - Improved package testing. ### [`v0.5.0`](https://togithub.com/adrg/xdg/releases/tag/v0.5.0) [Compare Source](https://togithub.com/adrg/xdg/compare/v0.4.0...v0.5.0) ##### Changelog - `user-dirs.dirs` config file is now parsed on Unix-like operating systems (except for macOS and Plan 9). See [XDG user directories](https://togithub.com/adrg/xdg?tab=readme-ov-file#xdg-user-directories) README section for more details. - Updated `golang.org/x/sys` dependency to the latest version. ##### Internal - Moved all path related functionality in internal `pathutil` package. - Added internal `userdirs` package: - Moved `xdg.UserDirectories` to `userdirs.Directories`. - Added parsing functions for `user-dirs.dirs` config file. - Improved package testing.
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- go.mod | 6 +++--- go.sum | 15 ++++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index a3147b4..4e353b6 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module github.com/cloudquery/cloudquery-api-go go 1.21.0 require ( - github.com/adrg/xdg v0.4.0 + github.com/adrg/xdg v0.5.3 github.com/hashicorp/go-retryablehttp v0.7.7 github.com/oapi-codegen/runtime v1.1.1 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 ) require ( @@ -16,7 +16,7 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.20.0 // indirect + golang.org/x/sys v0.26.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index f873a09..7435845 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= -github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= -github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= +github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78= +github.com/adrg/xdg v0.5.3/go.mod h1:nlTsY+NNiCBGCK2tpm09vRqfVzrc2fLmXGpBLF0zlTQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= @@ -34,15 +34,12 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From c5c30dbabb9facc50d2d0e06870c23b03bbefebf Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:23:11 +0200 Subject: [PATCH 249/343] fix(deps): Update module github.com/stretchr/testify to v1.10.0 (#260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/stretchr/testify](https://togithub.com/stretchr/testify) | require | minor | `v1.9.0` -> `v1.10.0` | --- ### Release Notes
stretchr/testify (github.com/stretchr/testify) ### [`v1.10.0`](https://togithub.com/stretchr/testify/releases/tag/v1.10.0) [Compare Source](https://togithub.com/stretchr/testify/compare/v1.9.0...v1.10.0) #### What's Changed ##### Functional Changes - Add PanicAssertionFunc by [@​fahimbagar](https://togithub.com/fahimbagar) in [https://github.com/stretchr/testify/pull/1337](https://togithub.com/stretchr/testify/pull/1337) - assert: deprecate CompareType by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1566](https://togithub.com/stretchr/testify/pull/1566) - assert: make YAML dependency pluggable via build tags by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1579](https://togithub.com/stretchr/testify/pull/1579) - assert: new assertion NotElementsMatch by [@​hendrywiranto](https://togithub.com/hendrywiranto) in [https://github.com/stretchr/testify/pull/1600](https://togithub.com/stretchr/testify/pull/1600) - mock: in order mock calls by [@​ReyOrtiz](https://togithub.com/ReyOrtiz) in [https://github.com/stretchr/testify/pull/1637](https://togithub.com/stretchr/testify/pull/1637) - Add assertion for NotErrorAs by [@​palsivertsen](https://togithub.com/palsivertsen) in [https://github.com/stretchr/testify/pull/1129](https://togithub.com/stretchr/testify/pull/1129) - Record Return Arguments of a Call by [@​jayd3e](https://togithub.com/jayd3e) in [https://github.com/stretchr/testify/pull/1636](https://togithub.com/stretchr/testify/pull/1636) - assert.EqualExportedValues: accepts everything by [@​redachl](https://togithub.com/redachl) in [https://github.com/stretchr/testify/pull/1586](https://togithub.com/stretchr/testify/pull/1586) ##### Fixes - assert: make tHelper a type alias by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1562](https://togithub.com/stretchr/testify/pull/1562) - Do not get argument again unnecessarily in Arguments.Error() by [@​TomWright](https://togithub.com/TomWright) in [https://github.com/stretchr/testify/pull/820](https://togithub.com/stretchr/testify/pull/820) - Fix time.Time compare by [@​myxo](https://togithub.com/myxo) in [https://github.com/stretchr/testify/pull/1582](https://togithub.com/stretchr/testify/pull/1582) - assert.Regexp: handle \[]byte array properly by [@​kevinburkesegment](https://togithub.com/kevinburkesegment) in [https://github.com/stretchr/testify/pull/1587](https://togithub.com/stretchr/testify/pull/1587) - assert: collect.FailNow() should not panic by [@​marshall-lee](https://togithub.com/marshall-lee) in [https://github.com/stretchr/testify/pull/1481](https://togithub.com/stretchr/testify/pull/1481) - mock: simplify implementation of FunctionalOptions by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1571](https://togithub.com/stretchr/testify/pull/1571) - mock: caller information for unexpected method call by [@​spirin](https://togithub.com/spirin) in [https://github.com/stretchr/testify/pull/1644](https://togithub.com/stretchr/testify/pull/1644) - suite: fix test failures by [@​stevenh](https://togithub.com/stevenh) in [https://github.com/stretchr/testify/pull/1421](https://togithub.com/stretchr/testify/pull/1421) - Fix issue [#​1662](https://togithub.com/stretchr/testify/issues/1662) (comparing infs should fail) by [@​ybrustin](https://togithub.com/ybrustin) in [https://github.com/stretchr/testify/pull/1663](https://togithub.com/stretchr/testify/pull/1663) - NotSame should fail if args are not pointers [#​1661](https://togithub.com/stretchr/testify/issues/1661) by [@​sikehish](https://togithub.com/sikehish) in [https://github.com/stretchr/testify/pull/1664](https://togithub.com/stretchr/testify/pull/1664) - Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in CI by [@​sikehish](https://togithub.com/sikehish) in [https://github.com/stretchr/testify/pull/1667](https://togithub.com/stretchr/testify/pull/1667) - fix: compare functional option names for indirect calls by [@​arjun-1](https://togithub.com/arjun-1) in [https://github.com/stretchr/testify/pull/1626](https://togithub.com/stretchr/testify/pull/1626) ##### Documantation, Build & CI - .gitignore: ignore "go test -c" binaries by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1565](https://togithub.com/stretchr/testify/pull/1565) - mock: improve doc by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1570](https://togithub.com/stretchr/testify/pull/1570) - mock: fix FunctionalOptions docs by [@​snirye](https://togithub.com/snirye) in [https://github.com/stretchr/testify/pull/1433](https://togithub.com/stretchr/testify/pull/1433) - README: link out to the excellent testifylint by [@​brackendawson](https://togithub.com/brackendawson) in [https://github.com/stretchr/testify/pull/1568](https://togithub.com/stretchr/testify/pull/1568) - assert: fix typo in comment by [@​JohnEndson](https://togithub.com/JohnEndson) in [https://github.com/stretchr/testify/pull/1580](https://togithub.com/stretchr/testify/pull/1580) - Correct the EventuallyWithT and EventuallyWithTf example by [@​JonCrowther](https://togithub.com/JonCrowther) in [https://github.com/stretchr/testify/pull/1588](https://togithub.com/stretchr/testify/pull/1588) - CI: bump softprops/action-gh-release from 1 to 2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/stretchr/testify/pull/1575](https://togithub.com/stretchr/testify/pull/1575) - mock: document more alternatives to deprecated AnythingOfTypeArgument by [@​dolmen](https://togithub.com/dolmen) in [https://github.com/stretchr/testify/pull/1569](https://togithub.com/stretchr/testify/pull/1569) - assert: Correctly document EqualValues behavior by [@​brackendawson](https://togithub.com/brackendawson) in [https://github.com/stretchr/testify/pull/1593](https://togithub.com/stretchr/testify/pull/1593) - fix: grammar in godoc by [@​miparnisari](https://togithub.com/miparnisari) in [https://github.com/stretchr/testify/pull/1607](https://togithub.com/stretchr/testify/pull/1607) - .github/workflows: Run tests for Go 1.22 by [@​HaraldNordgren](https://togithub.com/HaraldNordgren) in [https://github.com/stretchr/testify/pull/1629](https://togithub.com/stretchr/testify/pull/1629) - Document suite's lack of support for t.Parallel by [@​brackendawson](https://togithub.com/brackendawson) in [https://github.com/stretchr/testify/pull/1645](https://togithub.com/stretchr/testify/pull/1645) - assert: fix typos in comments by [@​alexandear](https://togithub.com/alexandear) in [https://github.com/stretchr/testify/pull/1650](https://togithub.com/stretchr/testify/pull/1650) - mock: fix doc comment for NotBefore by [@​alexandear](https://togithub.com/alexandear) in [https://github.com/stretchr/testify/pull/1651](https://togithub.com/stretchr/testify/pull/1651) - Generate better comments for require package by [@​Neokil](https://togithub.com/Neokil) in [https://github.com/stretchr/testify/pull/1610](https://togithub.com/stretchr/testify/pull/1610) - README: replace Testify V2 notice with [@​dolmen](https://togithub.com/dolmen)'s V2 manifesto by [@​hendrywiranto](https://togithub.com/hendrywiranto) in [https://github.com/stretchr/testify/pull/1518](https://togithub.com/stretchr/testify/pull/1518) #### New Contributors - [@​fahimbagar](https://togithub.com/fahimbagar) made their first contribution in [https://github.com/stretchr/testify/pull/1337](https://togithub.com/stretchr/testify/pull/1337) - [@​TomWright](https://togithub.com/TomWright) made their first contribution in [https://github.com/stretchr/testify/pull/820](https://togithub.com/stretchr/testify/pull/820) - [@​snirye](https://togithub.com/snirye) made their first contribution in [https://github.com/stretchr/testify/pull/1433](https://togithub.com/stretchr/testify/pull/1433) - [@​myxo](https://togithub.com/myxo) made their first contribution in [https://github.com/stretchr/testify/pull/1582](https://togithub.com/stretchr/testify/pull/1582) - [@​JohnEndson](https://togithub.com/JohnEndson) made their first contribution in [https://github.com/stretchr/testify/pull/1580](https://togithub.com/stretchr/testify/pull/1580) - [@​JonCrowther](https://togithub.com/JonCrowther) made their first contribution in [https://github.com/stretchr/testify/pull/1588](https://togithub.com/stretchr/testify/pull/1588) - [@​miparnisari](https://togithub.com/miparnisari) made their first contribution in [https://github.com/stretchr/testify/pull/1607](https://togithub.com/stretchr/testify/pull/1607) - [@​marshall-lee](https://togithub.com/marshall-lee) made their first contribution in [https://github.com/stretchr/testify/pull/1481](https://togithub.com/stretchr/testify/pull/1481) - [@​spirin](https://togithub.com/spirin) made their first contribution in [https://github.com/stretchr/testify/pull/1644](https://togithub.com/stretchr/testify/pull/1644) - [@​ReyOrtiz](https://togithub.com/ReyOrtiz) made their first contribution in [https://github.com/stretchr/testify/pull/1637](https://togithub.com/stretchr/testify/pull/1637) - [@​stevenh](https://togithub.com/stevenh) made their first contribution in [https://github.com/stretchr/testify/pull/1421](https://togithub.com/stretchr/testify/pull/1421) - [@​jayd3e](https://togithub.com/jayd3e) made their first contribution in [https://github.com/stretchr/testify/pull/1636](https://togithub.com/stretchr/testify/pull/1636) - [@​Neokil](https://togithub.com/Neokil) made their first contribution in [https://github.com/stretchr/testify/pull/1610](https://togithub.com/stretchr/testify/pull/1610) - [@​redachl](https://togithub.com/redachl) made their first contribution in [https://github.com/stretchr/testify/pull/1586](https://togithub.com/stretchr/testify/pull/1586) - [@​ybrustin](https://togithub.com/ybrustin) made their first contribution in [https://github.com/stretchr/testify/pull/1663](https://togithub.com/stretchr/testify/pull/1663) - [@​sikehish](https://togithub.com/sikehish) made their first contribution in [https://github.com/stretchr/testify/pull/1664](https://togithub.com/stretchr/testify/pull/1664) - [@​arjun-1](https://togithub.com/arjun-1) made their first contribution in [https://github.com/stretchr/testify/pull/1626](https://togithub.com/stretchr/testify/pull/1626) **Full Changelog**: https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4e353b6..7ed90dc 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/adrg/xdg v0.5.3 github.com/hashicorp/go-retryablehttp v0.7.7 github.com/oapi-codegen/runtime v1.1.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 ) require ( diff --git a/go.sum b/go.sum index 7435845..d228bcf 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 2962110be60ef6c0df4d99b42783e4f546508f71 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:09:02 +0200 Subject: [PATCH 250/343] chore(deps): Update actions/checkout action to v4 (#261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://togithub.com/actions/checkout) | action | major | `v3` -> `v4` | --- ### Release Notes
actions/checkout (actions/checkout) ### [`v4`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v422) [Compare Source](https://togithub.com/actions/checkout/compare/v3...v4) - `url-helper.ts` now leverages well-known environment variables by [@​jww3](https://togithub.com/jww3) in [https://github.com/actions/checkout/pull/1941](https://togithub.com/actions/checkout/pull/1941) - Expand unit test coverage for `isGhes` by [@​jww3](https://togithub.com/jww3) in [https://github.com/actions/checkout/pull/1946](https://togithub.com/actions/checkout/pull/1946)
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- .github/workflows/lint_golang.yml | 2 +- .github/workflows/unittest.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index eb78f90..ca04fde 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.GH_CQ_BOT }} diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index b60804f..3403b71 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 4a51cad..9eaeea0 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -17,7 +17,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go 1.x uses: actions/setup-go@v4 with: From b00fc8e043e876888304501df1a70e51975beb72 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:03:19 +0200 Subject: [PATCH 251/343] chore(deps): Update actions/setup-go action to v5 (#263) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-go](https://togithub.com/actions/setup-go) | action | major | `v4` -> `v5` | | [actions/setup-go](https://togithub.com/actions/setup-go) | action | major | `v3` -> `v5` | --- ### Release Notes
actions/setup-go (actions/setup-go) ### [`v5`](https://togithub.com/actions/setup-go/compare/v4...v5) [Compare Source](https://togithub.com/actions/setup-go/compare/v4...v5)
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- .github/workflows/lint_golang.yml | 2 +- .github/workflows/unittest.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index ca04fde..4029194 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -23,7 +23,7 @@ jobs: sudo rm -rf .generated - name: Set up Go 1.x - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version-file: go.mod diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 3403b71..712c030 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -14,7 +14,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version-file: go.mod - name: golangci-lint diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 9eaeea0..2dff847 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -19,7 +19,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v4 - name: Set up Go 1.x - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: go.mod - run: go mod download From 58466f4be45f01d7c4d0d4cdc28ec48c7bb722ac Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:07:31 +0200 Subject: [PATCH 252/343] chore(deps): Update actions/github-script action to v7 (#262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/github-script](https://togithub.com/actions/github-script) | action | major | `v6` -> `v7` | --- ### Release Notes
actions/github-script (actions/github-script) ### [`v7`](https://togithub.com/actions/github-script/compare/v6...v7) [Compare Source](https://togithub.com/actions/github-script/compare/v6...v7)
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/release-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index cb02b05..e91c772 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -32,7 +32,7 @@ jobs: with: prerelease: true - name: Trigger Renovate - uses: actions/github-script@v6 + uses: actions/github-script@v7 if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == '' with: github-token: ${{ secrets.GH_CQ_BOT }} From 27b15b073f8bb564fd92bcb30e772dcc16915d37 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:12:16 +0200 Subject: [PATCH 253/343] chore(deps): Update golangci/golangci-lint-action action to v6 (#264) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [golangci/golangci-lint-action](https://togithub.com/golangci/golangci-lint-action) | action | major | `v3` -> `v6` | --- ### Release Notes
golangci/golangci-lint-action (golangci/golangci-lint-action) ### [`v6`](https://togithub.com/golangci/golangci-lint-action/compare/v5...v6) [Compare Source](https://togithub.com/golangci/golangci-lint-action/compare/v5...v6) ### [`v5`](https://togithub.com/golangci/golangci-lint-action/compare/v4...v5) [Compare Source](https://togithub.com/golangci/golangci-lint-action/compare/v4...v5) ### [`v4`](https://togithub.com/golangci/golangci-lint-action/compare/v3...v4) [Compare Source](https://togithub.com/golangci/golangci-lint-action/compare/v3...v4)
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 712c030..318f89f 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -18,6 +18,6 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: v1.62.2 From 6fee43412a25b1e187282284cd99dd8042a07748 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:15:02 +0200 Subject: [PATCH 254/343] chore(deps): Update peter-evans/create-pull-request action to v7 (#266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [peter-evans/create-pull-request](https://togithub.com/peter-evans/create-pull-request) | action | major | `v5` -> `v7` | --- ### Release Notes
peter-evans/create-pull-request (peter-evans/create-pull-request) ### [`v7`](https://togithub.com/peter-evans/create-pull-request/compare/v6...v7) [Compare Source](https://togithub.com/peter-evans/create-pull-request/compare/v6...v7) ### [`v6`](https://togithub.com/peter-evans/create-pull-request/compare/v5...v6) [Compare Source](https://togithub.com/peter-evans/create-pull-request/compare/v5...v6)
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 4029194..3f2959a 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -32,7 +32,7 @@ jobs: go generate ./... - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v7 with: # required so the PR triggers workflow runs token: ${{ secrets.GH_CQ_BOT }} From 810f9952bf2cb119af54062ae75dbc510582dbdc Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:26:11 +0200 Subject: [PATCH 255/343] chore(deps): Update googleapis/release-please-action action to v4 (#265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [googleapis/release-please-action](https://togithub.com/googleapis/release-please-action) | action | major | `v3` -> `v4` | --- ### Release Notes
googleapis/release-please-action (googleapis/release-please-action) ### [`v4`](https://togithub.com/googleapis/release-please-action/compare/v3...v4) [Compare Source](https://togithub.com/googleapis/release-please-action/compare/v3...v4)
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/release-pr.yml | 5 +---- .release-please-manifest.json | 3 +++ release-please-config.json | 9 +++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index e91c772..db3a020 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -10,13 +10,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: googleapis/release-please-action@v3 + - uses: googleapis/release-please-action@v4 id: release with: - release-type: go - package-name: cloudquery-api-go token: ${{ secrets.GH_CQ_BOT }} - pull-request-title-pattern: "chore${scope}: Release${component} v${version}" - name: Parse semver string if: steps.release.outputs.release_created id: semver_parser diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..047ded5 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.13.4" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..73cc92d --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "go", + "pull-request-title-pattern": "chore${scope}: Release${component} v${version}", + "include-component-in-tag": false, + "packages": { + ".": {} + } +} From 89f4cefa15bed372e08277a7232aa802d4e97db4 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Thu, 19 Dec 2024 10:24:58 +0000 Subject: [PATCH 256/343] fix: Trim API token on read to avoid accidental line break issues (#269) This should help when someone adds a line break at the end of the token accidentally --- auth/token.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/token.go b/auth/token.go index 6276ad0..929810d 100644 --- a/auth/token.go +++ b/auth/token.go @@ -73,7 +73,9 @@ func NewTokenClient() *TokenClient { func (tc *TokenClient) GetToken() (Token, error) { tokenType := tc.GetTokenType() if tokenType != BearerToken { - return Token{Type: tokenType, Value: os.Getenv(EnvVarCloudQueryAPIKey)}, nil + tokenFromEnv := os.Getenv(EnvVarCloudQueryAPIKey) + trimmedToken := strings.TrimSpace(tokenFromEnv) + return Token{Type: tokenType, Value: trimmedToken}, nil } // If the token is not expired, return it From 95ec6d4dc4d9fe0d52f2d8cec08fe09d98d713e9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:27:09 +0200 Subject: [PATCH 257/343] chore(main): Release v1.13.5 (#268) :robot: I have created a release *beep* *boop* --- ## [1.13.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.4...v1.13.5) (2024-12-19) ### Bug Fixes * **deps:** Update module github.com/adrg/xdg to v0.5.3 ([#259](https://github.com/cloudquery/cloudquery-api-go/issues/259)) ([9c97ad9](https://github.com/cloudquery/cloudquery-api-go/commit/9c97ad9edca9906f86bd717fbf5ad9d2a1bf9dc2)) * **deps:** Update module github.com/stretchr/testify to v1.10.0 ([#260](https://github.com/cloudquery/cloudquery-api-go/issues/260)) ([c5c30db](https://github.com/cloudquery/cloudquery-api-go/commit/c5c30dbabb9facc50d2d0e06870c23b03bbefebf)) * Trim API token on read to avoid accidental line break issues ([#269](https://github.com/cloudquery/cloudquery-api-go/issues/269)) ([89f4cef](https://github.com/cloudquery/cloudquery-api-go/commit/89f4cefa15bed372e08277a7232aa802d4e97db4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 047ded5..c66a606 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.4" + ".": "1.13.5" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6462ecd..34a2495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.13.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.4...v1.13.5) (2024-12-19) + + +### Bug Fixes + +* **deps:** Update module github.com/adrg/xdg to v0.5.3 ([#259](https://github.com/cloudquery/cloudquery-api-go/issues/259)) ([9c97ad9](https://github.com/cloudquery/cloudquery-api-go/commit/9c97ad9edca9906f86bd717fbf5ad9d2a1bf9dc2)) +* **deps:** Update module github.com/stretchr/testify to v1.10.0 ([#260](https://github.com/cloudquery/cloudquery-api-go/issues/260)) ([c5c30db](https://github.com/cloudquery/cloudquery-api-go/commit/c5c30dbabb9facc50d2d0e06870c23b03bbefebf)) +* Trim API token on read to avoid accidental line break issues ([#269](https://github.com/cloudquery/cloudquery-api-go/issues/269)) ([89f4cef](https://github.com/cloudquery/cloudquery-api-go/commit/89f4cefa15bed372e08277a7232aa802d4e97db4)) + ## [1.13.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.3...v1.13.4) (2024-12-02) From 07a9517fa618d6eeb5d54af94a7ce4b1b11ba8d2 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Fri, 10 Jan 2025 08:45:17 +0000 Subject: [PATCH 258/343] chore: Update gen-api workflow (#271) The spec file was moved --- .github/workflows/gen-client.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 3f2959a..dfba209 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -14,7 +14,7 @@ jobs: - name: Get Specs File run: | - curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/internal/servergen/spec.json -o spec.json + curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/cloud/internal/servergen/spec.json -o spec.json - name: Format Specs File run: | From bd116767eeb57d996f36590b1d698f457467cb7d Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Tue, 28 Jan 2025 17:33:06 +0000 Subject: [PATCH 259/343] chore: Update CODEOWNERS (#272) --- CODEOWNERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index f97b2a9..b83f256 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1,3 @@ -* @cloudquery/cloudquery-framework - +* @cloudquery/integrations-backend go.mod go.sum From fb0665eaec370312bd0ba79103737e19ee9ce604 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Sat, 1 Feb 2025 00:46:13 +0000 Subject: [PATCH 260/343] chore(deps): Update dependency golangci/golangci-lint to v1.63.4 (#273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | minor | `v1.62.2` -> `v1.63.4` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v1.63.4`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1634) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.63.3...v1.63.4) 1. Linters bug fixes - `dupl`, `gomodguard`, `revive`: keep only Go-files. ### [`v1.63.3`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1633) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.63.2...v1.63.3) 1. Linters bug fixes - `gofmt`, `gofumpt`, `goimports`, `gci`: panic with several trailing EOL - `goheader`: skip issues with invalid positions ### [`v1.63.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1632) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.63.1...v1.63.2) 1. Linters bug fixes - `gofmt`, `gofumpt`, `goimports`, `gci`: panic with missing trailing EOL ### [`v1.63.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1631) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.63.0...v1.63.1) 1. Linters bug fixes - `cgi`: invalid reports with cgo - `gofumpt`: panic with autofix and cgo ### [`v1.63.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1630) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.62.2...v1.63.0) 1. Enhancements - Add support for SuggestedFixes 🎉 (35 linters can "autofix" reports). - Formatters (`gofmt`, `goimports`, `gofumpt`, `gci`) are applied after the suggested fixes. 2. New linters - Add `exptostd` linter https://github.com/ldez/exptostd - Add `nilnesserr` linter https://github.com/alingse/nilnesserr - Add `usetesting` linter https://github.com/ldez/usetesting 3. Linters new features - `gci`: new options: `no-inline-comments`, `no-prefix-comments` - `gomoddirectives`: from 0.2.4 to 0.6.0 (new options: `go-version-pattern`, `toolchain-pattern`,`toolchain-forbidden`, `tool-forbidden`, `go-debug-forbidden`) - `govet`: new `stdversion`, `waitgroup` analyzers - `importas`: allow multiple empty aliases - `loggercheck`: new `slog` option - `recvcheck`: from 0.1.2 to 0.2.0 (new options: `disable-builtin`, `exclusions`) - `tagliatelle`: from 0.5.0 to 0.7.1 (new options: `ignored-fields`, `extended-rules`,`overrides`, `pkg`, `ignore`) - `usestdlibvars`: from 1.27.0 to 1.28.0 (autofix) - `wrapcheck`: from 2.9.0 to 2.10.0 (new option: `extra-ignore-sigs`) 4. Linters bug fixes - `asciicheck`: from 0.2.0 to 0.3.0 - `bodyclose`: from [`5742072`](https://togithub.com/golangci/golangci-lint/commit/574207250966) to [`ed6a65f`](https://togithub.com/golangci/golangci-lint/commit/ed6a65f985e) - `funlen`: from 0.1.0 to 0.2.0 - `ginkgolinter`: from 0.18.3 to 0.18.4 - `gochecksumtype`: from 0.2.0 to 0.3.1 - `gocognit`: from 1.1.3 to 1.2.0 - `godot`: from 1.4.18 to 1.4.20 - `goheader`: report position improvement - `gosec`: handling of global nosec option when it is false - `iface`: from 1.2.1 to 1.3.0 - `importas`: from 0.1.0 to 0.2.0 - `intrange`: from 0.2.1 to 0.3.0 - `makezero`: from 1.1.1 to 1.2.0 - `mirror`: from 1.2.0 to 1.3.0 - `nilnil`: from 1.0.0 to 1.0.1 - `nosprintfhostport`: from 0.1.1 to 0.2.0 - `reassign`: from 0.2.0 to 0.3.0 - `spancheck`: from 0.6.2 to 0.6.4 - `tagalign`: from 1.3.4 to 1.4.1 - `wastedassign`: from 2.0.7 to 2.1.0 - `whitespace`: from 0.1.1 to 0.2.0 - `wsl`: from 4.4.1 to 4.5.0 5. Deprecations - ⚠️ `output.uniq-by-line` is deprecated and replaced by `issues.uniq-by-line`. 6. Misc. - Improvements of the help command (color and JSON support). - Removes `decoder`, `sloglint`, `tagalin` from `format` preset. - Enables paths with junction inside Windows. - The timeout is disabled if `run.timeout` <= 0.
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 318f89f..1953db2 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.62.2 + version: v1.63.4 From aeebd1d47e505f6fb09f57c08c41cbca4a71a7b0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 20 Feb 2025 17:29:15 +0000 Subject: [PATCH 261/343] fix: Generate CloudQuery Go API Client from `spec.json` (#274) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 24 ++++++++++++++++++++++++ models.gen.go | 4 ++++ spec.json | 20 ++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/client.gen.go b/client.gen.go index 06ffe79..9d88852 100644 --- a/client.gen.go +++ b/client.gen.go @@ -4861,6 +4861,22 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P } + if params.VersionFilter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version_filter", runtime.ParamLocationQuery, *params.VersionFilter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -13083,6 +13099,7 @@ type ListPluginVersionsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ListPluginVersions200Response + JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden JSON404 *NotFound @@ -19637,6 +19654,13 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index eec83ce..9407a60 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2958,6 +2958,9 @@ type VerifyUserEmailRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// VersionFilter A version filter in semantic version format with prefix ranges. +type VersionFilter = string + // VersionName The version in semantic version format. type VersionName = string @@ -3120,6 +3123,7 @@ type ListPluginVersionsParams struct { // IncludePrereleases Whether to include prerelease versions IncludePrereleases *IncludePrereleases `form:"include_prereleases,omitempty" json:"include_prereleases,omitempty"` + VersionFilter *VersionFilter `form:"version_filter,omitempty" json:"version_filter,omitempty"` } // ListPluginVersionsParamsSortBy defines parameters for ListPluginVersions. diff --git a/spec.json b/spec.json index 3a14bde..b1c9040 100644 --- a/spec.json +++ b/spec.json @@ -608,6 +608,8 @@ "$ref" : "#/components/parameters/include_drafts" }, { "$ref" : "#/components/parameters/include_prereleases" + }, { + "$ref" : "#/components/parameters/version_filter" } ], "responses" : { "200" : { @@ -620,6 +622,9 @@ }, "description" : "Response" }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, @@ -6619,6 +6624,16 @@ }, "style" : "form" }, + "version_filter" : { + "explode" : true, + "in" : "query", + "name" : "version_filter", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/VersionFilter" + }, + "style" : "form" + }, "version_name" : { "explode" : false, "in" : "path", @@ -7451,6 +7466,11 @@ "required" : [ "effective_from", "free_rows_per_month", "usd_per_row" ], "title" : "CloudQuery Plugin Price Create" }, + "VersionFilter" : { + "description" : "A version filter in semantic version format with prefix ranges.", + "pattern" : "^[^~]?v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", + "type" : "string" + }, "PluginProtocols" : { "description" : "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", "items" : { From 040690319106ba9d245a2052fc7ccea794ce426d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:29:33 +0000 Subject: [PATCH 262/343] fix: Generate CloudQuery Go API Client from `spec.json` (#276) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 3 ++ spec.json | 31 +++++++++++++ 3 files changed, 152 insertions(+) diff --git a/client.gen.go b/client.gen.go index 9d88852..aa24139 100644 --- a/client.gen.go +++ b/client.gen.go @@ -153,6 +153,9 @@ type ClientInterface interface { RenewPlatformActivation(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetPlatformFlags request + GetPlatformFlags(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginNotificationRequests request ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -937,6 +940,18 @@ func (c *Client) RenewPlatformActivation(ctx context.Context, body RenewPlatform return c.Client.Do(req) } +func (c *Client) GetPlatformFlags(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPlatformFlagsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginNotificationRequestsRequest(c.Server, params) if err != nil { @@ -4102,6 +4117,33 @@ func NewRenewPlatformActivationRequestWithBody(server string, contentType string return req, nil } +// NewGetPlatformFlagsRequest generates requests for GetPlatformFlags +func NewGetPlatformFlagsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/platform/flags") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { var err error @@ -11862,6 +11904,9 @@ type ClientWithResponsesInterface interface { RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) + // GetPlatformFlagsWithResponse request + GetPlatformFlagsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPlatformFlagsResponse, error) + // ListPluginNotificationRequestsWithResponse request ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) @@ -12788,6 +12833,30 @@ func (r RenewPlatformActivationResponse) StatusCode() int { return 0 } +type GetPlatformFlagsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PlatformFlags + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPlatformFlagsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPlatformFlagsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginNotificationRequestsResponse struct { Body []byte HTTPResponse *http.Response @@ -16564,6 +16633,15 @@ func (c *ClientWithResponses) RenewPlatformActivationWithResponse(ctx context.Co return ParseRenewPlatformActivationResponse(rsp) } +// GetPlatformFlagsWithResponse request returning *GetPlatformFlagsResponse +func (c *ClientWithResponses) GetPlatformFlagsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPlatformFlagsResponse, error) { + rsp, err := c.GetPlatformFlags(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPlatformFlagsResponse(rsp) +} + // ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) @@ -19020,6 +19098,46 @@ func ParseRenewPlatformActivationResponse(rsp *http.Response) (*RenewPlatformAct return response, nil } +// ParseGetPlatformFlagsResponse parses an HTTP response from a GetPlatformFlagsWithResponse call +func ParseGetPlatformFlagsResponse(rsp *http.Response) (*GetPlatformFlagsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPlatformFlagsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PlatformFlags + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 9407a60..b522dea 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1375,6 +1375,9 @@ type MembershipWithUser struct { User User `json:"user"` } +// PlatformFlags A map of feature flags for the Platform +type PlatformFlags = map[string]interface{} + // Plugin CloudQuery Plugin type Plugin struct { // Category Supported categories for plugins diff --git a/spec.json b/spec.json index b1c9040..34b26fc 100644 --- a/spec.json +++ b/spec.json @@ -6505,6 +6505,32 @@ "tags" : [ "platform" ], "x-internal" : true } + }, + "/platform/flags" : { + "get" : { + "description" : "Get platform feature flags", + "operationId" : "GetPlatformFlags", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PlatformFlags" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "platform" ] + } } }, "components" : { @@ -10298,6 +10324,11 @@ }, "required" : [ "base_url", "return_url" ] }, + "PlatformFlags" : { + "additionalProperties" : false, + "description" : "A map of feature flags for the Platform", + "type" : "object" + }, "UploadImage_request" : { "properties" : { "content_type" : { From 804769b7a682b3e1155151eae3a45372330df4bf Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Sat, 1 Mar 2025 02:46:54 +0200 Subject: [PATCH 263/343] chore(deps): Update dependency golangci/golangci-lint to v1.64.5 (#277) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v1.63.4` -> `v1.64.5` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v1.64.5`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1645) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.4...v1.64.5) 1. Bug fixes - Add missing flag `new-from-merge-base-flag` 2. Linters bug fixes - `asciicheck`: from 0.3.0 to 0.4.0 - `forcetypeassert`: from 0.1.0 to 0.2.0 - `gosec`: from 2.22.0 to 2.22.1 ### [`v1.64.4`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1644) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.3...v1.64.4) 1. Linters bug fixes - `gci`: fix standard packages list for go1.24 ### [`v1.64.3`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1643) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.2...v1.64.3) 1. Linters bug fixes - `ginkgolinter`: from 0.18.4 to 0.19.0 - `go-critic`: from 0.11.5 to 0.12.0 - `revive`: from 1.6.0 to 1.6.1 - `gci`: fix standard packages list for go1.24 2. Misc. - Build Docker images with go1.24 ### [`v1.64.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1642) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.63.4...v1.64.2) This is the last minor release of golangci-lint v1. The next release will be golangci-lint [v2](https://redirect.github.com/golangci/golangci-lint/issues/5300). 1. Enhancements - 🎉 go1.24 support - New `issues.new-from-merge-base` option - New `run.relative-path-mode` option 2. Linters new features - `copyloopvar`: from 1.1.0 to 1.2.1 (support suggested fixes) - `exptostd`: from 0.3.1 to 0.4.1 (handles `golang.org/x/exp/constraints.Ordered`) - `fatcontext`: from 0.5.3 to 0.7.1 (new option: `check-struct-pointers`) - `perfsprint`: from 0.7.1 to 0.8.1 (new options: `integer-format`, `error-format`, `string-format`, `bool-format`, and `hex-format`) - `revive`: from 1.5.1 to 1.6.0 (new rules: `redundant-build-tag`, `use-errors-new`. New option `early-return.early-return`) 3. Linters bug fixes - `go-errorlint`: from 1.7.0 to 1.7.1 - `gochecknoglobals`: from 0.2.1 to 0.2.2 - `godox`: from [`006bad1`](https://redirect.github.com/golangci/golangci-lint/commit/006bad1f9d26) to 1.1.0 - `gosec`: from 2.21.4 to 2.22.0 - `iface`: from 1.3.0 to 1.3.1 - `nilnesserr`: from 0.1.1 to 0.1.2 - `protogetter`: from 0.3.8 to 0.3.9 - `sloglint`: from 0.7.2 to 0.9.0 - `spancheck`: fix default `StartSpanMatchersSlice` values - `staticcheck`: from 0.5.1 to 0.6.0 4. Deprecations - ⚠️ `tenv` is deprecated and replaced by `usetesting.os-setenv: true`. 5. Misc. - Sanitize severities by output format - Avoid panic with plugin without description 6. Documentation - Clarify `depguard` configuration
--- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 1 * *" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 1953db2..c80db5e 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.63.4 + version: v1.64.5 From 8366121059d82769a6891b535be03095ee3f511f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 5 Mar 2025 12:54:55 +0200 Subject: [PATCH 264/343] chore(main): Release v1.13.6 (#275) :robot: I have created a release *beep* *boop* --- ## [1.13.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.5...v1.13.6) (2025-03-01) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#274](https://github.com/cloudquery/cloudquery-api-go/issues/274)) ([aeebd1d](https://github.com/cloudquery/cloudquery-api-go/commit/aeebd1d47e505f6fb09f57c08c41cbca4a71a7b0)) * Generate CloudQuery Go API Client from `spec.json` ([#276](https://github.com/cloudquery/cloudquery-api-go/issues/276)) ([0406903](https://github.com/cloudquery/cloudquery-api-go/commit/040690319106ba9d245a2052fc7ccea794ce426d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c66a606..3c0ca03 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.5" + ".": "1.13.6" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 34a2495..4ebf825 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.13.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.5...v1.13.6) (2025-03-01) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#274](https://github.com/cloudquery/cloudquery-api-go/issues/274)) ([aeebd1d](https://github.com/cloudquery/cloudquery-api-go/commit/aeebd1d47e505f6fb09f57c08c41cbca4a71a7b0)) +* Generate CloudQuery Go API Client from `spec.json` ([#276](https://github.com/cloudquery/cloudquery-api-go/issues/276)) ([0406903](https://github.com/cloudquery/cloudquery-api-go/commit/040690319106ba9d245a2052fc7ccea794ce426d)) + ## [1.13.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.4...v1.13.5) (2024-12-19) From 71cb41f0d429ce06872fd1f7554eef5f887bb565 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 6 Mar 2025 16:35:44 +0200 Subject: [PATCH 265/343] fix: Generate CloudQuery Go API Client from `spec.json` (#278) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 32 ++++++++++++++++++++++++++++++++ models.gen.go | 14 ++++++++++++++ spec.json | 47 +++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 87 insertions(+), 6 deletions(-) diff --git a/client.gen.go b/client.gen.go index aa24139..4ea6468 100644 --- a/client.gen.go +++ b/client.gen.go @@ -4415,6 +4415,38 @@ func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Requ } + if params.IncludeReleaseStages != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_release_stages", runtime.ParamLocationQuery, *params.IncludeReleaseStages); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExcludeReleaseStages != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "exclude_release_stages", runtime.ParamLocationQuery, *params.ExcludeReleaseStages); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } diff --git a/models.gen.go b/models.gen.go index b522dea..522d135 100644 --- a/models.gen.go +++ b/models.gen.go @@ -133,6 +133,7 @@ const ( // Defines values for PluginReleaseStage. const ( PluginReleaseStageComingSoon PluginReleaseStage = "coming-soon" + PluginReleaseStageDeprecated PluginReleaseStage = "deprecated" PluginReleaseStageGa PluginReleaseStage = "ga" PluginReleaseStagePreview PluginReleaseStage = "preview" ) @@ -147,6 +148,7 @@ const ( // Defines values for PluginReleaseStageUpdate. const ( PluginReleaseStageUpdateComingSoon PluginReleaseStageUpdate = "coming-soon" + PluginReleaseStageUpdateDeprecated PluginReleaseStageUpdate = "deprecated" PluginReleaseStageUpdateGa PluginReleaseStageUpdate = "ga" PluginReleaseStageUpdatePreview PluginReleaseStageUpdate = "preview" ) @@ -2991,6 +2993,12 @@ type Page = int64 // PerPage defines model for per_page. type PerPage = int64 +// PluginExcludeReleaseStages defines model for plugin_exclude_release_stages. +type PluginExcludeReleaseStages = []PluginReleaseStage + +// PluginIncludeReleaseStages defines model for plugin_include_release_stages. +type PluginIncludeReleaseStages = []PluginReleaseStage + // PluginSortBy defines model for plugin_sort_by. type PluginSortBy string @@ -3105,6 +3113,12 @@ type ListPluginsParams struct { // PerPage The number of results per page (max 1000). PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludeReleaseStages Include these release stages in the response + IncludeReleaseStages *PluginIncludeReleaseStages `form:"include_release_stages,omitempty" json:"include_release_stages,omitempty"` + + // ExcludeReleaseStages Exclude these release stages from the response + ExcludeReleaseStages *PluginExcludeReleaseStages `form:"exclude_release_stages,omitempty" json:"exclude_release_stages,omitempty"` } // ListPluginsParamsSortBy defines parameters for ListPlugins. diff --git a/spec.json b/spec.json index 34b26fc..871fc77 100644 --- a/spec.json +++ b/spec.json @@ -290,6 +290,10 @@ "$ref" : "#/components/parameters/page" }, { "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/plugin_include_release_stages" + }, { + "$ref" : "#/components/parameters/plugin_exclude_release_stages" } ], "responses" : { "200" : { @@ -6606,6 +6610,37 @@ }, "style" : "form" }, + "plugin_include_release_stages" : { + "allowEmptyValue" : true, + "description" : "Include these release stages in the response", + "explode" : true, + "in" : "query", + "name" : "include_release_stages", + "required" : false, + "schema" : { + "items" : { + "$ref" : "#/components/schemas/PluginReleaseStage" + }, + "type" : "array" + }, + "style" : "form" + }, + "plugin_exclude_release_stages" : { + "allowEmptyValue" : true, + "description" : "Exclude these release stages from the response", + "explode" : true, + "in" : "query", + "name" : "exclude_release_stages", + "required" : false, + "schema" : { + "default" : [ "deprecated" ], + "items" : { + "$ref" : "#/components/schemas/PluginReleaseStage" + }, + "type" : "array" + }, + "style" : "form" + }, "team_name" : { "explode" : false, "in" : "path", @@ -7153,6 +7188,11 @@ } } ] }, + "PluginReleaseStage" : { + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], + "type" : "string" + }, "PluginCategory" : { "description" : "Supported categories for plugins", "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "finance", "customer-support", "other" ], @@ -7163,11 +7203,6 @@ "enum" : [ "api", "database", "free" ], "type" : "string" }, - "PluginReleaseStage" : { - "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "enum" : [ "coming-soon", "preview", "ga" ], - "type" : "string" - }, "PluginTier" : { "deprecated" : true, "description" : "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", @@ -7365,7 +7400,7 @@ }, "PluginReleaseStageUpdate" : { "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "enum" : [ "coming-soon", "preview", "ga" ], + "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], "type" : "string" }, "PluginUpdate" : { From bd0afda36b76b447b8d80261923c17e98f849fdc Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 13 Mar 2025 22:55:34 +0200 Subject: [PATCH 266/343] fix: Generate CloudQuery Go API Client from `spec.json` (#280) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ++++++ spec.json | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/models.gen.go b/models.gen.go index 522d135..2f1dfbe 100644 --- a/models.gen.go +++ b/models.gen.go @@ -887,6 +887,12 @@ type CreateSyncRunProgressRequest struct { // Rows Number of rows synced so far Rows int64 `json:"rows"` + // ShardNum The shard number that this progress update is for + ShardNum *int32 `json:"shard_num,omitempty"` + + // ShardTotal The total number of shards for this sync run + ShardTotal *int32 `json:"shard_total,omitempty"` + // Status The status of the sync run Status *SyncRunStatus `json:"status,omitempty"` diff --git a/spec.json b/spec.json index 871fc77..3ab7aa7 100644 --- a/spec.json +++ b/spec.json @@ -11239,6 +11239,16 @@ }, "status" : { "$ref" : "#/components/schemas/SyncRunStatus" + }, + "shard_num" : { + "description" : "The shard number that this progress update is for", + "format" : "int32", + "type" : "integer" + }, + "shard_total" : { + "description" : "The total number of shards for this sync run", + "format" : "int32", + "type" : "integer" } }, "required" : [ "errors", "rows", "warnings" ] From a791fb67cc5964d8b8bde0d34f2cf22f2c7c147e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:57:21 +0200 Subject: [PATCH 267/343] chore(main): Release v1.13.7 (#279) :robot: I have created a release *beep* *boop* --- ## [1.13.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.6...v1.13.7) (2025-03-13) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#278](https://github.com/cloudquery/cloudquery-api-go/issues/278)) ([71cb41f](https://github.com/cloudquery/cloudquery-api-go/commit/71cb41f0d429ce06872fd1f7554eef5f887bb565)) * Generate CloudQuery Go API Client from `spec.json` ([#280](https://github.com/cloudquery/cloudquery-api-go/issues/280)) ([bd0afda](https://github.com/cloudquery/cloudquery-api-go/commit/bd0afda36b76b447b8d80261923c17e98f849fdc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3c0ca03..9f81cbe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.6" + ".": "1.13.7" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebf825..921ccb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.13.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.6...v1.13.7) (2025-03-13) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#278](https://github.com/cloudquery/cloudquery-api-go/issues/278)) ([71cb41f](https://github.com/cloudquery/cloudquery-api-go/commit/71cb41f0d429ce06872fd1f7554eef5f887bb565)) +* Generate CloudQuery Go API Client from `spec.json` ([#280](https://github.com/cloudquery/cloudquery-api-go/issues/280)) ([bd0afda](https://github.com/cloudquery/cloudquery-api-go/commit/bd0afda36b76b447b8d80261923c17e98f849fdc)) + ## [1.13.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.5...v1.13.6) (2025-03-01) From 1b3bb9f4af55e68487f0855f047fa3b688e28349 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 31 Mar 2025 13:10:17 +0100 Subject: [PATCH 268/343] fix: Generate CloudQuery Go API Client from `spec.json` (#281) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/models.gen.go b/models.gen.go index 2f1dfbe..e3cd489 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2854,6 +2854,9 @@ type UsageCurrent struct { // UsageIncrease Increase the usage of a plugin. This can incur billing costs and should be used only by plugins. type UsageIncrease struct { + // InstallationID Installation ID associated with the platform, for platform syncs. + InstallationID *string `json:"installation_id,omitempty"` + // PluginKind The kind of plugin, ie. source or destination. PluginKind PluginKind `json:"plugin_kind"` diff --git a/spec.json b/spec.json index 3ab7aa7..e394166 100644 --- a/spec.json +++ b/spec.json @@ -8752,6 +8752,12 @@ "example" : "123e4567-e89b-12d3-a456-426614174000", "format" : "uuid", "type" : "string" + }, + "installation_id" : { + "description" : "Installation ID associated with the platform, for platform syncs.", + "pattern" : "^[a-z0-9]{64}$", + "type" : "string", + "x-go-name" : "InstallationID" } }, "required" : [ "plugin_kind", "plugin_name", "plugin_team", "request_id", "rows" ], From c59f3537f59908587438babfe0a5588e2e0cece0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 31 Mar 2025 13:13:01 +0100 Subject: [PATCH 269/343] chore(main): Release v1.13.8 (#282) :robot: I have created a release *beep* *boop* --- ## [1.13.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.7...v1.13.8) (2025-03-31) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#281](https://github.com/cloudquery/cloudquery-api-go/issues/281)) ([1b3bb9f](https://github.com/cloudquery/cloudquery-api-go/commit/1b3bb9f4af55e68487f0855f047fa3b688e28349)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9f81cbe..57a2a35 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.7" + ".": "1.13.8" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 921ccb8..d9d592e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.13.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.7...v1.13.8) (2025-03-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#281](https://github.com/cloudquery/cloudquery-api-go/issues/281)) ([1b3bb9f](https://github.com/cloudquery/cloudquery-api-go/commit/1b3bb9f4af55e68487f0855f047fa3b688e28349)) + ## [1.13.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.6...v1.13.7) (2025-03-13) From adeaadbeb92013d2de8bf5f72e446585e091b624 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 1 Apr 2025 03:50:10 +0100 Subject: [PATCH 270/343] chore(deps): Update dependency golangci/golangci-lint to v1.64.8 (#283) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | patch | `v1.64.5` -> `v1.64.8` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v1.64.8`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1648) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.7...v1.64.8) - Detects use of configuration files from golangci-lint v2 ### [`v1.64.7`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1647) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.6...v1.64.7) 1. Linters bug fixes - `depguard`: from 2.2.0 to 2.2.1 - `dupl`: from [`3e9179a`](https://redirect.github.com/golangci/golangci-lint/commit/3e9179ac440a) to [`f665c8d`](https://redirect.github.com/golangci/golangci-lint/commit/f665c8d69b32) - `gosec`: from 2.22.1 to 2.22.2 - `staticcheck`: from 0.6.0 to 0.6.1 2. Documentation - Add GitLab documentation ### [`v1.64.6`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1646) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.5...v1.64.6) 1. Linters bug fixes - `asciicheck`: from 0.4.0 to 0.4.1 - `contextcheck`: from 1.1.5 to 1.1.6 - `errcheck`: from 1.8.0 to 1.9.0 - `exptostd`: from 0.4.1 to 0.4.2 - `ginkgolinter`: from 0.19.0 to 0.19.1 - `go-exhaustruct`: from 3.3.0 to 3.3.1 - `gocheckcompilerdirectives`: from 1.2.1 to 1.3.0 - `godot`: from 1.4.20 to 1.5.0 - `perfsprint`: from 0.8.1 to 0.8.2 - `revive`: from 1.6.1 to 1.7.0 - `tagalign`: from 1.4.1 to 1.4.2
--- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 1 * *" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index c80db5e..ca78388 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.64.5 + version: v1.64.8 From 6320a2ac2da4d4a26ebe974721bb1dfcfa1f02b4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 1 Apr 2025 11:52:01 +0100 Subject: [PATCH 271/343] chore(deps): Update dependency golangci/golangci-lint to v2 (#284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | Pending | |---|---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | major | `v1.64.8` -> `v2.0.1` | `v2.0.2` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.0.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v201) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.0...v2.0.1) 1. Linters/formatters bug fixes - `golines`: fix settings during linter load 2. Misc. - Validates the `version` field before the configuration - `forbidigo`: fix migration ### [`v2.0.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v200) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v1.64.8...v2.0.0) 1. Enhancements - 🌟 New `golangci-lint fmt` command with dedicated [formatter configuration](https://golangci-lint.run/welcome/quick-start/#formatting) - ♻️ New `golangci-lint migrate` command to help migration from v1 to v2 (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#command-migrate)) - ⚠️ New default values (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - ⚠️ No exclusions by default (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#issuesexclude-use-default)) - ⚠️ New default sort order (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#outputsort-order)) - 🌟 New option `run.relative-path-mode` (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#runrelative-path-mode)) - 🌟 New linters configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#linters)) - 🌟 New output format configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#output)) - 🌟 New `--fast-only` flag (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersfast)) - 🌟 New option `linters.exclusions.warn-unused` to log a warning if an exclusion rule is unused. 2. New linters/formatters - Add `golines` formatter https://github.com/segmentio/golines 3. Linters new features - ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter (`staticcheck`) (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck)) - `go-critic`: from 0.12.0 to 0.13.0 - `gomodguard`: from 1.3.5 to 1.4.1 (block explicit indirect dependencies) - `nilnil`: from 1.0.1 to 1.1.0 (new option: `only-two`) - `perfsprint`: from 0.8.2 to 0.9.1 (checker name in the diagnostic message) - `staticcheck`: new `quickfix` set of rules - `testifylint`: from 1.5.2 to 1.6.0 (new options: `equal-values`, `suite-method-signature`, `require-string-msg`) - `wsl`: from 4.5.0 to 4.6.0 (new option: `allow-cuddle-used-in-block`) 4. Linters bug fixes - `bidichk`: from 0.3.2 to 0.3.3 - `errchkjson`: from 0.4.0 to 0.4.1 - `errname`: from 1.0.0 to 1.1.0 - `funlen`: fix `ignore-comments` option - `gci`: from 0.13.5 to 0.13.6 - `gosmopolitan`: from 1.2.2 to 1.3.0 - `inamedparam`: from 0.1.3 to 0.2.0 - `intrange`: from 0.3.0 to 0.3.1 - `protogetter`: from 0.3.9 to 0.3.12 - `unparam`: from [`8a5130c`](https://redirect.github.com/golangci/golangci-lint/commit/8a5130ca722f) to [`0df0534`](https://redirect.github.com/golangci/golangci-lint/commit/0df0534333a4) 5. Misc. - 🧹 Configuration options renaming (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - 🧹 Remove options (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - 🧹 Remove flags (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - 🧹 Remove alternative names (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#alternative-linter-names)) - 🧹 Remove or replace deprecated elements (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/)) - Adds an option to display some commands as JSON: - `golangci-lint config path --json` - `golangci-lint help linters --json` - `golangci-lint help formatters --json` - `golangci-lint linters --json` - `golangci-lint formatters --json` - `golangci-lint version --json` 6. Documentation - [Migration guide](https://golangci-lint.run/product/migration-guide/)
--- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 1 * *" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 4 ++-- auth/token.go | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index ca78388..95b373e 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -18,6 +18,6 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: - version: v1.64.8 + version: v2.0.1 diff --git a/auth/token.go b/auth/token.go index 929810d..5d10f9f 100644 --- a/auth/token.go +++ b/auth/token.go @@ -133,7 +133,9 @@ func (tc *TokenClient) generateToken(refreshToken string) (*tokenResponse, error if err != nil { return nil, err } - defer resp.Body.Close() + defer func() { + _ = resp.Body.Close() + }() body, err := io.ReadAll(resp.Body) if err != nil { return nil, err From f9fb5a69d73d228cfd275e2baddb8c7cb863599e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 7 Apr 2025 09:46:55 +0100 Subject: [PATCH 272/343] fix: Generate CloudQuery Go API Client from `spec.json` (#286) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 6 +++ spec.json | 33 +++++++++++++++ 3 files changed, 149 insertions(+) diff --git a/client.gen.go b/client.gen.go index 4ea6468..bb301be 100644 --- a/client.gen.go +++ b/client.gen.go @@ -635,6 +635,9 @@ type ClientInterface interface { SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CheckUserAuthStatus request + CheckUserAuthStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateCustomerWithBody request with any body UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3064,6 +3067,18 @@ func (c *Client) SendAnonymousEvent(ctx context.Context, body SendAnonymousEvent return c.Client.Do(req) } +func (c *Client) CheckUserAuthStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCheckUserAuthStatusRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewUpdateCustomerRequestWithBody(c.Server, contentType, body) if err != nil { @@ -11415,6 +11430,33 @@ func NewSendAnonymousEventRequestWithBody(server string, contentType string, bod return req, nil } +// NewCheckUserAuthStatusRequest generates requests for CheckUserAuthStatus +func NewCheckUserAuthStatusRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/authenticated-status") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewUpdateCustomerRequest calls the generic UpdateCustomer builder with application/json body func NewUpdateCustomerRequest(server string, body UpdateCustomerJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -12418,6 +12460,9 @@ type ClientWithResponsesInterface interface { SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) + // CheckUserAuthStatusWithResponse request + CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) + // UpdateCustomerWithBodyWithResponse request with any body UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) @@ -16219,6 +16264,29 @@ func (r SendAnonymousEventResponse) StatusCode() int { return 0 } +type CheckUserAuthStatusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CheckUserAuthStatus200Response + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CheckUserAuthStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CheckUserAuthStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type UpdateCustomerResponse struct { Body []byte HTTPResponse *http.Response @@ -18209,6 +18277,15 @@ func (c *ClientWithResponses) SendAnonymousEventWithResponse(ctx context.Context return ParseSendAnonymousEventResponse(rsp) } +// CheckUserAuthStatusWithResponse request returning *CheckUserAuthStatusResponse +func (c *ClientWithResponses) CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) { + rsp, err := c.CheckUserAuthStatus(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCheckUserAuthStatusResponse(rsp) +} + // UpdateCustomerWithBodyWithResponse request with arbitrary body returning *UpdateCustomerResponse func (c *ClientWithResponses) UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { rsp, err := c.UpdateCustomerWithBody(ctx, contentType, body, reqEditors...) @@ -26227,6 +26304,39 @@ func ParseSendAnonymousEventResponse(rsp *http.Response) (*SendAnonymousEventRes return response, nil } +// ParseCheckUserAuthStatusResponse parses an HTTP response from a CheckUserAuthStatusWithResponse call +func ParseCheckUserAuthStatusResponse(rsp *http.Response) (*CheckUserAuthStatusResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CheckUserAuthStatusResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CheckUserAuthStatus200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseUpdateCustomerResponse parses an HTTP response from a UpdateCustomerWithResponse call func ParseUpdateCustomerResponse(rsp *http.Response) (*UpdateCustomerResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index e3cd489..2bb19bd 100644 --- a/models.gen.go +++ b/models.gen.go @@ -626,6 +626,12 @@ type BasicError struct { Status int `json:"status"` } +// CheckUserAuthStatus200Response defines model for CheckUserAuthStatus_200_response. +type CheckUserAuthStatus200Response struct { + // Authenticated Whether the user is authenticated + Authenticated bool `json:"authenticated"` +} + // Connector Connector definition type Connector struct { // CreatedAt Time the connector was created diff --git a/spec.json b/spec.json index e394166..5e72d14 100644 --- a/spec.json +++ b/spec.json @@ -3647,6 +3647,30 @@ "tags" : [ "users" ] } }, + "/user/authenticated-status" : { + "get" : { + "description" : "Check if the current user is authenticated", + "operationId" : "CheckUserAuthStatus", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CheckUserAuthStatus_200_response" + } + } + }, + "description" : "Response" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ] + } + }, "/user/login" : { "delete" : { "description" : "Logout a session", @@ -10974,6 +10998,15 @@ } } }, + "CheckUserAuthStatus_200_response" : { + "properties" : { + "authenticated" : { + "description" : "Whether the user is authenticated", + "type" : "boolean" + } + }, + "required" : [ "authenticated" ] + }, "LoginUser_request" : { "additionalProperties" : { }, "properties" : { From f942abe0da733d49612019f7cda6185118d073eb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 24 Apr 2025 16:01:40 +0100 Subject: [PATCH 273/343] fix: Generate CloudQuery Go API Client from `spec.json` (#288) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 104 ++++++++++++++++++++++++++++++++ spec.json | 52 ++++++++++++++++ 3 files changed, 319 insertions(+) diff --git a/client.gen.go b/client.gen.go index bb301be..b69dd85 100644 --- a/client.gen.go +++ b/client.gen.go @@ -156,6 +156,11 @@ type ClientInterface interface { // GetPlatformFlags request GetPlatformFlags(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ReportPlatformDataWithBody request with any body + ReportPlatformDataWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ReportPlatformData(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginNotificationRequests request ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -955,6 +960,30 @@ func (c *Client) GetPlatformFlags(ctx context.Context, reqEditors ...RequestEdit return c.Client.Do(req) } +func (c *Client) ReportPlatformDataWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportPlatformDataRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ReportPlatformData(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportPlatformDataRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginNotificationRequestsRequest(c.Server, params) if err != nil { @@ -4159,6 +4188,46 @@ func NewGetPlatformFlagsRequest(server string) (*http.Request, error) { return req, nil } +// NewReportPlatformDataRequest calls the generic ReportPlatformData builder with application/json body +func NewReportPlatformDataRequest(server string, body ReportPlatformDataJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewReportPlatformDataRequestWithBody(server, "application/json", bodyReader) +} + +// NewReportPlatformDataRequestWithBody generates requests for ReportPlatformData with any type of body +func NewReportPlatformDataRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/platform/report") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { var err error @@ -11981,6 +12050,11 @@ type ClientWithResponsesInterface interface { // GetPlatformFlagsWithResponse request GetPlatformFlagsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPlatformFlagsResponse, error) + // ReportPlatformDataWithBodyWithResponse request with any body + ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) + + ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) + // ListPluginNotificationRequestsWithResponse request ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) @@ -12934,6 +13008,31 @@ func (r GetPlatformFlagsResponse) StatusCode() int { return 0 } +type ReportPlatformDataResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ReportPlatformDataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportPlatformDataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginNotificationRequestsResponse struct { Body []byte HTTPResponse *http.Response @@ -16742,6 +16841,23 @@ func (c *ClientWithResponses) GetPlatformFlagsWithResponse(ctx context.Context, return ParseGetPlatformFlagsResponse(rsp) } +// ReportPlatformDataWithBodyWithResponse request with arbitrary body returning *ReportPlatformDataResponse +func (c *ClientWithResponses) ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { + rsp, err := c.ReportPlatformDataWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportPlatformDataResponse(rsp) +} + +func (c *ClientWithResponses) ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { + rsp, err := c.ReportPlatformData(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportPlatformDataResponse(rsp) +} + // ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) @@ -19247,6 +19363,53 @@ func ParseGetPlatformFlagsResponse(rsp *http.Response) (*GetPlatformFlagsRespons return response, nil } +// ParseReportPlatformDataResponse parses an HTTP response from a ReportPlatformDataWithResponse call +func ParseReportPlatformDataResponse(rsp *http.Response) (*ReportPlatformDataResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportPlatformDataResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 2bb19bd..a7c1969 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2047,6 +2047,15 @@ type RenewPlatformActivationRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// ReportPlatformDataRequest defines model for ReportPlatformData_request. +type ReportPlatformDataRequest struct { + // InstallationID Installation ID of the platform + InstallationID interface{} `json:"installation_id"` + UserAdditions interface{} `json:"user_additions"` + UserRemovals interface{} `json:"user_removals"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // ResetUserPasswordRequest defines model for ResetUserPassword_request. type ResetUserPasswordRequest struct { // Email Email address to reset @@ -3480,6 +3489,9 @@ type ActivatePlatformJSONRequestBody = ActivatePlatformRequest // RenewPlatformActivationJSONRequestBody defines body for RenewPlatformActivation for application/json ContentType. type RenewPlatformActivationJSONRequestBody = RenewPlatformActivationRequest +// ReportPlatformDataJSONRequestBody defines body for ReportPlatformData for application/json ContentType. +type ReportPlatformDataJSONRequestBody = ReportPlatformDataRequest + // CreatePluginNotificationRequestJSONRequestBody defines body for CreatePluginNotificationRequest for application/json ContentType. type CreatePluginNotificationRequestJSONRequestBody = PluginNotificationRequestCreate @@ -4700,6 +4712,98 @@ func (a RenewPlatformActivationRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for ReportPlatformDataRequest. Returns the specified +// element and whether it was found +func (a ReportPlatformDataRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ReportPlatformDataRequest +func (a *ReportPlatformDataRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ReportPlatformDataRequest to handle AdditionalProperties +func (a *ReportPlatformDataRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["installation_id"]; found { + err = json.Unmarshal(raw, &a.InstallationID) + if err != nil { + return fmt.Errorf("error reading 'installation_id': %w", err) + } + delete(object, "installation_id") + } + + if raw, found := object["user_additions"]; found { + err = json.Unmarshal(raw, &a.UserAdditions) + if err != nil { + return fmt.Errorf("error reading 'user_additions': %w", err) + } + delete(object, "user_additions") + } + + if raw, found := object["user_removals"]; found { + err = json.Unmarshal(raw, &a.UserRemovals) + if err != nil { + return fmt.Errorf("error reading 'user_removals': %w", err) + } + delete(object, "user_removals") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ReportPlatformDataRequest to handle AdditionalProperties +func (a ReportPlatformDataRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["installation_id"], err = json.Marshal(a.InstallationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) + } + + object["user_additions"], err = json.Marshal(a.UserAdditions) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_additions': %w", err) + } + + object["user_removals"], err = json.Marshal(a.UserRemovals) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_removals': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for ResetUserPasswordRequest. Returns the specified // element and whether it was found func (a ResetUserPasswordRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index 5e72d14..8f0b26f 100644 --- a/spec.json +++ b/spec.json @@ -6534,6 +6534,41 @@ "x-internal" : true } }, + "/platform/report" : { + "post" : { + "description" : "Report platform data", + "operationId" : "ReportPlatformData", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReportPlatformData_request" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "platform" ], + "x-internal" : true + } + }, "/platform/flags" : { "get" : { "description" : "Get platform feature flags", @@ -11444,6 +11479,23 @@ }, "required" : [ "next_check_in_seconds" ] }, + "ReportPlatformData_request" : { + "additionalProperties" : { }, + "properties" : { + "installation_id" : { + "description" : "Installation ID of the platform", + "pattern" : "^[a-z0-9]{64}$", + "x-go-name" : "InstallationID" + }, + "user_additions" : { + "items" : { } + }, + "user_removals" : { + "items" : { } + } + }, + "required" : [ "installation_id", "user_additions", "user_removals" ] + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From 998358c23f530e44a61b656b2fe783e1f3056f46 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:54:35 +0100 Subject: [PATCH 274/343] fix: Generate CloudQuery Go API Client from `spec.json` (#289) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 20 ++++++++++++-------- spec.json | 10 +++++++--- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/models.gen.go b/models.gen.go index a7c1969..cce9316 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2051,8 +2051,8 @@ type RenewPlatformActivationRequest struct { type ReportPlatformDataRequest struct { // InstallationID Installation ID of the platform InstallationID interface{} `json:"installation_id"` - UserAdditions interface{} `json:"user_additions"` - UserRemovals interface{} `json:"user_removals"` + UserAdditions interface{} `json:"user_additions,omitempty"` + UserRemovals interface{} `json:"user_removals,omitempty"` AdditionalProperties map[string]interface{} `json:"-"` } @@ -4785,14 +4785,18 @@ func (a ReportPlatformDataRequest) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) } - object["user_additions"], err = json.Marshal(a.UserAdditions) - if err != nil { - return nil, fmt.Errorf("error marshaling 'user_additions': %w", err) + if a.UserAdditions != nil { + object["user_additions"], err = json.Marshal(a.UserAdditions) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_additions': %w", err) + } } - object["user_removals"], err = json.Marshal(a.UserRemovals) - if err != nil { - return nil, fmt.Errorf("error marshaling 'user_removals': %w", err) + if a.UserRemovals != nil { + object["user_removals"], err = json.Marshal(a.UserRemovals) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_removals': %w", err) + } } for fieldName, field := range a.AdditionalProperties { diff --git a/spec.json b/spec.json index 8f0b26f..cc4f7f9 100644 --- a/spec.json +++ b/spec.json @@ -11488,13 +11488,17 @@ "x-go-name" : "InstallationID" }, "user_additions" : { - "items" : { } + "items" : { + "type" : "string" + }, + "x-go-type-skip-optional-pointer" : true }, "user_removals" : { - "items" : { } + "items" : { }, + "x-go-type-skip-optional-pointer" : true } }, - "required" : [ "installation_id", "user_additions", "user_removals" ] + "required" : [ "installation_id" ] }, "UsageIncrease_tables_inner" : { "properties" : { From 0c327a726ac3dec0061a44ae3e69c3d04459fc74 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 28 Apr 2025 12:31:40 +0100 Subject: [PATCH 275/343] fix: Generate CloudQuery Go API Client from `spec.json` (#290) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 11 ++++ spec.json | 58 +++++++++++++++++++ 3 files changed, 221 insertions(+) diff --git a/client.gen.go b/client.gen.go index b69dd85..20e589e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -672,6 +672,9 @@ type ClientInterface interface { ResetUserPassword(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeterminePlatformTenantByEmail request + DeterminePlatformTenantByEmail(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateUserToken request CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3240,6 +3243,18 @@ func (c *Client) ResetUserPassword(ctx context.Context, body ResetUserPasswordJS return c.Client.Do(req) } +func (c *Client) DeterminePlatformTenantByEmail(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeterminePlatformTenantByEmailRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateUserTokenRequest(c.Server) if err != nil { @@ -11843,6 +11858,51 @@ func NewResetUserPasswordRequestWithBody(server string, contentType string, body return req, nil } +// NewDeterminePlatformTenantByEmailRequest generates requests for DeterminePlatformTenantByEmail +func NewDeterminePlatformTenantByEmailRequest(server string, params *DeterminePlatformTenantByEmailParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/tenant") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "email", runtime.ParamLocationQuery, params.Email); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewCreateUserTokenRequest generates requests for CreateUserToken func NewCreateUserTokenRequest(server string) (*http.Request, error) { var err error @@ -12566,6 +12626,9 @@ type ClientWithResponsesInterface interface { ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) + // DeterminePlatformTenantByEmailWithResponse request + DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) + // CreateUserTokenWithResponse request CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) @@ -16563,6 +16626,32 @@ func (r ResetUserPasswordResponse) StatusCode() int { return 0 } +type DeterminePlatformTenantByEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DeterminePlatformTenantByEmail200Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeterminePlatformTenantByEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeterminePlatformTenantByEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type CreateUserTokenResponse struct { Body []byte HTTPResponse *http.Response @@ -18497,6 +18586,15 @@ func (c *ClientWithResponses) ResetUserPasswordWithResponse(ctx context.Context, return ParseResetUserPasswordResponse(rsp) } +// DeterminePlatformTenantByEmailWithResponse request returning *DeterminePlatformTenantByEmailResponse +func (c *ClientWithResponses) DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) { + rsp, err := c.DeterminePlatformTenantByEmail(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeterminePlatformTenantByEmailResponse(rsp) +} + // CreateUserTokenWithResponse request returning *CreateUserTokenResponse func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) { rsp, err := c.CreateUserToken(ctx, reqEditors...) @@ -26843,6 +26941,60 @@ func ParseResetUserPasswordResponse(rsp *http.Response) (*ResetUserPasswordRespo return response, nil } +// ParseDeterminePlatformTenantByEmailResponse parses an HTTP response from a DeterminePlatformTenantByEmailWithResponse call +func ParseDeterminePlatformTenantByEmailResponse(rsp *http.Response) (*DeterminePlatformTenantByEmailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeterminePlatformTenantByEmailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DeterminePlatformTenantByEmail200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseCreateUserTokenResponse parses an HTTP response from a CreateUserTokenWithResponse call func ParseCreateUserTokenResponse(rsp *http.Response) (*CreateUserTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index cce9316..b85fbd2 100644 --- a/models.gen.go +++ b/models.gen.go @@ -956,6 +956,12 @@ type DeleteTeamInvitationRequest struct { Email openapi_types.Email `json:"email"` } +// DeterminePlatformTenantByEmail200Response defines model for DeterminePlatformTenantByEmail_200_response. +type DeterminePlatformTenantByEmail200Response struct { + // TenantURL URL of the tenant + TenantURL string `json:"tenant_url"` +} + // DisplayName A human-readable display name type DisplayName = string @@ -3471,6 +3477,11 @@ type GetCurrentUserMembershipsParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } +// DeterminePlatformTenantByEmailParams defines parameters for DeterminePlatformTenantByEmail. +type DeterminePlatformTenantByEmailParams struct { + Email string `form:"email" json:"email"` +} + // CreateAddonJSONRequestBody defines body for CreateAddon for application/json ContentType. type CreateAddonJSONRequestBody = AddonCreate diff --git a/spec.json b/spec.json index cc4f7f9..996c76a 100644 --- a/spec.json +++ b/spec.json @@ -4038,6 +4038,53 @@ "x-internal" : true } }, + "/user/tenant" : { + "get" : { + "description" : "Determine platform tenant by email", + "operationId" : "DeterminePlatformTenantByEmail", + "parameters" : [ { + "explode" : true, + "in" : "query", + "name" : "email", + "required" : true, + "schema" : { + "description" : "Email address of the user", + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeterminePlatformTenantByEmail_200_response" + } + } + }, + "description" : "Tenant found" + }, + "204" : { + "description" : "No tenant found, or multiple tenants" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "platform", "users" ], + "x-internal" : true + } + }, "/users/{user_id}" : { "delete" : { "description" : "Delete user", @@ -11184,6 +11231,17 @@ }, "required" : [ "first_name", "last_name" ] }, + "DeterminePlatformTenantByEmail_200_response" : { + "properties" : { + "tenant_url" : { + "description" : "URL of the tenant", + "format" : "url", + "type" : "string", + "x-go-name" : "TenantURL" + } + }, + "required" : [ "tenant_url" ] + }, "ListTeamAPIKeys_200_response" : { "properties" : { "items" : { From 74639eda923f0900d54fba7eb601d4703a1b8705 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 28 Apr 2025 18:42:15 +0100 Subject: [PATCH 276/343] fix: Generate CloudQuery Go API Client from `spec.json` (#291) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 13 +++++++++++-- spec.json | 37 ++++++++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/models.gen.go b/models.gen.go index b85fbd2..025fa4e 100644 --- a/models.gen.go +++ b/models.gen.go @@ -958,8 +958,8 @@ type DeleteTeamInvitationRequest struct { // DeterminePlatformTenantByEmail200Response defines model for DeterminePlatformTenantByEmail_200_response. type DeterminePlatformTenantByEmail200Response struct { - // TenantURL URL of the tenant - TenantURL string `json:"tenant_url"` + // Items List of tenants + Items []TenantUser `json:"items,omitempty"` } // DisplayName A human-readable display name @@ -2781,6 +2781,15 @@ type TeamSubscriptionOrderID = openapi_types.UUID // TeamSubscriptionOrderStatus defines model for TeamSubscriptionOrderStatus. type TeamSubscriptionOrderStatus string +// TenantUser Tenant information of a platform user +type TenantUser struct { + // Provider Login provider of the tenant + Provider *string `json:"provider,omitempty"` + + // TenantURL URL of the tenant + TenantURL string `json:"tenant_url"` +} + // UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. type UpdateCurrentUserRequest struct { // Name The unique name for the user. diff --git a/spec.json b/spec.json index 996c76a..5eb8ff9 100644 --- a/spec.json +++ b/spec.json @@ -4062,10 +4062,7 @@ } } }, - "description" : "Tenant found" - }, - "204" : { - "description" : "No tenant found, or multiple tenants" + "description" : "List of tenants" }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -9147,6 +9144,23 @@ "required" : [ "token" ] } ] }, + "TenantUser" : { + "additionalProperties" : false, + "description" : "Tenant information of a platform user", + "properties" : { + "tenant_url" : { + "description" : "URL of the tenant", + "format" : "url", + "type" : "string", + "x-go-name" : "TenantURL" + }, + "provider" : { + "description" : "Login provider of the tenant", + "type" : "string" + } + }, + "required" : [ "tenant_url" ] + }, "UserID" : { "description" : "ID of the User", "example" : "12345678-1234-1234-1234-1234567890ab", @@ -11233,14 +11247,15 @@ }, "DeterminePlatformTenantByEmail_200_response" : { "properties" : { - "tenant_url" : { - "description" : "URL of the tenant", - "format" : "url", - "type" : "string", - "x-go-name" : "TenantURL" + "items" : { + "description" : "List of tenants", + "items" : { + "$ref" : "#/components/schemas/TenantUser" + }, + "type" : "array", + "x-go-type-skip-optional-pointer" : true } - }, - "required" : [ "tenant_url" ] + } }, "ListTeamAPIKeys_200_response" : { "properties" : { From a081596632931d6e5ba696a728da502605902aac Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 29 Apr 2025 15:17:16 +0100 Subject: [PATCH 277/343] fix: Generate CloudQuery Go API Client from `spec.json` (#292) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/models.gen.go b/models.gen.go index 025fa4e..1dd1938 100644 --- a/models.gen.go +++ b/models.gen.go @@ -958,6 +958,9 @@ type DeleteTeamInvitationRequest struct { // DeterminePlatformTenantByEmail200Response defines model for DeterminePlatformTenantByEmail_200_response. type DeterminePlatformTenantByEmail200Response struct { + // HasCloudAccount Whether the user has a cloud account + HasCloudAccount bool `json:"has_cloud_account"` + // Items List of tenants Items []TenantUser `json:"items,omitempty"` } diff --git a/spec.json b/spec.json index 5eb8ff9..be94197 100644 --- a/spec.json +++ b/spec.json @@ -11254,8 +11254,13 @@ }, "type" : "array", "x-go-type-skip-optional-pointer" : true + }, + "has_cloud_account" : { + "description" : "Whether the user has a cloud account", + "type" : "boolean" } - } + }, + "required" : [ "has_cloud_account" ] }, "ListTeamAPIKeys_200_response" : { "properties" : { From b071129c619dce5b6a65b0d2071cb7a76a0f6895 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 1 May 2025 02:49:16 +0100 Subject: [PATCH 278/343] chore(deps): Update dependency golangci/golangci-lint to v2.1.2 (#293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | Pending | |---|---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.0.1` -> `v2.1.2` | `v2.1.5` (+2) | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.1.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v212) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.1.1...v2.1.2) 1. Linters bug fixes - `exptostd`: from 0.4.2 to 0.4.3 - `gofumpt`: from 0.7.0 to 0.8.0 - `protogetter`: from 0.3.13 to 0.3.15 - `usetesting`: from 0.4.2 to 0.4.3 ### [`v2.1.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v211) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.1.0...v2.1.1) The release process of v2.1.0 failed due to a regression inside goreleaser. The binaries of v2.1.0 have been published, but not the other artifacts (AUR, Docker, etc.). ### [`v2.1.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v210) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.2...v2.1.0) 1. Enhancements - Add an option to display absolute paths (`--path-mode=abs`) - Add configuration path placeholder (`${config-path}`) - Add `warn-unused` option for `fmt` command - Colored diff for `fmt` command (`golangci-lint fmt --diff-colored`) 2. New linters - Add `funcorder` linter https://github.com/manuelarte/funcorder 3. Linters new features or changes - `go-errorlint`: from 1.7.1 to 1.8.0 (automatic error comparison and type assertion fixes) - ⚠️ `goconst`: `ignore-strings` is deprecated and replaced by `ignore-string-values` - `goconst`: from 1.7.1 to 1.8.1 (new options: `find-duplicates`, `eval-const-expressions`) - `govet`: add `httpmux` analyzer - `nilnesserr`: from 0.1.2 to 0.2.0 (detect more cases) - `paralleltest`: from 1.0.10 to 1.0.14 (checks only `_test.go` files) - `revive`: from 1.7.0 to 1.9.0 (support kebab case for setting names) - `sloglint`: from 0.9.0 to 0.11.0 (autofix, new option `msg-style`, suggest `slog.DiscardHandler`) - `wrapcheck`: from 2.10.0 to 2.11.0 (new option `report-internal-errors`) - `wsl`: from 4.6.0 to 4.7.0 (cgo files are always excluded) 4. Linters bug fixes - `fatcontext`: from 0.7.1 to 0.7.2 - `gocritic`: fix `importshadow` checker - `gosec`: from 2.22.2 to 2.22.3 - `ireturn`: from 0.3.1 to 0.4.0 - `loggercheck`: from 0.10.1 to 0.11.0 - `nakedret`: from 2.0.5 to 2.0.6 - `nonamedreturns`: from 1.0.5 to 1.0.6 - `protogetter`: from 0.3.12 to 0.3.13 - `testifylint`: from 1.6.0 to 1.6.1 - `unconvert`: update to HEAD 5. Misc. - Fixes memory leaks when using go1.(N) with golangci-lint built with go1.(N-X) - Adds `golangci-lint-fmt` pre-commit hook 6. Documentation - Improvements - Updates section about vscode integration ### [`v2.0.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v202) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.0.1...v2.0.2) 1. Misc. - Fixes flags parsing for formatters - Fixes the filepath used by the exclusion `source` option 2. Documentation - Adds a section about flags migration - Cleaning pages with v1 options
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 95b373e..abfa1df 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v7 with: - version: v2.0.1 + version: v2.1.2 From 3639c918111c7128696b598036cd7eda09f89bb4 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 7 May 2025 12:06:02 +0100 Subject: [PATCH 279/343] fix: Generate CloudQuery Go API Client from `spec.json` (#294) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ++++++ spec.json | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/models.gen.go b/models.gen.go index 1dd1938..5a02c0f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1720,6 +1720,9 @@ type PluginTableCreate struct { // Relations Names of the tables that depend on this table Relations *[]string `json:"relations,omitempty"` + // SensitiveColumns List of columns within this table that can contain sensitive/secret data + SensitiveColumns *[]string `json:"sensitive_columns,omitempty"` + // Title Title of the table Title *string `json:"title,omitempty"` } @@ -1750,6 +1753,9 @@ type PluginTableDetails struct { // Relations Names of the tables that depend on this table Relations []string `json:"relations"` + // SensitiveColumns List of columns within this table that can contain sensitive/secret data + SensitiveColumns *[]string `json:"sensitive_columns,omitempty"` + // Title Title of the table Title string `json:"title"` } diff --git a/spec.json b/spec.json index be94197..14f0b38 100644 --- a/spec.json +++ b/spec.json @@ -7960,6 +7960,14 @@ }, "type" : "array" }, + "sensitive_columns" : { + "description" : "List of columns within this table that can contain sensitive/secret data", + "example" : [ "secret_key" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, "title" : { "description" : "Title of the table", "example" : "AWS S3 Buckets", @@ -8027,6 +8035,14 @@ "type" : "string" }, "type" : "array" + }, + "sensitive_columns" : { + "description" : "List of columns within this table that can contain sensitive/secret data", + "example" : [ "secret_key" ], + "items" : { + "type" : "string" + }, + "type" : "array" } }, "required" : [ "columns", "description", "is_incremental", "name", "permissions_needed", "relations", "title" ] From df3f02b40aff2d0b0627f91d817274fe72061194 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 7 May 2025 15:56:49 +0100 Subject: [PATCH 280/343] chore(main): Release v1.13.9 (#287) :robot: I have created a release *beep* *boop* --- ## [1.13.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.8...v1.13.9) (2025-05-07) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#286](https://github.com/cloudquery/cloudquery-api-go/issues/286)) ([f9fb5a6](https://github.com/cloudquery/cloudquery-api-go/commit/f9fb5a69d73d228cfd275e2baddb8c7cb863599e)) * Generate CloudQuery Go API Client from `spec.json` ([#288](https://github.com/cloudquery/cloudquery-api-go/issues/288)) ([f942abe](https://github.com/cloudquery/cloudquery-api-go/commit/f942abe0da733d49612019f7cda6185118d073eb)) * Generate CloudQuery Go API Client from `spec.json` ([#289](https://github.com/cloudquery/cloudquery-api-go/issues/289)) ([998358c](https://github.com/cloudquery/cloudquery-api-go/commit/998358c23f530e44a61b656b2fe783e1f3056f46)) * Generate CloudQuery Go API Client from `spec.json` ([#290](https://github.com/cloudquery/cloudquery-api-go/issues/290)) ([0c327a7](https://github.com/cloudquery/cloudquery-api-go/commit/0c327a726ac3dec0061a44ae3e69c3d04459fc74)) * Generate CloudQuery Go API Client from `spec.json` ([#291](https://github.com/cloudquery/cloudquery-api-go/issues/291)) ([74639ed](https://github.com/cloudquery/cloudquery-api-go/commit/74639eda923f0900d54fba7eb601d4703a1b8705)) * Generate CloudQuery Go API Client from `spec.json` ([#292](https://github.com/cloudquery/cloudquery-api-go/issues/292)) ([a081596](https://github.com/cloudquery/cloudquery-api-go/commit/a081596632931d6e5ba696a728da502605902aac)) * Generate CloudQuery Go API Client from `spec.json` ([#294](https://github.com/cloudquery/cloudquery-api-go/issues/294)) ([3639c91](https://github.com/cloudquery/cloudquery-api-go/commit/3639c918111c7128696b598036cd7eda09f89bb4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 57a2a35..2ba8006 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.8" + ".": "1.13.9" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d592e..dcbf16d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.13.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.8...v1.13.9) (2025-05-07) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#286](https://github.com/cloudquery/cloudquery-api-go/issues/286)) ([f9fb5a6](https://github.com/cloudquery/cloudquery-api-go/commit/f9fb5a69d73d228cfd275e2baddb8c7cb863599e)) +* Generate CloudQuery Go API Client from `spec.json` ([#288](https://github.com/cloudquery/cloudquery-api-go/issues/288)) ([f942abe](https://github.com/cloudquery/cloudquery-api-go/commit/f942abe0da733d49612019f7cda6185118d073eb)) +* Generate CloudQuery Go API Client from `spec.json` ([#289](https://github.com/cloudquery/cloudquery-api-go/issues/289)) ([998358c](https://github.com/cloudquery/cloudquery-api-go/commit/998358c23f530e44a61b656b2fe783e1f3056f46)) +* Generate CloudQuery Go API Client from `spec.json` ([#290](https://github.com/cloudquery/cloudquery-api-go/issues/290)) ([0c327a7](https://github.com/cloudquery/cloudquery-api-go/commit/0c327a726ac3dec0061a44ae3e69c3d04459fc74)) +* Generate CloudQuery Go API Client from `spec.json` ([#291](https://github.com/cloudquery/cloudquery-api-go/issues/291)) ([74639ed](https://github.com/cloudquery/cloudquery-api-go/commit/74639eda923f0900d54fba7eb601d4703a1b8705)) +* Generate CloudQuery Go API Client from `spec.json` ([#292](https://github.com/cloudquery/cloudquery-api-go/issues/292)) ([a081596](https://github.com/cloudquery/cloudquery-api-go/commit/a081596632931d6e5ba696a728da502605902aac)) +* Generate CloudQuery Go API Client from `spec.json` ([#294](https://github.com/cloudquery/cloudquery-api-go/issues/294)) ([3639c91](https://github.com/cloudquery/cloudquery-api-go/commit/3639c918111c7128696b598036cd7eda09f89bb4)) + ## [1.13.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.7...v1.13.8) (2025-03-31) From 93d1444f3497066bf41b761b8ae953813113fe1d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 4 Jun 2025 09:50:45 +0100 Subject: [PATCH 281/343] fix: Generate CloudQuery Go API Client from `spec.json` (#295) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/models.gen.go b/models.gen.go index 5a02c0f..addd0ba 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1956,6 +1956,9 @@ type PluginVersionDetails struct { // UIBaseURL Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. UIBaseURL *string `json:"ui_base_url,omitempty"` + + // UIID ID of the plugin's UI. + UIID *openapi_types.UUID `json:"ui_id,omitempty"` } // PluginVersionList CloudQuery Plugin Version diff --git a/spec.json b/spec.json index 14f0b38..7e9cbeb 100644 --- a/spec.json +++ b/spec.json @@ -7749,6 +7749,12 @@ "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", "type" : "string", "x-go-name" : "UIBaseURL" + }, + "ui_id" : { + "description" : "ID of the plugin's UI.", + "format" : "uuid", + "type" : "string", + "x-go-name" : "UIID" } }, "required" : [ "example_config" ] From 57ee37d0133b774de13d2c81f8e8ec4faadb587e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:12:18 +0100 Subject: [PATCH 282/343] fix: Generate CloudQuery Go API Client from `spec.json` (#297) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 15 +++++++++++++++ spec.json | 24 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/models.gen.go b/models.gen.go index addd0ba..5762af5 100644 --- a/models.gen.go +++ b/models.gen.go @@ -902,6 +902,9 @@ type CreateSyncRunProgressRequest struct { // Status The status of the sync run Status *SyncRunStatus `json:"status,omitempty"` + // TableProgress Table-specific progress information for a sync run + TableProgress *SyncRunTableProgress `json:"table_progress,omitempty"` + // Warnings Number of warnings encountered so far Warnings int64 `json:"warnings"` } @@ -2495,6 +2498,18 @@ type SyncRunStatus string // SyncRunStatusReason The reason for the status type SyncRunStatusReason string +// SyncRunTableProgress Table-specific progress information for a sync run +type SyncRunTableProgress map[string]SyncRunTableProgressValue + +// SyncRunTableProgressValue defines model for SyncRunTableProgress_value. +type SyncRunTableProgressValue struct { + // Errors Number of errors for this table + Errors int64 `json:"errors"` + + // Rows Number of rows processed for this table + Rows int64 `json:"rows"` +} + // SyncSource defines model for SyncSource. type SyncSource struct { // ConnectorID ID of the Connector diff --git a/spec.json b/spec.json index 7e9cbeb..9cb3f11 100644 --- a/spec.json +++ b/spec.json @@ -10128,6 +10128,12 @@ } } ] }, + "SyncRunTableProgress" : { + "additionalProperties" : { + "$ref" : "#/components/schemas/SyncRunTableProgress_value" + }, + "description" : "Table-specific progress information for a sync run" + }, "ConnectorIdentityResponseAWS" : { "additionalProperties" : false, "description" : "AWS connector identity response", @@ -11423,6 +11429,9 @@ "description" : "The total number of shards for this sync run", "format" : "int32", "type" : "integer" + }, + "table_progress" : { + "$ref" : "#/components/schemas/SyncRunTableProgress" } }, "required" : [ "errors", "rows", "warnings" ] @@ -11656,6 +11665,21 @@ } }, "required" : [ "end", "start" ] + }, + "SyncRunTableProgress_value" : { + "properties" : { + "errors" : { + "description" : "Number of errors for this table", + "format" : "int64", + "type" : "integer" + }, + "rows" : { + "description" : "Number of rows processed for this table", + "format" : "int64", + "type" : "integer" + } + }, + "required" : [ "errors", "rows" ] } }, "securitySchemes" : { From a4eefa324ef75759fe6c7e4de636cdc87a89e9df Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 27 Jun 2025 15:02:55 +0100 Subject: [PATCH 283/343] chore(main): Release v1.13.10 (#296) :robot: I have created a release *beep* *boop* --- ## [1.13.10](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.9...v1.13.10) (2025-06-27) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#295](https://github.com/cloudquery/cloudquery-api-go/issues/295)) ([93d1444](https://github.com/cloudquery/cloudquery-api-go/commit/93d1444f3497066bf41b761b8ae953813113fe1d)) * Generate CloudQuery Go API Client from `spec.json` ([#297](https://github.com/cloudquery/cloudquery-api-go/issues/297)) ([57ee37d](https://github.com/cloudquery/cloudquery-api-go/commit/57ee37d0133b774de13d2c81f8e8ec4faadb587e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ba8006..e93d995 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.9" + ".": "1.13.10" } diff --git a/CHANGELOG.md b/CHANGELOG.md index dcbf16d..adec862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.13.10](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.9...v1.13.10) (2025-06-27) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#295](https://github.com/cloudquery/cloudquery-api-go/issues/295)) ([93d1444](https://github.com/cloudquery/cloudquery-api-go/commit/93d1444f3497066bf41b761b8ae953813113fe1d)) +* Generate CloudQuery Go API Client from `spec.json` ([#297](https://github.com/cloudquery/cloudquery-api-go/issues/297)) ([57ee37d](https://github.com/cloudquery/cloudquery-api-go/commit/57ee37d0133b774de13d2c81f8e8ec4faadb587e)) + ## [1.13.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.8...v1.13.9) (2025-05-07) From 8d3ef595577f5bebb32a8b06c117be54ee02e55d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 1 Jul 2025 02:48:52 +0100 Subject: [PATCH 284/343] chore(deps): Update dependency golangci/golangci-lint to v2.1.6 (#298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | Pending | |---|---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | patch | `v2.1.2` -> `v2.1.6` | `v2.2.1` (+1) | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.1.6`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v216) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.1.5...v2.1.6) 1. Linters bug fixes - `godot`: from 1.5.0 to 1.5.1 - `musttag`: from 0.13.0 to 0.13.1 2. Documentation - Add note about golangci-lint v2 integration in VS Code ### [`v2.1.5`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v215) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.1.4...v2.1.5) Due to an error related to Snapcraft, some artifacts of the v2.1.4 release have not been published. This release contains the same things as v2.1.3. ### [`v2.1.4`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v214) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.1.3...v2.1.4) Due to an error related to Snapcraft, some artifacts of the v2.1.3 release have not been published. This release contains the same things as v2.1.3. ### [`v2.1.3`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v213) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.1.2...v2.1.3) 1. Linters bug fixes - `fatcontext`: from 0.7.2 to 0.8.0 2. Misc. - migration: fix `nakedret.max-func-lines: 0` - migration: fix order of `staticcheck` settings - fix: add `go.mod` hash to the cache salt - fix: use diagnostic position for related information position
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index abfa1df..c20973e 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v7 with: - version: v2.1.2 + version: v2.1.6 From d64f97314476bd2ac7d8d84a88a5acd28a2be461 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 1 Jul 2025 02:50:46 +0100 Subject: [PATCH 285/343] fix(deps): Update module github.com/hashicorp/go-retryablehttp to v0.7.8 (#299) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/hashicorp/go-retryablehttp](https://redirect.github.com/hashicorp/go-retryablehttp) | require | patch | `v0.7.7` -> `v0.7.8` | --- ### Release Notes
hashicorp/go-retryablehttp (github.com/hashicorp/go-retryablehttp) ### [`v0.7.8`](https://redirect.github.com/hashicorp/go-retryablehttp/compare/v0.7.7...v0.7.8) [Compare Source](https://redirect.github.com/hashicorp/go-retryablehttp/compare/v0.7.7...v0.7.8)
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- go.mod | 6 ++++-- go.sum | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 7ed90dc..7ce6497 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,12 @@ module github.com/cloudquery/cloudquery-api-go -go 1.21.0 +go 1.23 + +toolchain go1.23.10 require ( github.com/adrg/xdg v0.5.3 - github.com/hashicorp/go-retryablehttp v0.7.7 + github.com/hashicorp/go-retryablehttp v0.7.8 github.com/oapi-codegen/runtime v1.1.1 github.com/stretchr/testify v1.10.0 ) diff --git a/go.sum b/go.sum index d228bcf..3496d7d 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= -github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= +github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= +github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= From 694ddd1bb06b58e4e063518ffe22f151d53db481 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 1 Jul 2025 09:49:27 +0100 Subject: [PATCH 286/343] chore(main): Release v1.13.11 (#300) :robot: I have created a release *beep* *boop* --- ## [1.13.11](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.10...v1.13.11) (2025-07-01) ### Bug Fixes * **deps:** Update module github.com/hashicorp/go-retryablehttp to v0.7.8 ([#299](https://github.com/cloudquery/cloudquery-api-go/issues/299)) ([d64f973](https://github.com/cloudquery/cloudquery-api-go/commit/d64f97314476bd2ac7d8d84a88a5acd28a2be461)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e93d995..ac022f7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.10" + ".": "1.13.11" } diff --git a/CHANGELOG.md b/CHANGELOG.md index adec862..0203a0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.13.11](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.10...v1.13.11) (2025-07-01) + + +### Bug Fixes + +* **deps:** Update module github.com/hashicorp/go-retryablehttp to v0.7.8 ([#299](https://github.com/cloudquery/cloudquery-api-go/issues/299)) ([d64f973](https://github.com/cloudquery/cloudquery-api-go/commit/d64f97314476bd2ac7d8d84a88a5acd28a2be461)) + ## [1.13.10](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.9...v1.13.10) (2025-06-27) From 59755345cde7833d65c67d9425bcd4c47b6a2856 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 2 Jul 2025 16:31:09 +0100 Subject: [PATCH 287/343] fix: Generate CloudQuery Go API Client from `spec.json` (#301) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ models.gen.go | 6 ++++++ spec.json | 13 +++++++++++++ 3 files changed, 35 insertions(+) diff --git a/client.gen.go b/client.gen.go index 20e589e..777545e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -5018,6 +5018,22 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P } + if params.IncludeFips != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_fips", runtime.ParamLocationQuery, *params.IncludeFips); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.IncludePrereleases != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_prereleases", runtime.ParamLocationQuery, *params.IncludePrereleases); err != nil { diff --git a/models.gen.go b/models.gen.go index 5762af5..795301a 100644 --- a/models.gen.go +++ b/models.gen.go @@ -3047,6 +3047,9 @@ type EmailBasic = string // IncludeDrafts defines model for include_drafts. type IncludeDrafts = bool +// IncludeFips defines model for include_fips. +type IncludeFips = bool + // IncludePrereleases defines model for include_prereleases. type IncludePrereleases = bool @@ -3204,6 +3207,9 @@ type ListPluginVersionsParams struct { // IncludeDrafts Whether to include draft versions IncludeDrafts *IncludeDrafts `form:"include_drafts,omitempty" json:"include_drafts,omitempty"` + // IncludeFips Whether to include fips versions + IncludeFips *IncludeFips `form:"include_fips,omitempty" json:"include_fips,omitempty"` + // IncludePrereleases Whether to include prerelease versions IncludePrereleases *IncludePrereleases `form:"include_prereleases,omitempty" json:"include_prereleases,omitempty"` VersionFilter *VersionFilter `form:"version_filter,omitempty" json:"version_filter,omitempty"` diff --git a/spec.json b/spec.json index 9cb3f11..a09f246 100644 --- a/spec.json +++ b/spec.json @@ -610,6 +610,8 @@ "$ref" : "#/components/parameters/per_page" }, { "$ref" : "#/components/parameters/include_drafts" + }, { + "$ref" : "#/components/parameters/include_fips" }, { "$ref" : "#/components/parameters/include_prereleases" }, { @@ -6777,6 +6779,17 @@ }, "style" : "form" }, + "include_fips" : { + "description" : "Whether to include fips versions", + "explode" : true, + "in" : "query", + "name" : "include_fips", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, "include_prereleases" : { "description" : "Whether to include prerelease versions", "explode" : true, From a5a438d68a63c72cba5b08622c5fae7576b42720 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:03:25 +0100 Subject: [PATCH 288/343] fix: Generate CloudQuery Go API Client from `spec.json` (#303) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 118 -------------------------------------------------- models.gen.go | 3 -- spec.json | 31 ------------- 3 files changed, 152 deletions(-) diff --git a/client.gen.go b/client.gen.go index 777545e..6f619da 100644 --- a/client.gen.go +++ b/client.gen.go @@ -153,9 +153,6 @@ type ClientInterface interface { RenewPlatformActivation(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetPlatformFlags request - GetPlatformFlags(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // ReportPlatformDataWithBody request with any body ReportPlatformDataWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -951,18 +948,6 @@ func (c *Client) RenewPlatformActivation(ctx context.Context, body RenewPlatform return c.Client.Do(req) } -func (c *Client) GetPlatformFlags(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPlatformFlagsRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) ReportPlatformDataWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewReportPlatformDataRequestWithBody(c.Server, contentType, body) if err != nil { @@ -4176,33 +4161,6 @@ func NewRenewPlatformActivationRequestWithBody(server string, contentType string return req, nil } -// NewGetPlatformFlagsRequest generates requests for GetPlatformFlags -func NewGetPlatformFlagsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/platform/flags") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - // NewReportPlatformDataRequest calls the generic ReportPlatformData builder with application/json body func NewReportPlatformDataRequest(server string, body ReportPlatformDataJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -12123,9 +12081,6 @@ type ClientWithResponsesInterface interface { RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) - // GetPlatformFlagsWithResponse request - GetPlatformFlagsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPlatformFlagsResponse, error) - // ReportPlatformDataWithBodyWithResponse request with any body ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) @@ -13063,30 +13018,6 @@ func (r RenewPlatformActivationResponse) StatusCode() int { return 0 } -type GetPlatformFlagsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PlatformFlags - JSON401 *RequiresAuthentication - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetPlatformFlagsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPlatformFlagsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type ReportPlatformDataResponse struct { Body []byte HTTPResponse *http.Response @@ -16937,15 +16868,6 @@ func (c *ClientWithResponses) RenewPlatformActivationWithResponse(ctx context.Co return ParseRenewPlatformActivationResponse(rsp) } -// GetPlatformFlagsWithResponse request returning *GetPlatformFlagsResponse -func (c *ClientWithResponses) GetPlatformFlagsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPlatformFlagsResponse, error) { - rsp, err := c.GetPlatformFlags(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPlatformFlagsResponse(rsp) -} - // ReportPlatformDataWithBodyWithResponse request with arbitrary body returning *ReportPlatformDataResponse func (c *ClientWithResponses) ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { rsp, err := c.ReportPlatformDataWithBody(ctx, contentType, body, reqEditors...) @@ -19437,46 +19359,6 @@ func ParseRenewPlatformActivationResponse(rsp *http.Response) (*RenewPlatformAct return response, nil } -// ParseGetPlatformFlagsResponse parses an HTTP response from a GetPlatformFlagsWithResponse call -func ParseGetPlatformFlagsResponse(rsp *http.Response) (*GetPlatformFlagsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetPlatformFlagsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PlatformFlags - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseReportPlatformDataResponse parses an HTTP response from a ReportPlatformDataWithResponse call func ParseReportPlatformDataResponse(rsp *http.Response) (*ReportPlatformDataResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 795301a..8838f90 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1401,9 +1401,6 @@ type MembershipWithUser struct { User User `json:"user"` } -// PlatformFlags A map of feature flags for the Platform -type PlatformFlags = map[string]interface{} - // Plugin CloudQuery Plugin type Plugin struct { // Category Supported categories for plugins diff --git a/spec.json b/spec.json index a09f246..bd0d7db 100644 --- a/spec.json +++ b/spec.json @@ -6614,32 +6614,6 @@ "tags" : [ "platform" ], "x-internal" : true } - }, - "/platform/flags" : { - "get" : { - "description" : "Get platform feature flags", - "operationId" : "GetPlatformFlags", - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PlatformFlags" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "security" : [ ], - "tags" : [ "platform" ] - } } }, "components" : { @@ -10526,11 +10500,6 @@ }, "required" : [ "base_url", "return_url" ] }, - "PlatformFlags" : { - "additionalProperties" : false, - "description" : "A map of feature flags for the Platform", - "type" : "object" - }, "UploadImage_request" : { "properties" : { "content_type" : { From 468858446f2df0cd7a44c299fcf3120581246f26 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 21 Jul 2025 11:22:15 +0100 Subject: [PATCH 289/343] chore: Update CODEOWNERS (#304) --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index b83f256..9b84ce2 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,3 +1,3 @@ -* @cloudquery/integrations-backend +* @cloudquery/backend go.mod go.sum From c479386c885f36da1fbe7bf74f7f08e1ed544fa0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 24 Jul 2025 11:53:06 +0100 Subject: [PATCH 290/343] fix: Generate CloudQuery Go API Client from `spec.json` (#305) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 512 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 86 +++++++++ spec.json | 156 +++++++++++++++ 3 files changed, 754 insertions(+) diff --git a/client.gen.go b/client.gen.go index 6f619da..6077bb0 100644 --- a/client.gen.go +++ b/client.gen.go @@ -675,6 +675,17 @@ type ClientInterface interface { // CreateUserToken request CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // UserTOTPDelete request + UserTOTPDelete(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserTOTPSetup request + UserTOTPSetup(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserTOTPVerifyWithBody request with any body + UserTOTPVerifyWithBody(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserTOTPVerify(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // VerifyUserEmailWithBody request with any body VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3252,6 +3263,54 @@ func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEdito return c.Client.Do(req) } +func (c *Client) UserTOTPDelete(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPDeleteRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserTOTPSetup(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPSetupRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserTOTPVerifyWithBody(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPVerifyRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UserTOTPVerify(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPVerifyRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewVerifyUserEmailRequestWithBody(c.Server, contentType, body) if err != nil { @@ -11904,6 +11963,117 @@ func NewCreateUserTokenRequest(server string) (*http.Request, error) { return req, nil } +// NewUserTOTPDeleteRequest generates requests for UserTOTPDelete +func NewUserTOTPDeleteRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/totp") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserTOTPSetupRequest generates requests for UserTOTPSetup +func NewUserTOTPSetupRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/totp") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserTOTPVerifyRequest calls the generic UserTOTPVerify builder with application/json body +func NewUserTOTPVerifyRequest(server string, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserTOTPVerifyRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewUserTOTPVerifyRequestWithBody generates requests for UserTOTPVerify with any type of body +func NewUserTOTPVerifyRequestWithBody(server string, params *UserTOTPVerifyParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/totp/verify") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Session != nil { + var cookieParam0 string + + cookieParam0, err = runtime.StyleParamWithLocation("simple", true, "__session", runtime.ParamLocationCookie, *params.Session) + if err != nil { + return nil, err + } + + cookie0 := &http.Cookie{ + Name: "__session", + Value: cookieParam0, + } + req.AddCookie(cookie0) + } + } + return req, nil +} + // NewVerifyUserEmailRequest calls the generic VerifyUserEmail builder with application/json body func NewVerifyUserEmailRequest(server string, body VerifyUserEmailJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -12603,6 +12773,17 @@ type ClientWithResponsesInterface interface { // CreateUserTokenWithResponse request CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) + // UserTOTPDeleteWithResponse request + UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) + + // UserTOTPSetupWithResponse request + UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) + + // UserTOTPVerifyWithBodyWithResponse request with any body + UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) + + UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) + // VerifyUserEmailWithBodyWithResponse request with any body VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) @@ -16624,6 +16805,91 @@ func (r CreateUserTokenResponse) StatusCode() int { return 0 } +type UserTOTPDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UserTOTPDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserTOTPSetupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserTOTPSetup200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UserTOTPSetupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPSetupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserTOTPVerifyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UserTOTPVerifyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPVerifyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type VerifyUserEmailResponse struct { Body []byte HTTPResponse *http.Response @@ -18542,6 +18808,41 @@ func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, r return ParseCreateUserTokenResponse(rsp) } +// UserTOTPDeleteWithResponse request returning *UserTOTPDeleteResponse +func (c *ClientWithResponses) UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) { + rsp, err := c.UserTOTPDelete(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPDeleteResponse(rsp) +} + +// UserTOTPSetupWithResponse request returning *UserTOTPSetupResponse +func (c *ClientWithResponses) UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) { + rsp, err := c.UserTOTPSetup(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPSetupResponse(rsp) +} + +// UserTOTPVerifyWithBodyWithResponse request with arbitrary body returning *UserTOTPVerifyResponse +func (c *ClientWithResponses) UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { + rsp, err := c.UserTOTPVerifyWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPVerifyResponse(rsp) +} + +func (c *ClientWithResponses) UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { + rsp, err := c.UserTOTPVerify(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPVerifyResponse(rsp) +} + // VerifyUserEmailWithBodyWithResponse request with arbitrary body returning *VerifyUserEmailResponse func (c *ClientWithResponses) VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { rsp, err := c.VerifyUserEmailWithBody(ctx, contentType, body, reqEditors...) @@ -26940,6 +27241,217 @@ func ParseCreateUserTokenResponse(rsp *http.Response) (*CreateUserTokenResponse, return response, nil } +// ParseUserTOTPDeleteResponse parses an HTTP response from a UserTOTPDeleteWithResponse call +func ParseUserTOTPDeleteResponse(rsp *http.Response) (*UserTOTPDeleteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserTOTPDeleteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUserTOTPSetupResponse parses an HTTP response from a UserTOTPSetupWithResponse call +func ParseUserTOTPSetupResponse(rsp *http.Response) (*UserTOTPSetupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserTOTPSetupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UserTOTPSetup200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUserTOTPVerifyResponse parses an HTTP response from a UserTOTPVerifyWithResponse call +func ParseUserTOTPVerifyResponse(rsp *http.Response) (*UserTOTPVerifyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UserTOTPVerifyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseVerifyUserEmailResponse parses an HTTP response from a VerifyUserEmailWithResponse call func ParseVerifyUserEmailResponse(rsp *http.Response) (*VerifyUserEmailResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 8838f90..ea49bde 100644 --- a/models.gen.go +++ b/models.gen.go @@ -3013,6 +3013,18 @@ type UserID = openapi_types.UUID // UserName The unique name for the user. type UserName = string +// UserTOTPSetup200Response defines model for UserTOTPSetup_200_response. +type UserTOTPSetup200Response struct { + Secret string `json:"secret"` + Url string `json:"url"` +} + +// UserTOTPVerifyRequest defines model for UserTOTPVerify_request. +type UserTOTPVerifyRequest struct { + Otp string `json:"otp"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // VerifyUserEmailRequest defines model for VerifyUserEmail_request. type VerifyUserEmailRequest struct { // Email Email address to verify @@ -3521,6 +3533,11 @@ type DeterminePlatformTenantByEmailParams struct { Email string `form:"email" json:"email"` } +// UserTOTPVerifyParams defines parameters for UserTOTPVerify. +type UserTOTPVerifyParams struct { + Session *string `form:"__session,omitempty" json:"__session,omitempty"` +} + // CreateAddonJSONRequestBody defines body for CreateAddon for application/json ContentType. type CreateAddonJSONRequestBody = AddonCreate @@ -3701,6 +3718,9 @@ type LoginUserJSONRequestBody = LoginUserRequest // ResetUserPasswordJSONRequestBody defines body for ResetUserPassword for application/json ContentType. type ResetUserPasswordJSONRequestBody = ResetUserPasswordRequest +// UserTOTPVerifyJSONRequestBody defines body for UserTOTPVerify for application/json ContentType. +type UserTOTPVerifyJSONRequestBody = UserTOTPVerifyRequest + // VerifyUserEmailJSONRequestBody defines body for VerifyUserEmail for application/json ContentType. type VerifyUserEmailJSONRequestBody = VerifyUserEmailRequest @@ -5626,6 +5646,72 @@ func (a UsageSummary) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for UserTOTPVerifyRequest. Returns the specified +// element and whether it was found +func (a UserTOTPVerifyRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UserTOTPVerifyRequest +func (a *UserTOTPVerifyRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UserTOTPVerifyRequest to handle AdditionalProperties +func (a *UserTOTPVerifyRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["otp"]; found { + err = json.Unmarshal(raw, &a.Otp) + if err != nil { + return fmt.Errorf("error reading 'otp': %w", err) + } + delete(object, "otp") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UserTOTPVerifyRequest to handle AdditionalProperties +func (a UserTOTPVerifyRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["otp"], err = json.Marshal(a.Otp) + if err != nil { + return nil, fmt.Errorf("error marshaling 'otp': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for VerifyUserEmailRequest. Returns the specified // element and whether it was found func (a VerifyUserEmailRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index bd0d7db..932bcfa 100644 --- a/spec.json +++ b/spec.json @@ -3796,6 +3796,142 @@ "x-internal" : true } }, + "/user/totp/verify" : { + "post" : { + "description" : "Verify a one time password for MFA", + "operationId" : "UserTOTPVerify", + "parameters" : [ { + "explode" : true, + "in" : "cookie", + "name" : "__session", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserTOTPVerify_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Multifactor authentication is complete.", + "headers" : { + "Set-Cookie" : { + "description" : "Session cookie", + "explode" : false, + "schema" : { + "example" : "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600", + "type" : "string" + }, + "style" : "simple" + } + } + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + } + }, + "/user/totp" : { + "delete" : { + "description" : "Disable MFA for the current user", + "operationId" : "UserTOTPDelete", + "parameters" : [ ], + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + }, + "post" : { + "description" : "Set up MFA for the current user", + "operationId" : "UserTOTPSetup", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserTOTPSetup_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + } + }, "/user/reset-password" : { "post" : { "description" : "Reset user password from email", @@ -11131,6 +11267,26 @@ }, "required" : [ "custom_token" ] }, + "UserTOTPVerify_request" : { + "additionalProperties" : { }, + "properties" : { + "otp" : { + "type" : "string" + } + }, + "required" : [ "otp" ] + }, + "UserTOTPSetup_200_response" : { + "properties" : { + "url" : { + "type" : "string" + }, + "secret" : { + "type" : "string" + } + }, + "required" : [ "secret", "url" ] + }, "ResetUserPassword_request" : { "additionalProperties" : { }, "properties" : { From 683c7bf7f717503e0f130ccc4f2aacd9fca5cc19 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 28 Jul 2025 10:16:52 +0100 Subject: [PATCH 291/343] fix: Generate CloudQuery Go API Client from `spec.json` (#306) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ models.gen.go | 12 ++++++++--- spec.json | 57 ++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/client.gen.go b/client.gen.go index 6077bb0..0f40680 100644 --- a/client.gen.go +++ b/client.gen.go @@ -16864,6 +16864,7 @@ func (r UserTOTPSetupResponse) StatusCode() int { type UserTOTPVerifyResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *UserTOTPVerify201Response JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden @@ -27391,6 +27392,13 @@ func ParseUserTOTPVerifyResponse(rsp *http.Response) (*UserTOTPVerifyResponse, e } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest UserTOTPVerify201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index ea49bde..b5b4e10 100644 --- a/models.gen.go +++ b/models.gen.go @@ -3019,9 +3019,15 @@ type UserTOTPSetup200Response struct { Url string `json:"url"` } +// UserTOTPVerify201Response defines model for UserTOTPVerify_201_response. +type UserTOTPVerify201Response struct { + // CustomToken Token to exchange for ID token + CustomToken string `json:"custom_token"` +} + // UserTOTPVerifyRequest defines model for UserTOTPVerify_request. type UserTOTPVerifyRequest struct { - Otp string `json:"otp"` + OTP interface{} `json:"otp"` AdditionalProperties map[string]interface{} `json:"-"` } @@ -5672,7 +5678,7 @@ func (a *UserTOTPVerifyRequest) UnmarshalJSON(b []byte) error { } if raw, found := object["otp"]; found { - err = json.Unmarshal(raw, &a.Otp) + err = json.Unmarshal(raw, &a.OTP) if err != nil { return fmt.Errorf("error reading 'otp': %w", err) } @@ -5698,7 +5704,7 @@ func (a UserTOTPVerifyRequest) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) - object["otp"], err = json.Marshal(a.Otp) + object["otp"], err = json.Marshal(a.OTP) if err != nil { return nil, fmt.Errorf("error marshaling 'otp': %w", err) } diff --git a/spec.json b/spec.json index 932bcfa..5dfb903 100644 --- a/spec.json +++ b/spec.json @@ -3730,6 +3730,34 @@ "204" : { "description" : "Authentication is complete.", "headers" : { + "Access-Control-Expose-Headers" : { + "description" : "Headers exposed to the client", + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, + "X-Cq-Mfa-Configured" : { + "description" : "Indicates if MFA is configured for the user", + "explode" : false, + "schema" : { + "enum" : [ "true", "" ], + "example" : "true", + "type" : "string" + }, + "style" : "simple" + }, + "X-Cq-Mfa-Required" : { + "description" : "Indicates if MFA is enforced", + "explode" : false, + "schema" : { + "enum" : [ "true", "" ], + "example" : "true", + "type" : "string" + }, + "style" : "simple" + }, "Set-Cookie" : { "description" : "Session cookie", "explode" : false, @@ -3820,19 +3848,15 @@ } }, "responses" : { - "204" : { - "description" : "Multifactor authentication is complete.", - "headers" : { - "Set-Cookie" : { - "description" : "Session cookie", - "explode" : false, + "201" : { + "content" : { + "application/json" : { "schema" : { - "example" : "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600", - "type" : "string" - }, - "style" : "simple" + "$ref" : "#/components/schemas/UserTOTPVerify_201_response" + } } - } + }, + "description" : "Multifactor authentication is complete." }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -11271,11 +11295,20 @@ "additionalProperties" : { }, "properties" : { "otp" : { - "type" : "string" + "x-go-name" : "OTP" } }, "required" : [ "otp" ] }, + "UserTOTPVerify_201_response" : { + "properties" : { + "custom_token" : { + "description" : "Token to exchange for ID token", + "type" : "string" + } + }, + "required" : [ "custom_token" ] + }, "UserTOTPSetup_200_response" : { "properties" : { "url" : { From f1ac7da20ab96b83aed95ebe2cc8cde3ae8457a4 Mon Sep 17 00:00:00 2001 From: Kemal <223029+disq@users.noreply.github.com> Date: Tue, 29 Jul 2025 16:39:03 +0100 Subject: [PATCH 292/343] feat: Add new config key (#307) Co-authored-by: Kemal Hadimli --- config/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/config/config.go b/config/config.go index 1d97b55..f285ce6 100644 --- a/config/config.go +++ b/config/config.go @@ -15,6 +15,7 @@ const configPath = "cloudquery/config.json" var configKeys = []string{ "team", "team_internal", + "first_sync_completed", } // SetConfigHome sets the configuration home directory - useful for testing From 36e8c5668d5d861111bec862c8be13faf59cb002 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 29 Jul 2025 16:44:24 +0100 Subject: [PATCH 293/343] chore(main): Release v1.14.0 (#302) :robot: I have created a release *beep* *boop* --- ## [1.14.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.11...v1.14.0) (2025-07-29) ### Features * Add new config key ([#307](https://github.com/cloudquery/cloudquery-api-go/issues/307)) ([f1ac7da](https://github.com/cloudquery/cloudquery-api-go/commit/f1ac7da20ab96b83aed95ebe2cc8cde3ae8457a4)) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#301](https://github.com/cloudquery/cloudquery-api-go/issues/301)) ([5975534](https://github.com/cloudquery/cloudquery-api-go/commit/59755345cde7833d65c67d9425bcd4c47b6a2856)) * Generate CloudQuery Go API Client from `spec.json` ([#303](https://github.com/cloudquery/cloudquery-api-go/issues/303)) ([a5a438d](https://github.com/cloudquery/cloudquery-api-go/commit/a5a438d68a63c72cba5b08622c5fae7576b42720)) * Generate CloudQuery Go API Client from `spec.json` ([#305](https://github.com/cloudquery/cloudquery-api-go/issues/305)) ([c479386](https://github.com/cloudquery/cloudquery-api-go/commit/c479386c885f36da1fbe7bf74f7f08e1ed544fa0)) * Generate CloudQuery Go API Client from `spec.json` ([#306](https://github.com/cloudquery/cloudquery-api-go/issues/306)) ([683c7bf](https://github.com/cloudquery/cloudquery-api-go/commit/683c7bf7f717503e0f130ccc4f2aacd9fca5cc19)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ac022f7..2ef9a1c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.11" + ".": "1.14.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0203a0e..d4e695a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [1.14.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.11...v1.14.0) (2025-07-29) + + +### Features + +* Add new config key ([#307](https://github.com/cloudquery/cloudquery-api-go/issues/307)) ([f1ac7da](https://github.com/cloudquery/cloudquery-api-go/commit/f1ac7da20ab96b83aed95ebe2cc8cde3ae8457a4)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#301](https://github.com/cloudquery/cloudquery-api-go/issues/301)) ([5975534](https://github.com/cloudquery/cloudquery-api-go/commit/59755345cde7833d65c67d9425bcd4c47b6a2856)) +* Generate CloudQuery Go API Client from `spec.json` ([#303](https://github.com/cloudquery/cloudquery-api-go/issues/303)) ([a5a438d](https://github.com/cloudquery/cloudquery-api-go/commit/a5a438d68a63c72cba5b08622c5fae7576b42720)) +* Generate CloudQuery Go API Client from `spec.json` ([#305](https://github.com/cloudquery/cloudquery-api-go/issues/305)) ([c479386](https://github.com/cloudquery/cloudquery-api-go/commit/c479386c885f36da1fbe7bf74f7f08e1ed544fa0)) +* Generate CloudQuery Go API Client from `spec.json` ([#306](https://github.com/cloudquery/cloudquery-api-go/issues/306)) ([683c7bf](https://github.com/cloudquery/cloudquery-api-go/commit/683c7bf7f717503e0f130ccc4f2aacd9fca5cc19)) + ## [1.13.11](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.10...v1.13.11) (2025-07-01) From 97e4e579cf578b9b913cac7f2ddb497fe1e244d9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 1 Aug 2025 01:55:24 +0100 Subject: [PATCH 294/343] fix(deps): Update module github.com/oapi-codegen/runtime to v1.1.2 (#308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | require | patch | `v1.1.1` -> `v1.1.2` | --- ### Release Notes
oapi-codegen/runtime (github.com/oapi-codegen/runtime) ### [`v1.1.2`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.1.2): : fixes for `map`s and `x-go-type-skip-optional-pointer` [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.1.1...v1.1.2) #### 🐛 Bug fixes - Fix [#​70](https://redirect.github.com/oapi-codegen/runtime/issues/70): Use %w formatting directives when fmt.Error'ing an error. ([#​71](https://redirect.github.com/oapi-codegen/runtime/issues/71)) [@​constantoine](https://redirect.github.com/constantoine) - Fix BindQueryParameter for optional parameters ([#​48](https://redirect.github.com/oapi-codegen/runtime/issues/48)) [@​TelpeNight](https://redirect.github.com/TelpeNight) - fix: make BindQueryParameter play along with x-go-type-skip-optional-pointer ([#​47](https://redirect.github.com/oapi-codegen/runtime/issues/47)) [@​swistakm](https://redirect.github.com/swistakm) - fix: correctly handle `map`s with different value types when binding ([#​38](https://redirect.github.com/oapi-codegen/runtime/issues/38)) [@​andnow873](https://redirect.github.com/andnow873) #### 👻 Maintenance - docs(sponsors): add `FUNDING.yml` ([#​46](https://redirect.github.com/oapi-codegen/runtime/issues/46)) [@​jamietanna](https://redirect.github.com/jamietanna) - Simplify CI build matrix + build against Go 1.22 ([#​33](https://redirect.github.com/oapi-codegen/runtime/issues/33)) [@​jamietanna](https://redirect.github.com/jamietanna) #### 📦 Dependency updates - chore(deps): pin dependencies ([#​63](https://redirect.github.com/oapi-codegen/runtime/issues/63)) [@​renovate](https://redirect.github.com/renovate) #### Sponsors We would like to thank our sponsors for their support during this release.

DevZero logo

Speakeasy logo

Elastic logo

Cybozu logo

Livepeer logo

--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7ce6497..ea2da04 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.23.10 require ( github.com/adrg/xdg v0.5.3 github.com/hashicorp/go-retryablehttp v0.7.8 - github.com/oapi-codegen/runtime v1.1.1 + github.com/oapi-codegen/runtime v1.1.2 github.com/stretchr/testify v1.10.0 ) diff --git a/go.sum b/go.sum index 3496d7d..4c01284 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= -github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= +github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI= +github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= From cedaa274d12bbfb76ea522858df2e90a7b0923af Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 1 Aug 2025 01:58:14 +0100 Subject: [PATCH 295/343] chore(deps): Update dependency golangci/golangci-lint to v2.3.0 (#309) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.1.6` -> `v2.3.0` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.3.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v230) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.2.2...v2.3.0) 1. Linters new features or changes - `ginkgolinter`: from 0.19.1 to 0.20.0 (new option: `force-assertion-description`) - `iface`: from 1.4.0 to 1.4.1 (report message improvements) - `noctx`: from 0.3.4 to 0.3.5 (new detections: `log/slog`, `exec`, `crypto/tls`) - `revive`: from 1.10.0 to 1.11.0 (new rule: `enforce-switch-style`) - `wsl`: from 5.0.0 to 5.1.0 2. Linters bug fixes - `gosec`: from 2.22.5 to 2.22.6 - `noinlineerr`: from 1.0.4 to 1.0.5 - `sloglint`: from 0.11.0 to 0.11.1 3. Misc. - fix: panic close of closed channel ### [`v2.2.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v222) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.2.1...v2.2.2) 1. Linters bug fixes - `noinlineerr`: from 1.0.3 to 1.0.4 2. Documentation - Improve debug keys documentation 3. Misc. - fix: panic close of closed channel - godot: add noinline value into the JSONSchema ### [`v2.2.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v221) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.2.0...v2.2.1) 1. Linters bug fixes - `varnamelen`: fix configuration ### [`v2.2.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v220) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.1.6...v2.2.0) 1. New linters - Add `arangolint` linter https://github.com/Crocmagnon/arangolint - Add `embeddedstructfieldcheck` linter https://github.com/manuelarte/embeddedstructfieldcheck - Add `noinlineerr` linter https://github.com/AlwxSin/noinlineerr - Add `swaggo` formatter https://github.com/golangci/swaggoswag 2. Linters new features or changes - `errcheck`: add `verbose` option - `funcorder`: from 0.2.1 to 0.5.0 (new option `alphabetical`) - `gomoddirectives`: from 0.6.1 to 0.7.0 (new option `ignore-forbidden`) - `iface`: from 1.3.1 to 1.4.0 (new option `unexported`) - `noctx`: from 0.1.0 to 0.3.3 (new report messages, and new rules related to `database/sql`) - `noctx`: from 0.3.3 to 0.3.4 (new SQL functions detection) - `revive`: from 1.9.0 to 1.10.0 (new rules: `time-date`, `unnecessary-format`, `use-fmt-print`) - `usestdlibvars`: from 1.28.0 to 1.29.0 (new option `time-date-month`) - `wsl`: deprecation - `wsl_v5`: from 4.7.0 to 5.0.0 (major version with new configuration) 3. Linters bug fixes - `dupword`: from 0.1.3 to 0.1.6 - `exptostd`: from 0.4.3 to 0.4.4 - `forbidigo`: from 1.6.0 to 2.1.0 - `gci`: consistently format the code - `go-spancheck`: from 0.6.4 to 0.6.5 - `goconst`: from 1.8.1 to 1.8.2 - `gosec`: from 2.22.3 to 2.22.4 - `gosec`: from 2.22.4 to 2.22.5 - `makezero`: from 1.2.0 to 2.0.1 - `misspell`: from 0.6.0 to 0.7.0 - `usetesting`: from 0.4.3 to 0.5.0 4. Misc. - exclusions: fix `path-expect` - formatters: write the input to `stdout` when using `stdin` and there are no changes - migration: improve the error message when trying to migrate a migrated config - `typecheck`: deduplicate errors - `typecheck`: stops the analysis after the first error - Deprecate `print-resources-usage` flag - Unique version per custom build 5. Documentation - Improves typecheck FAQ - Adds plugin systems recommendations - Add description for `linters.default` sets
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index c20973e..f9828eb 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v7 with: - version: v2.1.6 + version: v2.3.0 From 40d8b730b9913175062612fcd00f72a50c2e1982 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 1 Aug 2025 09:17:29 +0100 Subject: [PATCH 296/343] chore(deps): Update golangci/golangci-lint-action action to v8 (#311) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [golangci/golangci-lint-action](https://redirect.github.com/golangci/golangci-lint-action) | action | major | `v7` -> `v8` | --- ### Release Notes
golangci/golangci-lint-action (golangci/golangci-lint-action) ### [`v8`](https://redirect.github.com/golangci/golangci-lint-action/compare/v7...v8) [Compare Source](https://redirect.github.com/golangci/golangci-lint-action/compare/v7...v8)
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index f9828eb..1c31b3b 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -18,6 +18,6 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v8 with: version: v2.3.0 From 60aca38b16ea0be3351011fbb18885d9e04f277f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 1 Aug 2025 09:21:19 +0100 Subject: [PATCH 297/343] chore(main): Release v1.14.1 (#310) :robot: I have created a release *beep* *boop* --- ## [1.14.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.0...v1.14.1) (2025-08-01) ### Bug Fixes * **deps:** Update module github.com/oapi-codegen/runtime to v1.1.2 ([#308](https://github.com/cloudquery/cloudquery-api-go/issues/308)) ([97e4e57](https://github.com/cloudquery/cloudquery-api-go/commit/97e4e579cf578b9b913cac7f2ddb497fe1e244d9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ef9a1c..77566c0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.0" + ".": "1.14.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d4e695a..c7f0fa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.14.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.0...v1.14.1) (2025-08-01) + + +### Bug Fixes + +* **deps:** Update module github.com/oapi-codegen/runtime to v1.1.2 ([#308](https://github.com/cloudquery/cloudquery-api-go/issues/308)) ([97e4e57](https://github.com/cloudquery/cloudquery-api-go/commit/97e4e579cf578b9b913cac7f2ddb497fe1e244d9)) + ## [1.14.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.11...v1.14.0) (2025-07-29) From cc2862fbebdda98bedbab5eb36478de4bb975bfb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 5 Aug 2025 14:58:18 +0100 Subject: [PATCH 298/343] fix: Generate CloudQuery Go API Client from `spec.json` (#312) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/models.gen.go b/models.gen.go index b5b4e10..e2c440b 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1957,6 +1957,9 @@ type PluginVersionDetails struct { // UIBaseURL Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. UIBaseURL *string `json:"ui_base_url,omitempty"` + // UIBaseURLv2 Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. + UIBaseURLv2 *string `json:"ui_base_url_v2,omitempty"` + // UIID ID of the plugin's UI. UIID *openapi_types.UUID `json:"ui_id,omitempty"` } diff --git a/spec.json b/spec.json index 5dfb903..423155d 100644 --- a/spec.json +++ b/spec.json @@ -7897,6 +7897,11 @@ "type" : "string", "x-go-name" : "UIBaseURL" }, + "ui_base_url_v2" : { + "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", + "type" : "string", + "x-go-name" : "UIBaseURLv2" + }, "ui_id" : { "description" : "ID of the plugin's UI.", "format" : "uuid", From 0b6a3cebbf2aa5eb07bf8bb787fe592680a0f560 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:24:26 +0100 Subject: [PATCH 299/343] fix: Generate CloudQuery Go API Client from `spec.json` (#314) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 335 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 15 +++ spec.json | 102 +++++++++++++++ 3 files changed, 452 insertions(+) diff --git a/client.gen.go b/client.gen.go index 0f40680..b0d9ffc 100644 --- a/client.gen.go +++ b/client.gen.go @@ -440,6 +440,14 @@ type ClientInterface interface { // DownloadPluginAssetByTeam request DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetSettings request + GetSettings(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSettingsWithBody request with any body + UpdateSettingsWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSettings(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamSpend request GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2231,6 +2239,42 @@ func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamNam return c.Client.Do(req) } +func (c *Client) GetSettings(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSettingsRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSettingsWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSettingsRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateSettings(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSettingsRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTeamSpendRequest(c.Server, teamName, params) if err != nil { @@ -8669,6 +8713,87 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return req, nil } +// NewGetSettingsRequest generates requests for GetSettings +func NewGetSettingsRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateSettingsRequest calls the generic UpdateSettings builder with application/json body +func NewUpdateSettingsRequest(server string, teamName TeamName, body UpdateSettingsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSettingsRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewUpdateSettingsRequestWithBody generates requests for UpdateSettings with any type of body +func NewUpdateSettingsRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewGetTeamSpendRequest generates requests for GetTeamSpend func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpendParams) (*http.Request, error) { var err error @@ -12538,6 +12663,14 @@ type ClientWithResponsesInterface interface { // DownloadPluginAssetByTeamWithResponse request DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + // GetSettingsWithResponse request + GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) + + // UpdateSettingsWithBodyWithResponse request with any body + UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) + + UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) + // GetTeamSpendWithResponse request GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) @@ -15162,6 +15295,60 @@ func (r DownloadPluginAssetByTeamResponse) StatusCode() int { return 0 } +type GetSettingsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Settings + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSettingsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSettingsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSettingsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Settings + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSettingsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSettingsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetTeamSpendResponse struct { Body []byte HTTPResponse *http.Response @@ -18058,6 +18245,32 @@ func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context. return ParseDownloadPluginAssetByTeamResponse(rsp) } +// GetSettingsWithResponse request returning *GetSettingsResponse +func (c *ClientWithResponses) GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) { + rsp, err := c.GetSettings(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSettingsResponse(rsp) +} + +// UpdateSettingsWithBodyWithResponse request with arbitrary body returning *UpdateSettingsResponse +func (c *ClientWithResponses) UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { + rsp, err := c.UpdateSettingsWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSettingsResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { + rsp, err := c.UpdateSettings(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSettingsResponse(rsp) +} + // GetTeamSpendWithResponse request returning *GetTeamSpendResponse func (c *ClientWithResponses) GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) { rsp, err := c.GetTeamSpend(ctx, teamName, params, reqEditors...) @@ -23802,6 +24015,128 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } +// ParseGetSettingsResponse parses an HTTP response from a GetSettingsWithResponse call +func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSettingsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Settings + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateSettingsResponse parses an HTTP response from a UpdateSettingsWithResponse call +func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateSettingsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Settings + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseGetTeamSpendResponse parses an HTTP response from a GetTeamSpendWithResponse call func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index e2c440b..5bc3905 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2110,6 +2110,18 @@ type SendUserEventRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// Settings Platform settings definition +type Settings struct { + // EnforceMfa Whether or not to require MFA for all users + EnforceMfa bool `json:"enforce_mfa"` +} + +// SettingsUpdate Platform settings partial update +type SettingsUpdate struct { + // EnforceMfa Whether or not to require MFA for all users + EnforceMfa *bool `json:"enforce_mfa,omitempty"` +} + // SpendSummary A spend summary for a team, summarizing the spend by each price category over a given time range. // Note that empty or all-zero values are not included in the response. type SpendSummary struct { @@ -3658,6 +3670,9 @@ type CreateManagedDatabaseJSONRequestBody = ManagedDatabaseCreate // RemoveTeamMembershipJSONRequestBody defines body for RemoveTeamMembership for application/json ContentType. type RemoveTeamMembershipJSONRequestBody = RemoveTeamMembershipRequest +// UpdateSettingsJSONRequestBody defines body for UpdateSettings for application/json ContentType. +type UpdateSettingsJSONRequestBody = SettingsUpdate + // CreateSpendingLimitJSONRequestBody defines body for CreateSpendingLimit for application/json ContentType. type CreateSpendingLimitJSONRequestBody = SpendingLimitCreate diff --git a/spec.json b/spec.json index 423155d..7a0c3ec 100644 --- a/spec.json +++ b/spec.json @@ -3578,6 +3578,87 @@ "tags" : [ "teams" ] } }, + "/teams/{team_name}/settings" : { + "get" : { + "description" : "Show current platform settings", + "operationId" : "GetSettings", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Settings" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "admin" ] + }, + "patch" : { + "description" : "Update platform settings", + "operationId" : "UpdateSettings", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SettingsUpdate" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Settings" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "admin" ] + } + }, "/user" : { "get" : { "description" : "Get the current authenticated user from the OAuth token\n", @@ -9303,6 +9384,27 @@ "required" : [ "cancel_url", "plan", "success_url" ], "title" : "Create team subscription order" }, + "Settings" : { + "description" : "Platform settings definition", + "properties" : { + "enforce_mfa" : { + "default" : false, + "description" : "Whether or not to require MFA for all users", + "type" : "boolean" + } + }, + "required" : [ "enforce_mfa" ] + }, + "SettingsUpdate" : { + "description" : "Platform settings partial update", + "properties" : { + "enforce_mfa" : { + "default" : false, + "description" : "Whether or not to require MFA for all users", + "type" : "boolean" + } + } + }, "InvitationWithToken" : { "additionalProperties" : false, "allOf" : [ { From 333da2f089882153b7caac806a95750cffc9d4c3 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 27 Aug 2025 14:23:05 +0100 Subject: [PATCH 300/343] chore(deps): Update dependency golangci/golangci-lint to v2.4.0 (#315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.3.0` -> `v2.4.0` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.4.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v240) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.3.1...v2.4.0) 1. Enhancements - 🎉 go1.25 support 2. Linters new features or changes - `exhaustruct`: from v3.3.1 to 4.0.0 (new options: `allow-empty`, `allow-empty-rx`, `allow-empty-returns`, `allow-empty-declarations`) 3. Linters bug fixes - `godox`: trim filepath from report messages - `staticcheck`: allow empty options - `tagalign`: from 1.4.2 to 1.4.3 4. Documentation - 🌟 New website (with a search engine) ### [`v2.3.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v231) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.3.0...v2.3.1) 1. Linters bug fixes - `gci`: from 0.13.6 to 0.13.7 - `gosec`: from 2.22.6 to 2.22.7 - `noctx`: from 0.3.5 to 0.4.0 - `wsl`: from 5.1.0 to 5.1.1 - tagliatelle: force upper case for custom initialisms
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 1c31b3b..1ba574e 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -20,4 +20,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.3.0 + version: v2.4.0 From 7075581aaa9fcfb4de308339e5aeb2787cf7c4a9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 27 Aug 2025 14:25:36 +0100 Subject: [PATCH 301/343] chore(deps): Update actions/checkout action to v5 (#316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://redirect.github.com/actions/checkout) | action | major | `v4` -> `v5` | --- ### Release Notes
actions/checkout (actions/checkout) ### [`v5`](https://redirect.github.com/actions/checkout/compare/v4...v5) [Compare Source](https://redirect.github.com/actions/checkout/compare/v4...v5)
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- .github/workflows/lint_golang.yml | 2 +- .github/workflows/unittest.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index dfba209..582343e 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: token: ${{ secrets.GH_CQ_BOT }} diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 1ba574e..e624a24 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-go@v5 with: go-version-file: go.mod diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 2dff847..29ba9ee 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -17,7 +17,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Go 1.x uses: actions/setup-go@v5 with: From 21673f6d91f4af4c6f487c7f7439c36208e88339 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 28 Aug 2025 16:17:25 +0100 Subject: [PATCH 302/343] fix: Generate CloudQuery Go API Client from `spec.json` (#317) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ models.gen.go | 6 +++++- spec.json | 11 ++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/client.gen.go b/client.gen.go index b0d9ffc..26e8a05 100644 --- a/client.gen.go +++ b/client.gen.go @@ -14460,6 +14460,7 @@ type CreateTeamAPIKeyResponse struct { JSON201 *APIKey JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON422 *UnprocessableEntity JSON500 *InternalError } @@ -14485,6 +14486,7 @@ type DeleteTeamAPIKeyResponse struct { HTTPResponse *http.Response JSON400 *BadRequest JSON401 *RequiresAuthentication + JSON403 *Forbidden JSON404 *NotFound JSON500 *InternalError } @@ -22259,6 +22261,13 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22306,6 +22315,13 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index 5bc3905..1e24032 100644 --- a/models.gen.go +++ b/models.gen.go @@ -19,7 +19,8 @@ const ( // Defines values for APIKeyScope. const ( - APIKeyScopeReadAndWrite APIKeyScope = "read-and-write" + APIKeyScopeReadAndWrite APIKeyScope = "read-and-write" + APIKeyScopeSyncsOperationsOnly APIKeyScope = "syncs-operations-only" ) // Defines values for AddonCategory. @@ -915,6 +916,9 @@ type CreateTeamAPIKeyRequest struct { // Name Name of the API key Name APIKeyName `json:"name"` + + // Scope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins + Scope *APIKeyScope `json:"scope,omitempty"` } // CreateTeamImages201Response defines model for CreateTeamImages_201_response. diff --git a/spec.json b/spec.json index 7a0c3ec..09e1c26 100644 --- a/spec.json +++ b/spec.json @@ -4425,6 +4425,9 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, @@ -4454,6 +4457,9 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "404" : { "$ref" : "#/components/responses/NotFound" }, @@ -9461,7 +9467,7 @@ }, "APIKeyScope" : { "description" : "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", - "enum" : [ "read-and-write" ], + "enum" : [ "read-and-write", "syncs-operations-only" ], "type" : "string" }, "APIKey" : { @@ -11590,6 +11596,9 @@ "expires_at" : { "format" : "date-time", "type" : "string" + }, + "scope" : { + "$ref" : "#/components/schemas/APIKeyScope" } }, "required" : [ "expires_at", "name" ] From 5e7bd4e3688ffec36ac88501c5e4c5c50a552786 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 1 Sep 2025 01:50:02 +0100 Subject: [PATCH 303/343] fix(deps): Update module github.com/stretchr/testify to v1.11.0 (#318) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [github.com/stretchr/testify](https://redirect.github.com/stretchr/testify) | require | minor | `v1.10.0` -> `v1.11.0` | `v1.11.1` | --- ### Release Notes
stretchr/testify (github.com/stretchr/testify) ### [`v1.11.0`](https://redirect.github.com/stretchr/testify/releases/tag/v1.11.0) [Compare Source](https://redirect.github.com/stretchr/testify/compare/v1.10.0...v1.11.0) ##### What's Changed ##### Functional Changes v1.11.0 Includes a number of performance improvements. - Call stack perf change for CallerInfo by [@​mikeauclair](https://redirect.github.com/mikeauclair) in [https://github.com/stretchr/testify/pull/1614](https://redirect.github.com/stretchr/testify/pull/1614) - Lazily render mock diff output on successful match by [@​mikeauclair](https://redirect.github.com/mikeauclair) in [https://github.com/stretchr/testify/pull/1615](https://redirect.github.com/stretchr/testify/pull/1615) - assert: check early in Eventually, EventuallyWithT, and Never by [@​cszczepaniak](https://redirect.github.com/cszczepaniak) in [https://github.com/stretchr/testify/pull/1427](https://redirect.github.com/stretchr/testify/pull/1427) - assert: add IsNotType by [@​bartventer](https://redirect.github.com/bartventer) in [https://github.com/stretchr/testify/pull/1730](https://redirect.github.com/stretchr/testify/pull/1730) - assert.JSONEq: shortcut if same strings by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1754](https://redirect.github.com/stretchr/testify/pull/1754) - assert.YAMLEq: shortcut if same strings by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1755](https://redirect.github.com/stretchr/testify/pull/1755) - assert: faster and simpler isEmpty using reflect.Value.IsZero by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1761](https://redirect.github.com/stretchr/testify/pull/1761) - suite: faster methods filtering (internal refactor) by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1758](https://redirect.github.com/stretchr/testify/pull/1758) ##### Fixes - assert.ErrorAs: log target type by [@​craig65535](https://redirect.github.com/craig65535) in [https://github.com/stretchr/testify/pull/1345](https://redirect.github.com/stretchr/testify/pull/1345) - Fix failure message formatting for Positive and Negative asserts in [https://github.com/stretchr/testify/pull/1062](https://redirect.github.com/stretchr/testify/pull/1062) - Improve ErrorIs message when error is nil but an error was expected by [@​tsioftas](https://redirect.github.com/tsioftas) in [https://github.com/stretchr/testify/pull/1681](https://redirect.github.com/stretchr/testify/pull/1681) - fix Subset/NotSubset when calling with mixed input types by [@​siliconbrain](https://redirect.github.com/siliconbrain) in [https://github.com/stretchr/testify/pull/1729](https://redirect.github.com/stretchr/testify/pull/1729) - Improve ErrorAs failure message when error is nil by [@​ccoVeille](https://redirect.github.com/ccoVeille) in [https://github.com/stretchr/testify/pull/1734](https://redirect.github.com/stretchr/testify/pull/1734) - mock.AssertNumberOfCalls: improve error msg by [@​3scalation](https://redirect.github.com/3scalation) in [https://github.com/stretchr/testify/pull/1743](https://redirect.github.com/stretchr/testify/pull/1743) ##### Documentation, Build & CI - docs: Fix typo in README by [@​alexandear](https://redirect.github.com/alexandear) in [https://github.com/stretchr/testify/pull/1688](https://redirect.github.com/stretchr/testify/pull/1688) - Replace deprecated io/ioutil with io and os by [@​alexandear](https://redirect.github.com/alexandear) in [https://github.com/stretchr/testify/pull/1684](https://redirect.github.com/stretchr/testify/pull/1684) - Document consequences of calling t.FailNow() by [@​greg0ire](https://redirect.github.com/greg0ire) in [https://github.com/stretchr/testify/pull/1710](https://redirect.github.com/stretchr/testify/pull/1710) - chore: update docs for Unset [#​1621](https://redirect.github.com/stretchr/testify/issues/1621) by [@​techfg](https://redirect.github.com/techfg) in [https://github.com/stretchr/testify/pull/1709](https://redirect.github.com/stretchr/testify/pull/1709) - README: apply gofmt to examples by [@​alexandear](https://redirect.github.com/alexandear) in [https://github.com/stretchr/testify/pull/1687](https://redirect.github.com/stretchr/testify/pull/1687) - refactor: use %q and %T to simplify fmt.Sprintf by [@​alexandear](https://redirect.github.com/alexandear) in [https://github.com/stretchr/testify/pull/1674](https://redirect.github.com/stretchr/testify/pull/1674) - Propose Christophe Colombier (ccoVeille) as approver by [@​brackendawson](https://redirect.github.com/brackendawson) in [https://github.com/stretchr/testify/pull/1716](https://redirect.github.com/stretchr/testify/pull/1716) - Update documentation for the Error function in assert or require package by [@​architagr](https://redirect.github.com/architagr) in [https://github.com/stretchr/testify/pull/1675](https://redirect.github.com/stretchr/testify/pull/1675) - assert: remove deprecated build constraints by [@​alexandear](https://redirect.github.com/alexandear) in [https://github.com/stretchr/testify/pull/1671](https://redirect.github.com/stretchr/testify/pull/1671) - assert: apply gofumpt to internal test suite by [@​ccoVeille](https://redirect.github.com/ccoVeille) in [https://github.com/stretchr/testify/pull/1739](https://redirect.github.com/stretchr/testify/pull/1739) - CI: fix shebang in .ci.\*.sh scripts by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1746](https://redirect.github.com/stretchr/testify/pull/1746) - assert,require: enable parallel testing on (almost) all top tests by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1747](https://redirect.github.com/stretchr/testify/pull/1747) - suite.Passed: add one more status test report by [@​Ararsa-Derese](https://redirect.github.com/Ararsa-Derese) in [https://github.com/stretchr/testify/pull/1706](https://redirect.github.com/stretchr/testify/pull/1706) - Add Helper() method in internal mocks and assert.CollectT by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1423](https://redirect.github.com/stretchr/testify/pull/1423) - assert.Same/NotSame: improve usage of Sprintf by [@​ccoVeille](https://redirect.github.com/ccoVeille) in [https://github.com/stretchr/testify/pull/1742](https://redirect.github.com/stretchr/testify/pull/1742) - mock: enable parallel testing on internal testsuite by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1756](https://redirect.github.com/stretchr/testify/pull/1756) - suite: cleanup use of 'testing' internals at runtime by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1751](https://redirect.github.com/stretchr/testify/pull/1751) - assert: check test failure message for Empty and NotEmpty by [@​ccoVeille](https://redirect.github.com/ccoVeille) in [https://github.com/stretchr/testify/pull/1745](https://redirect.github.com/stretchr/testify/pull/1745) - deps: fix dependency cycle with objx (again) by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1567](https://redirect.github.com/stretchr/testify/pull/1567) - assert.Empty: comprehensive doc of "Empty"-ness rules by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1753](https://redirect.github.com/stretchr/testify/pull/1753) - doc: improve godoc of top level 'testify' package by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1760](https://redirect.github.com/stretchr/testify/pull/1760) - assert.ErrorAs: simplify retrieving the type name by [@​ccoVeille](https://redirect.github.com/ccoVeille) in [https://github.com/stretchr/testify/pull/1740](https://redirect.github.com/stretchr/testify/pull/1740) - assert.EqualValues: improve test coverage to 100% by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1763](https://redirect.github.com/stretchr/testify/pull/1763) - suite.Run: simplify running of Setup/TeardownSuite by [@​renzoarreaza](https://redirect.github.com/renzoarreaza) in [https://github.com/stretchr/testify/pull/1769](https://redirect.github.com/stretchr/testify/pull/1769) - assert.CallerInfo: micro optimization by using LastIndexByte by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1767](https://redirect.github.com/stretchr/testify/pull/1767) - assert.CallerInfo: micro cleanup by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1768](https://redirect.github.com/stretchr/testify/pull/1768) - assert: refactor Test*FileExists and Test*DirExists tests to enable parallel testing by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1766](https://redirect.github.com/stretchr/testify/pull/1766) - suite.Run: refactor handling of stats for improved readability by [@​dolmen](https://redirect.github.com/dolmen) in [https://github.com/stretchr/testify/pull/1764](https://redirect.github.com/stretchr/testify/pull/1764) - tests: improve captureTestingT helper by [@​ccoVeille](https://redirect.github.com/ccoVeille) in [https://github.com/stretchr/testify/pull/1741](https://redirect.github.com/stretchr/testify/pull/1741) - build(deps): bump actions/checkout from 4 to 5 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in[https://github.com/stretchr/testify/pull/1778](https://redirect.github.com/stretchr/testify/pull/1778)8 ##### New Contributors - [@​greg0ire](https://redirect.github.com/greg0ire) made their first contribution in [https://github.com/stretchr/testify/pull/1710](https://redirect.github.com/stretchr/testify/pull/1710) - [@​techfg](https://redirect.github.com/techfg) made their first contribution in [https://github.com/stretchr/testify/pull/1709](https://redirect.github.com/stretchr/testify/pull/1709) - [@​mikeauclair](https://redirect.github.com/mikeauclair) made their first contribution in [https://github.com/stretchr/testify/pull/1614](https://redirect.github.com/stretchr/testify/pull/1614) - [@​cszczepaniak](https://redirect.github.com/cszczepaniak) made their first contribution in [https://github.com/stretchr/testify/pull/1427](https://redirect.github.com/stretchr/testify/pull/1427) - [@​architagr](https://redirect.github.com/architagr) made their first contribution in [https://github.com/stretchr/testify/pull/1675](https://redirect.github.com/stretchr/testify/pull/1675) - [@​tsioftas](https://redirect.github.com/tsioftas) made their first contribution in [https://github.com/stretchr/testify/pull/1681](https://redirect.github.com/stretchr/testify/pull/1681) - [@​siliconbrain](https://redirect.github.com/siliconbrain) made their first contribution in [https://github.com/stretchr/testify/pull/1729](https://redirect.github.com/stretchr/testify/pull/1729) - [@​bartventer](https://redirect.github.com/bartventer) made their first contribution in [https://github.com/stretchr/testify/pull/1730](https://redirect.github.com/stretchr/testify/pull/1730) - [@​Ararsa-Derese](https://redirect.github.com/Ararsa-Derese) made their first contribution in [https://github.com/stretchr/testify/pull/1706](https://redirect.github.com/stretchr/testify/pull/1706) - [@​renzoarreaza](https://redirect.github.com/renzoarreaza) made their first contribution in [https://github.com/stretchr/testify/pull/1769](https://redirect.github.com/stretchr/testify/pull/1769) - [@​3scalation](https://redirect.github.com/3scalation) made their first contribution in [https://github.com/stretchr/testify/pull/1743](https://redirect.github.com/stretchr/testify/pull/1743) **Full Changelog**: https://github.com/stretchr/testify/compare/v1.10.0...v1.11.0
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ea2da04..0356506 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/adrg/xdg v0.5.3 github.com/hashicorp/go-retryablehttp v0.7.8 github.com/oapi-codegen/runtime v1.1.2 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.0 ) require ( diff --git a/go.sum b/go.sum index 4c01284..c4ed130 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8= +github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From aabd892dd7eb7a6d5e613bdaccd3becfbd70a8eb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:17:38 +0100 Subject: [PATCH 304/343] chore(main): Release v1.14.2 (#313) :robot: I have created a release *beep* *boop* --- ## [1.14.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.1...v1.14.2) (2025-09-01) ### Bug Fixes * **deps:** Update module github.com/stretchr/testify to v1.11.0 ([#318](https://github.com/cloudquery/cloudquery-api-go/issues/318)) ([5e7bd4e](https://github.com/cloudquery/cloudquery-api-go/commit/5e7bd4e3688ffec36ac88501c5e4c5c50a552786)) * Generate CloudQuery Go API Client from `spec.json` ([#312](https://github.com/cloudquery/cloudquery-api-go/issues/312)) ([cc2862f](https://github.com/cloudquery/cloudquery-api-go/commit/cc2862fbebdda98bedbab5eb36478de4bb975bfb)) * Generate CloudQuery Go API Client from `spec.json` ([#314](https://github.com/cloudquery/cloudquery-api-go/issues/314)) ([0b6a3ce](https://github.com/cloudquery/cloudquery-api-go/commit/0b6a3cebbf2aa5eb07bf8bb787fe592680a0f560)) * Generate CloudQuery Go API Client from `spec.json` ([#317](https://github.com/cloudquery/cloudquery-api-go/issues/317)) ([21673f6](https://github.com/cloudquery/cloudquery-api-go/commit/21673f6d91f4af4c6f487c7f7439c36208e88339)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 77566c0..3086963 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.1" + ".": "1.14.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f0fa2..454b689 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [1.14.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.1...v1.14.2) (2025-09-01) + + +### Bug Fixes + +* **deps:** Update module github.com/stretchr/testify to v1.11.0 ([#318](https://github.com/cloudquery/cloudquery-api-go/issues/318)) ([5e7bd4e](https://github.com/cloudquery/cloudquery-api-go/commit/5e7bd4e3688ffec36ac88501c5e4c5c50a552786)) +* Generate CloudQuery Go API Client from `spec.json` ([#312](https://github.com/cloudquery/cloudquery-api-go/issues/312)) ([cc2862f](https://github.com/cloudquery/cloudquery-api-go/commit/cc2862fbebdda98bedbab5eb36478de4bb975bfb)) +* Generate CloudQuery Go API Client from `spec.json` ([#314](https://github.com/cloudquery/cloudquery-api-go/issues/314)) ([0b6a3ce](https://github.com/cloudquery/cloudquery-api-go/commit/0b6a3cebbf2aa5eb07bf8bb787fe592680a0f560)) +* Generate CloudQuery Go API Client from `spec.json` ([#317](https://github.com/cloudquery/cloudquery-api-go/issues/317)) ([21673f6](https://github.com/cloudquery/cloudquery-api-go/commit/21673f6d91f4af4c6f487c7f7439c36208e88339)) + ## [1.14.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.0...v1.14.1) (2025-08-01) From b68800f58be3ed6d819e6eedeee08d3404642004 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 10 Sep 2025 09:33:00 +0100 Subject: [PATCH 305/343] fix: Generate CloudQuery Go API Client from `spec.json` (#319) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec.json b/spec.json index 09e1c26..cbc3747 100644 --- a/spec.json +++ b/spec.json @@ -9663,8 +9663,9 @@ "example" : "Human Readable Name", "maxLength" : 255, "minLength" : 1, - "pattern" : "^[a-zA-Z\\p{L}\\p{N}_][a-zA-Z\\p{L}\\p{N}_ \\-']*$", - "type" : "string" + "pattern" : "^[a-zA-Z\\p{L}\\p{N}_][a-zA-Z\\p{L}\\p{N}_ \\-'\\(\\)\\[\\]]*$", + "type" : "string", + "x-pattern-message" : "can contain only letters, numbers, spaces, hyphens, underscores, brackets and apostrophes" }, "PromoteSyncSourceTestConnection" : { "description" : "Sync Source Definition", From 88f276fde79752059ffaee10e95524f831b8c8ff Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:34:05 +0100 Subject: [PATCH 306/343] fix: Generate CloudQuery Go API Client from `spec.json` (#321) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 388 ++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 441 ++++++++++++++++++++++++++++++++++++++++++++++++++ spec.json | 192 ++++++++++++++++++++++ 3 files changed, 1021 insertions(+) diff --git a/client.gen.go b/client.gen.go index 26e8a05..73626f9 100644 --- a/client.gen.go +++ b/client.gen.go @@ -313,6 +313,16 @@ type ClientInterface interface { // DownloadAddonAssetByTeam request DownloadAddonAssetByTeam(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // AIOnboardingChatWithBody request with any body + AIOnboardingChatWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AIOnboardingChat(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AIOnboardingNewConversationWithBody request with any body + AIOnboardingNewConversationWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AIOnboardingNewConversation(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListTeamAPIKeys request ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1675,6 +1685,54 @@ func (c *Client) DownloadAddonAssetByTeam(ctx context.Context, teamName TeamName return c.Client.Do(req) } +func (c *Client) AIOnboardingChatWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingChatRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AIOnboardingChat(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingChatRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AIOnboardingNewConversationWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingNewConversationRequestWithBody(c.Server, teamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) AIOnboardingNewConversation(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingNewConversationRequest(c.Server, teamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListTeamAPIKeysRequest(c.Server, teamName, params) if err != nil { @@ -6933,6 +6991,100 @@ func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonT return req, nil } +// NewAIOnboardingChatRequest calls the generic AIOnboardingChat builder with application/json body +func NewAIOnboardingChatRequest(server string, teamName string, body AIOnboardingChatJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAIOnboardingChatRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAIOnboardingChatRequestWithBody generates requests for AIOnboardingChat with any type of body +func NewAIOnboardingChatRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/chat", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAIOnboardingNewConversationRequest calls the generic AIOnboardingNewConversation builder with application/json body +func NewAIOnboardingNewConversationRequest(server string, teamName string, body AIOnboardingNewConversationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAIOnboardingNewConversationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAIOnboardingNewConversationRequestWithBody generates requests for AIOnboardingNewConversation with any type of body +func NewAIOnboardingNewConversationRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { var err error @@ -12536,6 +12688,16 @@ type ClientWithResponsesInterface interface { // DownloadAddonAssetByTeamWithResponse request DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + // AIOnboardingChatWithBodyWithResponse request with any body + AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) + + AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) + + // AIOnboardingNewConversationWithBodyWithResponse request with any body + AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) + + AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) + // ListTeamAPIKeysWithResponse request ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) @@ -14429,6 +14591,62 @@ func (r DownloadAddonAssetByTeamResponse) StatusCode() int { return 0 } +type AIOnboardingChatResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingChat200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AIOnboardingChatResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingChatResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AIOnboardingNewConversationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingNewConversation200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AIOnboardingNewConversationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingNewConversationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListTeamAPIKeysResponse struct { Body []byte HTTPResponse *http.Response @@ -17838,6 +18056,40 @@ func (c *ClientWithResponses) DownloadAddonAssetByTeamWithResponse(ctx context.C return ParseDownloadAddonAssetByTeamResponse(rsp) } +// AIOnboardingChatWithBodyWithResponse request with arbitrary body returning *AIOnboardingChatResponse +func (c *ClientWithResponses) AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { + rsp, err := c.AIOnboardingChatWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingChatResponse(rsp) +} + +func (c *ClientWithResponses) AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { + rsp, err := c.AIOnboardingChat(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingChatResponse(rsp) +} + +// AIOnboardingNewConversationWithBodyWithResponse request with arbitrary body returning *AIOnboardingNewConversationResponse +func (c *ClientWithResponses) AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { + rsp, err := c.AIOnboardingNewConversationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingNewConversationResponse(rsp) +} + +func (c *ClientWithResponses) AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { + rsp, err := c.AIOnboardingNewConversation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingNewConversationResponse(rsp) +} + // ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) @@ -22179,6 +22431,142 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs return response, nil } +// ParseAIOnboardingChatResponse parses an HTTP response from a AIOnboardingChatWithResponse call +func ParseAIOnboardingChatResponse(rsp *http.Response) (*AIOnboardingChatResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AIOnboardingChatResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AIOnboardingChat200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAIOnboardingNewConversationResponse parses an HTTP response from a AIOnboardingNewConversationWithResponse call +func ParseAIOnboardingNewConversationResponse(rsp *http.Response) (*AIOnboardingNewConversationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AIOnboardingNewConversationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AIOnboardingNewConversation200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 1e24032..c2ffe17 100644 --- a/models.gen.go +++ b/models.gen.go @@ -313,6 +313,42 @@ const ( GetGroupedTeamUsageSummaryParamsGroupBySyncId GetGroupedTeamUsageSummaryParamsGroupBy = "sync_id" ) +// AIOnboardingChat200Response defines model for AIOnboardingChat_200_response. +type AIOnboardingChat200Response struct { + // FunctionCall The name of the function being called (if any) + FunctionCall *interface{} `json:"function_call,omitempty"` + + // FunctionCallArguments Arguments for the function call (if any) + FunctionCallArguments *interface{} `json:"function_call_arguments,omitempty"` + + // FunctionCallID ID of the function call (if any) + FunctionCallID *interface{} `json:"function_call_id,omitempty"` + + // Message The AI assistant's response message + Message interface{} `json:"message"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// AIOnboardingChatRequest defines model for AIOnboardingChat_request. +type AIOnboardingChatRequest struct { + // ConversationID Optional conversation ID to continue an existing conversation + ConversationID *interface{} `json:"conversation_id,omitempty"` + + // FunctionCallOutputs Function call outputs from previous interactions + FunctionCallOutputs *interface{} `json:"function_call_outputs,omitempty"` + + // Message The user's message to send to the AI assistant + Message *interface{} `json:"message,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// AIOnboardingNewConversation200Response defines model for AIOnboardingNewConversation_200_response. +type AIOnboardingNewConversation200Response struct { + // ConversationID The ID of the new conversation + ConversationID interface{} `json:"conversation_id"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // APIKey API Key to interact with CloudQuery Cloud under specific team type APIKey struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -1006,6 +1042,22 @@ type FinalizePluginUIAssetUploadRequest struct { UIID string `json:"ui_id"` } +// FunctionCallOutput defines model for FunctionCallOutput. +type FunctionCallOutput struct { + // Arguments The arguments passed to the function + Arguments interface{} `json:"arguments"` + + // CallID The unique identifier for this function call + CallID interface{} `json:"call_id"` + + // Name The name of the function that was called + Name interface{} `json:"name"` + + // Output The output/result from the function call + Output interface{} `json:"output"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // GetConnectorAuthStatusAWS200Response defines model for GetConnectorAuthStatusAWS_200_response. type GetConnectorAuthStatusAWS200Response struct { // ExternalID External ID used for the role @@ -3328,6 +3380,9 @@ type DownloadAddonAssetByTeamParams struct { Accept *string `json:"Accept,omitempty"` } +// AIOnboardingNewConversationJSONBody defines parameters for AIOnboardingNewConversation. +type AIOnboardingNewConversationJSONBody map[string]interface{} + // ListTeamAPIKeysParams defines parameters for ListTeamAPIKeys. type ListTeamAPIKeysParams struct { // PerPage The number of results per page (max 1000). @@ -3632,6 +3687,12 @@ type UpdateTeamJSONRequestBody = UpdateTeamRequest // CreateAddonOrderForTeamJSONRequestBody defines body for CreateAddonOrderForTeam for application/json ContentType. type CreateAddonOrderForTeamJSONRequestBody = AddonOrderCreate +// AIOnboardingChatJSONRequestBody defines body for AIOnboardingChat for application/json ContentType. +type AIOnboardingChatJSONRequestBody = AIOnboardingChatRequest + +// AIOnboardingNewConversationJSONRequestBody defines body for AIOnboardingNewConversation for application/json ContentType. +type AIOnboardingNewConversationJSONRequestBody AIOnboardingNewConversationJSONBody + // CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. type CreateTeamAPIKeyJSONRequestBody = CreateTeamAPIKeyRequest @@ -3752,6 +3813,281 @@ type UserTOTPVerifyJSONRequestBody = UserTOTPVerifyRequest // VerifyUserEmailJSONRequestBody defines body for VerifyUserEmail for application/json ContentType. type VerifyUserEmailJSONRequestBody = VerifyUserEmailRequest +// Getter for additional properties for AIOnboardingChat200Response. Returns the specified +// element and whether it was found +func (a AIOnboardingChat200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingChat200Response +func (a *AIOnboardingChat200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingChat200Response to handle AdditionalProperties +func (a *AIOnboardingChat200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["function_call"]; found { + err = json.Unmarshal(raw, &a.FunctionCall) + if err != nil { + return fmt.Errorf("error reading 'function_call': %w", err) + } + delete(object, "function_call") + } + + if raw, found := object["function_call_arguments"]; found { + err = json.Unmarshal(raw, &a.FunctionCallArguments) + if err != nil { + return fmt.Errorf("error reading 'function_call_arguments': %w", err) + } + delete(object, "function_call_arguments") + } + + if raw, found := object["function_call_id"]; found { + err = json.Unmarshal(raw, &a.FunctionCallID) + if err != nil { + return fmt.Errorf("error reading 'function_call_id': %w", err) + } + delete(object, "function_call_id") + } + + if raw, found := object["message"]; found { + err = json.Unmarshal(raw, &a.Message) + if err != nil { + return fmt.Errorf("error reading 'message': %w", err) + } + delete(object, "message") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingChat200Response to handle AdditionalProperties +func (a AIOnboardingChat200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.FunctionCall != nil { + object["function_call"], err = json.Marshal(a.FunctionCall) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call': %w", err) + } + } + + if a.FunctionCallArguments != nil { + object["function_call_arguments"], err = json.Marshal(a.FunctionCallArguments) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call_arguments': %w", err) + } + } + + if a.FunctionCallID != nil { + object["function_call_id"], err = json.Marshal(a.FunctionCallID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call_id': %w", err) + } + } + + object["message"], err = json.Marshal(a.Message) + if err != nil { + return nil, fmt.Errorf("error marshaling 'message': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for AIOnboardingChatRequest. Returns the specified +// element and whether it was found +func (a AIOnboardingChatRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingChatRequest +func (a *AIOnboardingChatRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingChatRequest to handle AdditionalProperties +func (a *AIOnboardingChatRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["conversation_id"]; found { + err = json.Unmarshal(raw, &a.ConversationID) + if err != nil { + return fmt.Errorf("error reading 'conversation_id': %w", err) + } + delete(object, "conversation_id") + } + + if raw, found := object["function_call_outputs"]; found { + err = json.Unmarshal(raw, &a.FunctionCallOutputs) + if err != nil { + return fmt.Errorf("error reading 'function_call_outputs': %w", err) + } + delete(object, "function_call_outputs") + } + + if raw, found := object["message"]; found { + err = json.Unmarshal(raw, &a.Message) + if err != nil { + return fmt.Errorf("error reading 'message': %w", err) + } + delete(object, "message") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingChatRequest to handle AdditionalProperties +func (a AIOnboardingChatRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.ConversationID != nil { + object["conversation_id"], err = json.Marshal(a.ConversationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'conversation_id': %w", err) + } + } + + if a.FunctionCallOutputs != nil { + object["function_call_outputs"], err = json.Marshal(a.FunctionCallOutputs) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call_outputs': %w", err) + } + } + + if a.Message != nil { + object["message"], err = json.Marshal(a.Message) + if err != nil { + return nil, fmt.Errorf("error marshaling 'message': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for AIOnboardingNewConversation200Response. Returns the specified +// element and whether it was found +func (a AIOnboardingNewConversation200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingNewConversation200Response +func (a *AIOnboardingNewConversation200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingNewConversation200Response to handle AdditionalProperties +func (a *AIOnboardingNewConversation200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["conversation_id"]; found { + err = json.Unmarshal(raw, &a.ConversationID) + if err != nil { + return fmt.Errorf("error reading 'conversation_id': %w", err) + } + delete(object, "conversation_id") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingNewConversation200Response to handle AdditionalProperties +func (a AIOnboardingNewConversation200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["conversation_id"], err = json.Marshal(a.ConversationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'conversation_id': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for ActivatePlatform200Response. Returns the specified // element and whether it was found func (a ActivatePlatform200Response) Get(fieldName string) (value interface{}, found bool) { @@ -4599,6 +4935,111 @@ func (a CreateTeamRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for FunctionCallOutput. Returns the specified +// element and whether it was found +func (a FunctionCallOutput) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for FunctionCallOutput +func (a *FunctionCallOutput) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for FunctionCallOutput to handle AdditionalProperties +func (a *FunctionCallOutput) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["arguments"]; found { + err = json.Unmarshal(raw, &a.Arguments) + if err != nil { + return fmt.Errorf("error reading 'arguments': %w", err) + } + delete(object, "arguments") + } + + if raw, found := object["call_id"]; found { + err = json.Unmarshal(raw, &a.CallID) + if err != nil { + return fmt.Errorf("error reading 'call_id': %w", err) + } + delete(object, "call_id") + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if raw, found := object["output"]; found { + err = json.Unmarshal(raw, &a.Output) + if err != nil { + return fmt.Errorf("error reading 'output': %w", err) + } + delete(object, "output") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for FunctionCallOutput to handle AdditionalProperties +func (a FunctionCallOutput) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["arguments"], err = json.Marshal(a.Arguments) + if err != nil { + return nil, fmt.Errorf("error marshaling 'arguments': %w", err) + } + + object["call_id"], err = json.Marshal(a.CallID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'call_id': %w", err) + } + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + object["output"], err = json.Marshal(a.Output) + if err != nil { + return nil, fmt.Errorf("error marshaling 'output': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for LoginUserRequest. Returns the specified // element and whether it was found func (a LoginUserRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index cbc3747..4e6c596 100644 --- a/spec.json +++ b/spec.json @@ -46,6 +46,8 @@ "name" : "analytics" }, { "name" : "platform" + }, { + "name" : "ai-onboarding" } ], "paths" : { "/" : { @@ -6861,6 +6863,121 @@ "tags" : [ "platform" ], "x-internal" : true } + }, + "/teams/{team_name}/ai-onboarding/chat" : { + "post" : { + "description" : "Send a chat message to the AI onboarding assistant", + "operationId" : "AIOnboardingChat", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingChat_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingChat_200_response" + } + } + }, + "description" : "Chat response from the AI assistant" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "ai-onboarding" ] + } + }, + "/teams/{team_name}/ai-onboarding/conversations" : { + "post" : { + "description" : "Start a new conversation with the AI onboarding assistant", + "operationId" : "AIOnboardingNewConversation", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "additionalProperties" : { }, + "properties" : { } + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingNewConversation_200_response" + } + } + }, + "description" : "New conversation started successfully" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "ai-onboarding" ] + } } }, "components" : { @@ -10774,6 +10891,29 @@ }, "required" : [ "base_url", "return_url" ] }, + "FunctionCallOutput" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "description" : "The name of the function that was called", + "x-go-name" : "Name" + }, + "arguments" : { + "additionalProperties" : false, + "description" : "The arguments passed to the function", + "x-go-name" : "Arguments" + }, + "call_id" : { + "description" : "The unique identifier for this function call", + "x-go-name" : "CallID" + }, + "output" : { + "description" : "The output/result from the function call", + "x-go-name" : "Output" + } + }, + "required" : [ "arguments", "call_id", "name", "output" ] + }, "UploadImage_request" : { "properties" : { "content_type" : { @@ -11897,6 +12037,58 @@ }, "required" : [ "installation_id" ] }, + "AIOnboardingChat_request" : { + "additionalProperties" : { }, + "properties" : { + "message" : { + "description" : "The user's message to send to the AI assistant", + "x-go-name" : "Message" + }, + "function_call_outputs" : { + "description" : "Function call outputs from previous interactions", + "items" : { + "$ref" : "#/components/schemas/FunctionCallOutput" + }, + "x-go-name" : "FunctionCallOutputs" + }, + "conversation_id" : { + "description" : "Optional conversation ID to continue an existing conversation", + "x-go-name" : "ConversationID" + } + } + }, + "AIOnboardingChat_200_response" : { + "additionalProperties" : { }, + "properties" : { + "message" : { + "description" : "The AI assistant's response message", + "x-go-name" : "Message" + }, + "function_call" : { + "description" : "The name of the function being called (if any)", + "x-go-name" : "FunctionCall" + }, + "function_call_arguments" : { + "description" : "Arguments for the function call (if any)", + "x-go-name" : "FunctionCallArguments" + }, + "function_call_id" : { + "description" : "ID of the function call (if any)", + "x-go-name" : "FunctionCallID" + } + }, + "required" : [ "message" ] + }, + "AIOnboardingNewConversation_200_response" : { + "additionalProperties" : { }, + "properties" : { + "conversation_id" : { + "description" : "The ID of the new conversation", + "x-go-name" : "ConversationID" + } + }, + "required" : [ "conversation_id" ] + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From 1984765c59e9d98fb372efd4674ab606182355c6 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:37:02 +0100 Subject: [PATCH 307/343] chore(main): Release v1.14.3 (#320) :robot: I have created a release *beep* *boop* --- ## [1.14.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.2...v1.14.3) (2025-09-15) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#319](https://github.com/cloudquery/cloudquery-api-go/issues/319)) ([b68800f](https://github.com/cloudquery/cloudquery-api-go/commit/b68800f58be3ed6d819e6eedeee08d3404642004)) * Generate CloudQuery Go API Client from `spec.json` ([#321](https://github.com/cloudquery/cloudquery-api-go/issues/321)) ([88f276f](https://github.com/cloudquery/cloudquery-api-go/commit/88f276fde79752059ffaee10e95524f831b8c8ff)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3086963..47a15d7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.2" + ".": "1.14.3" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 454b689..77c2b1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.14.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.2...v1.14.3) (2025-09-15) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#319](https://github.com/cloudquery/cloudquery-api-go/issues/319)) ([b68800f](https://github.com/cloudquery/cloudquery-api-go/commit/b68800f58be3ed6d819e6eedeee08d3404642004)) +* Generate CloudQuery Go API Client from `spec.json` ([#321](https://github.com/cloudquery/cloudquery-api-go/issues/321)) ([88f276f](https://github.com/cloudquery/cloudquery-api-go/commit/88f276fde79752059ffaee10e95524f831b8c8ff)) + ## [1.14.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.1...v1.14.2) (2025-09-01) From 7a8ae6c0b9e44a6725edacfecd75f195ee08d0c0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:17:57 +0100 Subject: [PATCH 308/343] fix: Generate CloudQuery Go API Client from `spec.json` (#322) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 98 ++++++++++++++++++++++++++++++++++++++++++++++++--- spec.json | 17 +++++++-- 2 files changed, 109 insertions(+), 6 deletions(-) diff --git a/models.gen.go b/models.gen.go index c2ffe17..9945d89 100644 --- a/models.gen.go +++ b/models.gen.go @@ -331,6 +331,9 @@ type AIOnboardingChat200Response struct { // AIOnboardingChatRequest defines model for AIOnboardingChat_request. type AIOnboardingChatRequest struct { + // ChatMode Optional chat mode - "web" for markdown output, "terminal" for plain text output + ChatMode *interface{} `json:"chat_mode,omitempty"` + // ConversationID Optional conversation ID to continue an existing conversation ConversationID *interface{} `json:"conversation_id,omitempty"` @@ -349,6 +352,13 @@ type AIOnboardingNewConversation200Response struct { AdditionalProperties map[string]interface{} `json:"-"` } +// AIOnboardingNewConversationRequest defines model for AIOnboardingNewConversation_request. +type AIOnboardingNewConversationRequest struct { + // TryResume If true, resume existing conversation instead of starting a new one + TryResume *interface{} `json:"try_resume,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // APIKey API Key to interact with CloudQuery Cloud under specific team type APIKey struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -3380,9 +3390,6 @@ type DownloadAddonAssetByTeamParams struct { Accept *string `json:"Accept,omitempty"` } -// AIOnboardingNewConversationJSONBody defines parameters for AIOnboardingNewConversation. -type AIOnboardingNewConversationJSONBody map[string]interface{} - // ListTeamAPIKeysParams defines parameters for ListTeamAPIKeys. type ListTeamAPIKeysParams struct { // PerPage The number of results per page (max 1000). @@ -3691,7 +3698,7 @@ type CreateAddonOrderForTeamJSONRequestBody = AddonOrderCreate type AIOnboardingChatJSONRequestBody = AIOnboardingChatRequest // AIOnboardingNewConversationJSONRequestBody defines body for AIOnboardingNewConversation for application/json ContentType. -type AIOnboardingNewConversationJSONRequestBody AIOnboardingNewConversationJSONBody +type AIOnboardingNewConversationJSONRequestBody = AIOnboardingNewConversationRequest // CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. type CreateTeamAPIKeyJSONRequestBody = CreateTeamAPIKeyRequest @@ -3949,6 +3956,14 @@ func (a *AIOnboardingChatRequest) UnmarshalJSON(b []byte) error { return err } + if raw, found := object["chat_mode"]; found { + err = json.Unmarshal(raw, &a.ChatMode) + if err != nil { + return fmt.Errorf("error reading 'chat_mode': %w", err) + } + delete(object, "chat_mode") + } + if raw, found := object["conversation_id"]; found { err = json.Unmarshal(raw, &a.ConversationID) if err != nil { @@ -3992,6 +4007,13 @@ func (a AIOnboardingChatRequest) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) + if a.ChatMode != nil { + object["chat_mode"], err = json.Marshal(a.ChatMode) + if err != nil { + return nil, fmt.Errorf("error marshaling 'chat_mode': %w", err) + } + } + if a.ConversationID != nil { object["conversation_id"], err = json.Marshal(a.ConversationID) if err != nil { @@ -4088,6 +4110,74 @@ func (a AIOnboardingNewConversation200Response) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for AIOnboardingNewConversationRequest. Returns the specified +// element and whether it was found +func (a AIOnboardingNewConversationRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingNewConversationRequest +func (a *AIOnboardingNewConversationRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingNewConversationRequest to handle AdditionalProperties +func (a *AIOnboardingNewConversationRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["try_resume"]; found { + err = json.Unmarshal(raw, &a.TryResume) + if err != nil { + return fmt.Errorf("error reading 'try_resume': %w", err) + } + delete(object, "try_resume") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingNewConversationRequest to handle AdditionalProperties +func (a AIOnboardingNewConversationRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.TryResume != nil { + object["try_resume"], err = json.Marshal(a.TryResume) + if err != nil { + return nil, fmt.Errorf("error marshaling 'try_resume': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for ActivatePlatform200Response. Returns the specified // element and whether it was found func (a ActivatePlatform200Response) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index 4e6c596..c48e500 100644 --- a/spec.json +++ b/spec.json @@ -6940,8 +6940,7 @@ "content" : { "application/json" : { "schema" : { - "additionalProperties" : { }, - "properties" : { } + "$ref" : "#/components/schemas/AIOnboardingNewConversation_request" } } } @@ -12054,6 +12053,11 @@ "conversation_id" : { "description" : "Optional conversation ID to continue an existing conversation", "x-go-name" : "ConversationID" + }, + "chat_mode" : { + "description" : "Optional chat mode - \"web\" for markdown output, \"terminal\" for plain text output", + "enum" : [ "web", "terminal" ], + "x-go-name" : "ChatMode" } } }, @@ -12079,6 +12083,15 @@ }, "required" : [ "message" ] }, + "AIOnboardingNewConversation_request" : { + "additionalProperties" : { }, + "properties" : { + "try_resume" : { + "description" : "If true, resume existing conversation instead of starting a new one", + "x-go-name" : "TryResume" + } + } + }, "AIOnboardingNewConversation_200_response" : { "additionalProperties" : { }, "properties" : { From 03a2ab867d0d42c536921bf50fa3b04764a1c02e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 19 Sep 2025 07:06:04 +0100 Subject: [PATCH 309/343] fix: Generate CloudQuery Go API Client from `spec.json` (#324) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 75 ++++++++++++++++++++++++ spec.json | 55 ++++++++++++++++++ 3 files changed, 287 insertions(+) diff --git a/client.gen.go b/client.gen.go index 73626f9..7e7cd55 100644 --- a/client.gen.go +++ b/client.gen.go @@ -318,6 +318,9 @@ type ClientInterface interface { AIOnboardingChat(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // AIOnboardingEndConversation request + AIOnboardingEndConversation(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*http.Response, error) + // AIOnboardingNewConversationWithBody request with any body AIOnboardingNewConversationWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1709,6 +1712,18 @@ func (c *Client) AIOnboardingChat(ctx context.Context, teamName string, body AIO return c.Client.Do(req) } +func (c *Client) AIOnboardingEndConversation(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingEndConversationRequest(c.Server, teamName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) AIOnboardingNewConversationWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewAIOnboardingNewConversationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { @@ -7038,6 +7053,40 @@ func NewAIOnboardingChatRequestWithBody(server string, teamName string, contentT return req, nil } +// NewAIOnboardingEndConversationRequest generates requests for AIOnboardingEndConversation +func NewAIOnboardingEndConversationRequest(server string, teamName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewAIOnboardingNewConversationRequest calls the generic AIOnboardingNewConversation builder with application/json body func NewAIOnboardingNewConversationRequest(server string, teamName string, body AIOnboardingNewConversationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -12693,6 +12742,9 @@ type ClientWithResponsesInterface interface { AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) + // AIOnboardingEndConversationWithResponse request + AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) + // AIOnboardingNewConversationWithBodyWithResponse request with any body AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) @@ -14619,6 +14671,34 @@ func (r AIOnboardingChatResponse) StatusCode() int { return 0 } +type AIOnboardingEndConversationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingEndConversation200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AIOnboardingEndConversationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingEndConversationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type AIOnboardingNewConversationResponse struct { Body []byte HTTPResponse *http.Response @@ -18073,6 +18153,15 @@ func (c *ClientWithResponses) AIOnboardingChatWithResponse(ctx context.Context, return ParseAIOnboardingChatResponse(rsp) } +// AIOnboardingEndConversationWithResponse request returning *AIOnboardingEndConversationResponse +func (c *ClientWithResponses) AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) { + rsp, err := c.AIOnboardingEndConversation(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingEndConversationResponse(rsp) +} + // AIOnboardingNewConversationWithBodyWithResponse request with arbitrary body returning *AIOnboardingNewConversationResponse func (c *ClientWithResponses) AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { rsp, err := c.AIOnboardingNewConversationWithBody(ctx, teamName, contentType, body, reqEditors...) @@ -22499,6 +22588,74 @@ func ParseAIOnboardingChatResponse(rsp *http.Response) (*AIOnboardingChatRespons return response, nil } +// ParseAIOnboardingEndConversationResponse parses an HTTP response from a AIOnboardingEndConversationWithResponse call +func ParseAIOnboardingEndConversationResponse(rsp *http.Response) (*AIOnboardingEndConversationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AIOnboardingEndConversationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AIOnboardingEndConversation200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseAIOnboardingNewConversationResponse parses an HTTP response from a AIOnboardingNewConversationWithResponse call func ParseAIOnboardingNewConversationResponse(rsp *http.Response) (*AIOnboardingNewConversationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 9945d89..92f8b7d 100644 --- a/models.gen.go +++ b/models.gen.go @@ -345,6 +345,13 @@ type AIOnboardingChatRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// AIOnboardingEndConversation200Response defines model for AIOnboardingEndConversation_200_response. +type AIOnboardingEndConversation200Response struct { + // Success Whether the conversation was ended successfully + Success *interface{} `json:"success,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // AIOnboardingNewConversation200Response defines model for AIOnboardingNewConversation_200_response. type AIOnboardingNewConversation200Response struct { // ConversationID The ID of the new conversation @@ -4044,6 +4051,74 @@ func (a AIOnboardingChatRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for AIOnboardingEndConversation200Response. Returns the specified +// element and whether it was found +func (a AIOnboardingEndConversation200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingEndConversation200Response +func (a *AIOnboardingEndConversation200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingEndConversation200Response to handle AdditionalProperties +func (a *AIOnboardingEndConversation200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["success"]; found { + err = json.Unmarshal(raw, &a.Success) + if err != nil { + return fmt.Errorf("error reading 'success': %w", err) + } + delete(object, "success") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingEndConversation200Response to handle AdditionalProperties +func (a AIOnboardingEndConversation200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Success != nil { + object["success"], err = json.Marshal(a.Success) + if err != nil { + return nil, fmt.Errorf("error marshaling 'success': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for AIOnboardingNewConversation200Response. Returns the specified // element and whether it was found func (a AIOnboardingNewConversation200Response) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index c48e500..5b5d39b 100644 --- a/spec.json +++ b/spec.json @@ -6922,6 +6922,52 @@ } }, "/teams/{team_name}/ai-onboarding/conversations" : { + "delete" : { + "description" : "End the current AI onboarding conversation", + "operationId" : "AIOnboardingEndConversation", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingEndConversation_200_response" + } + } + }, + "description" : "Conversation ended successfully" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "ai-onboarding" ] + }, "post" : { "description" : "Start a new conversation with the AI onboarding assistant", "operationId" : "AIOnboardingNewConversation", @@ -12102,6 +12148,15 @@ }, "required" : [ "conversation_id" ] }, + "AIOnboardingEndConversation_200_response" : { + "additionalProperties" : { }, + "properties" : { + "success" : { + "description" : "Whether the conversation was ended successfully", + "x-go-name" : "Success" + } + } + }, "UsageIncrease_tables_inner" : { "properties" : { "name" : { From d4b3ae44e98bd9c70eb99ae11280699b1d68f230 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 19 Sep 2025 07:11:55 +0100 Subject: [PATCH 310/343] chore(main): Release v1.14.4 (#323) --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 47a15d7..76b288f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.3" + ".": "1.14.4" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 77c2b1d..972155f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.14.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.3...v1.14.4) (2025-09-19) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#322](https://github.com/cloudquery/cloudquery-api-go/issues/322)) ([7a8ae6c](https://github.com/cloudquery/cloudquery-api-go/commit/7a8ae6c0b9e44a6725edacfecd75f195ee08d0c0)) +* Generate CloudQuery Go API Client from `spec.json` ([#324](https://github.com/cloudquery/cloudquery-api-go/issues/324)) ([03a2ab8](https://github.com/cloudquery/cloudquery-api-go/commit/03a2ab867d0d42c536921bf50fa3b04764a1c02e)) + ## [1.14.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.2...v1.14.3) (2025-09-15) From a95805472cc72a1b405091d04d0a3dce4d5cadf6 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 29 Sep 2025 17:17:56 +0100 Subject: [PATCH 311/343] chore: Add permissions to all workflows (#325) --- .github/workflows/gen-client.yml | 3 +++ .github/workflows/lint_golang.yml | 3 +++ .github/workflows/release-pr.yml | 4 +++- .github/workflows/unittest.yml | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 582343e..45a216b 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -2,6 +2,9 @@ name: Generate API Client on: workflow_dispatch: +permissions: + contents: read + jobs: gen-api: timeout-minutes: 30 diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index e624a24..b99efbe 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -7,6 +7,9 @@ on: branches: - main +permissions: + contents: read + jobs: golangci: name: Lint with GolangCI diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index db3a020..ac37325 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -3,7 +3,9 @@ on: push: branches: - main - workflow_dispatch: + +permissions: + contents: read jobs: release-please: diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 29ba9ee..512b74f 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -7,6 +7,9 @@ on: branches: - main +permissions: + contents: read + jobs: unitests: timeout-minutes: 30 From 50dbd125a6653783a1d393358e670b1cb05d9b73 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 1 Oct 2025 01:57:23 +0100 Subject: [PATCH 312/343] fix(deps): Update module github.com/stretchr/testify to v1.11.1 (#326) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/stretchr/testify](https://redirect.github.com/stretchr/testify) | require | patch | `v1.11.0` -> `v1.11.1` | --- ### Release Notes
stretchr/testify (github.com/stretchr/testify) ### [`v1.11.1`](https://redirect.github.com/stretchr/testify/releases/tag/v1.11.1) [Compare Source](https://redirect.github.com/stretchr/testify/compare/v1.11.0...v1.11.1) This release fixes [#​1785](https://redirect.github.com/stretchr/testify/issues/1785) introduced in v1.11.0 where expected argument values implementing the stringer interface (`String() string`) with a method which mutates their value, when passed to mock.Mock.On (`m.On("Method", ).Return()`) or actual argument values passed to mock.Mock.Called may no longer match one another where they previously did match. The behaviour prior to v1.11.0 where the stringer is always called is restored. Future testify releases may not call the stringer method at all in this case. #### What's Changed - Backport [#​1786](https://redirect.github.com/stretchr/testify/issues/1786) to release/1.11: mock: revert to pre-v1.11.0 argument matching behavior for mutating stringers by [@​brackendawson](https://redirect.github.com/brackendawson) in [https://github.com/stretchr/testify/pull/1788](https://redirect.github.com/stretchr/testify/pull/1788) **Full Changelog**: https://github.com/stretchr/testify/compare/v1.11.0...v1.11.1
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0356506..ff6a331 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/adrg/xdg v0.5.3 github.com/hashicorp/go-retryablehttp v0.7.8 github.com/oapi-codegen/runtime v1.1.2 - github.com/stretchr/testify v1.11.0 + github.com/stretchr/testify v1.11.1 ) require ( diff --git a/go.sum b/go.sum index c4ed130..5690e49 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8= -github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 8fd5474ed93205acb9f0b7e886e684d498b7e994 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 1 Oct 2025 01:59:39 +0100 Subject: [PATCH 313/343] chore(deps): Update dependency golangci/golangci-lint to v2.5.0 (#327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.4.0` -> `v2.5.0` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.5.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v250) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.4.0...v2.5.0) 1. New linters - Add `godoclint` linter https://github.com/godoc-lint/godoc-lint - Add `unqueryvet` linter https://github.com/MirrexOne/unqueryvet - Add `iotamixing` linter https://github.com/AdminBenni/iota-mixing 2. Linters new features or changes - `embeddedstructfieldcheck`: from 0.3.0 to 0.4.0 (new option: `empty-line`) - `err113`: from [`aea10b5`](https://redirect.github.com/golangci/golangci-lint/commit/aea10b59be24) to 0.1.1 (skip internals of `Is` methods for `error` type) - `ginkgolinter`: from 0.20.0 to 0.21.0 (new option: `force-tonot`) - `gofumpt`: from 0.8.0 to 0.9.1 (new rule is to "clothe" naked returns for the sake of clarity) - `ineffassign`: from 0.1.0 to 0.2.0 (new option: `check-escaping-errors`) - `musttag`: from 0.13.1 to 0.14.0 (support interface methods) - `revive`: from 1.11.0 to 1.12.0 (new options: `identical-ifelseif-branches`, `identical-ifelseif-conditions`, `identical-switch-branches`, `identical-switch-conditions`, `package-directory-mismatch`, `unsecure-url-scheme`, `use-waitgroup-go`, `useless-fallthrough`) - `thelper`: from 0.6.3 to 0.7.1 (skip `t.Helper` in functions passed to `synctest.Test`) - `wsl`: from 5.1.1 to 5.2.0 (improvements related to subexpressions) 3. Linters bug fixes - `asciicheck`: from 0.4.1 to 0.5.0 - `errname`: from 1.1.0 to 1.1.1 - `fatcontext`: from 0.8.0 to 0.8.1 - `go-printf-func-name`: from 0.1.0 to 0.1.1 - `godot`: from 1.5.1 to 1.5.4 - `gosec`: from 2.22.7 to 2.22.8 - `nilerr`: from 0.1.1 to a temporary fork - `nilnil`: from 1.1.0 to 1.1.1 - `protogetter`: from 0.3.15 to 0.3.16 - `tagliatelle`: from 0.7.1 to 0.7.2 - `testifylint`: from 1.6.1 to 1.6.4 4. Misc. - fix: "no export data" errors are now handled as a standard typecheck error 5. Documentation - Improve nolint section about syntax
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index b99efbe..83890aa 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -23,4 +23,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.4.0 + version: v2.5.0 From 27a9fddbcf134444275389a97e6c7fed168ded51 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:04:28 +0100 Subject: [PATCH 314/343] chore(deps): Update actions/github-script action to v8 (#329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/github-script](https://redirect.github.com/actions/github-script) | action | major | `v7` -> `v8` | --- ### Release Notes
actions/github-script (actions/github-script) ### [`v8`](https://redirect.github.com/actions/github-script/releases/tag/v8): .0.0 [Compare Source](https://redirect.github.com/actions/github-script/compare/v7...v8) #### What's Changed - Update Node.js version support to 24.x by [@​salmanmkc](https://redirect.github.com/salmanmkc) in [https://github.com/actions/github-script/pull/637](https://redirect.github.com/actions/github-script/pull/637) - README for updating actions/github-script from v7 to v8 by [@​sneha-krip](https://redirect.github.com/sneha-krip) in [https://github.com/actions/github-script/pull/653](https://redirect.github.com/actions/github-script/pull/653) #### ⚠️ Minimum Compatible Runner Version **v2.327.1**\ [Release Notes](https://redirect.github.com/actions/runner/releases/tag/v2.327.1) Make sure your runner is updated to this version or newer to use this release. #### New Contributors - [@​salmanmkc](https://redirect.github.com/salmanmkc) made their first contribution in [https://github.com/actions/github-script/pull/637](https://redirect.github.com/actions/github-script/pull/637) - [@​sneha-krip](https://redirect.github.com/sneha-krip) made their first contribution in [https://github.com/actions/github-script/pull/653](https://redirect.github.com/actions/github-script/pull/653) **Full Changelog**: https://github.com/actions/github-script/compare/v7.1.0...v8.0.0
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/release-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index ac37325..212ea7a 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -31,7 +31,7 @@ jobs: with: prerelease: true - name: Trigger Renovate - uses: actions/github-script@v7 + uses: actions/github-script@v8 if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == '' with: github-token: ${{ secrets.GH_CQ_BOT }} From 2a65c25e3822e1ae3b996e37d1e73c814abd49f0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:06:07 +0100 Subject: [PATCH 315/343] chore(deps): Update actions/setup-go action to v6 (#330) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-go](https://redirect.github.com/actions/setup-go) | action | major | `v5` -> `v6` | --- ### Release Notes
actions/setup-go (actions/setup-go) ### [`v6`](https://redirect.github.com/actions/setup-go/compare/v5...v6) [Compare Source](https://redirect.github.com/actions/setup-go/compare/v5...v6)
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- .github/workflows/lint_golang.yml | 2 +- .github/workflows/unittest.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 45a216b..797273d 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -26,7 +26,7 @@ jobs: sudo rm -rf .generated - name: Set up Go 1.x - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version-file: go.mod diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 83890aa..8f3611a 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -17,7 +17,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v5 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version-file: go.mod - name: golangci-lint diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 512b74f..8d6903d 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -22,7 +22,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v5 - name: Set up Go 1.x - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version-file: go.mod - run: go mod download From fe5f9a016151624ce9227b5b5ddc213093ef1ffa Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:51:05 +0100 Subject: [PATCH 316/343] chore(main): Release v1.14.5 (#328) :robot: I have created a release *beep* *boop* --- ## [1.14.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.4...v1.14.5) (2025-10-01) ### Bug Fixes * **deps:** Update module github.com/stretchr/testify to v1.11.1 ([#326](https://github.com/cloudquery/cloudquery-api-go/issues/326)) ([50dbd12](https://github.com/cloudquery/cloudquery-api-go/commit/50dbd125a6653783a1d393358e670b1cb05d9b73)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 76b288f..d024041 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.4" + ".": "1.14.5" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 972155f..e7e1179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.14.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.4...v1.14.5) (2025-10-01) + + +### Bug Fixes + +* **deps:** Update module github.com/stretchr/testify to v1.11.1 ([#326](https://github.com/cloudquery/cloudquery-api-go/issues/326)) ([50dbd12](https://github.com/cloudquery/cloudquery-api-go/commit/50dbd125a6653783a1d393358e670b1cb05d9b73)) + ## [1.14.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.3...v1.14.4) (2025-09-19) From 04860b27f7a42b8928c9c3b820ec9a67f3246e99 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:30:21 +0100 Subject: [PATCH 317/343] fix: Generate CloudQuery Go API Client from `spec.json` (#331) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 8 ++++++++ spec.json | 3 +++ 2 files changed, 11 insertions(+) diff --git a/client.gen.go b/client.gen.go index 7e7cd55..7f088dc 100644 --- a/client.gen.go +++ b/client.gen.go @@ -15234,6 +15234,7 @@ type EmailTeamInvitationResponse struct { JSON400 *BadRequest JSON403 *Forbidden JSON422 *UnprocessableEntity + JSON429 *TooManyRequests JSON500 *InternalError } @@ -23834,6 +23835,13 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR } response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/spec.json b/spec.json index 5b5d39b..5549b1d 100644 --- a/spec.json +++ b/spec.json @@ -3329,6 +3329,9 @@ "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, "500" : { "$ref" : "#/components/responses/InternalError" } From c0ea4fb176ca14761f7db0264ed48d0d0a61498a Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 20 Oct 2025 12:24:11 +0100 Subject: [PATCH 318/343] fix: Generate CloudQuery Go API Client from `spec.json` (#333) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 23 ++++++++++++++++++++++- spec.json | 7 +++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/models.gen.go b/models.gen.go index 92f8b7d..ed5bcdd 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2905,7 +2905,10 @@ type TenantUser struct { // UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. type UpdateCurrentUserRequest struct { // Name The unique name for the user. - Name *UserName `json:"name,omitempty"` + Name *UserName `json:"name,omitempty"` + + // Onboarded Whether the user has completed onboarding + Onboarded *UserOnboarded `json:"onboarded,omitempty"` AdditionalProperties map[string]interface{} `json:"-"` } @@ -3101,6 +3104,9 @@ type UserID = openapi_types.UUID // UserName The unique name for the user. type UserName = string +// UserOnboarded Whether the user has completed onboarding +type UserOnboarded = bool + // UserTOTPSetup200Response defines model for UserTOTPSetup_200_response. type UserTOTPSetup200Response struct { Secret string `json:"secret"` @@ -5946,6 +5952,14 @@ func (a *UpdateCurrentUserRequest) UnmarshalJSON(b []byte) error { delete(object, "name") } + if raw, found := object["onboarded"]; found { + err = json.Unmarshal(raw, &a.Onboarded) + if err != nil { + return fmt.Errorf("error reading 'onboarded': %w", err) + } + delete(object, "onboarded") + } + if len(object) != 0 { a.AdditionalProperties = make(map[string]interface{}) for fieldName, fieldBuf := range object { @@ -5972,6 +5986,13 @@ func (a UpdateCurrentUserRequest) MarshalJSON() ([]byte, error) { } } + if a.Onboarded != nil { + object["onboarded"], err = json.Marshal(a.Onboarded) + if err != nil { + return nil, fmt.Errorf("error marshaling 'onboarded': %w", err) + } + } + for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { diff --git a/spec.json b/spec.json index 5549b1d..6c68754 100644 --- a/spec.json +++ b/spec.json @@ -9576,6 +9576,10 @@ } } }, + "UserOnboarded" : { + "description" : "Whether the user has completed onboarding", + "type" : "boolean" + }, "InvitationWithToken" : { "additionalProperties" : false, "allOf" : [ { @@ -11563,6 +11567,9 @@ "properties" : { "name" : { "$ref" : "#/components/schemas/UserName" + }, + "onboarded" : { + "$ref" : "#/components/schemas/UserOnboarded" } } }, From 8c3d7e17cd5454cfc38f6a8957cdec16da678794 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 21 Oct 2025 15:48:23 +0100 Subject: [PATCH 319/343] fix: Generate CloudQuery Go API Client from `spec.json` (#334) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 3 +++ spec.json | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/models.gen.go b/models.gen.go index ed5bcdd..ccc9f9f 100644 --- a/models.gen.go +++ b/models.gen.go @@ -3093,6 +3093,9 @@ type User struct { // Name The unique name for the user. Name *UserName `json:"name,omitempty"` + // Onboarded Whether the user has completed onboarding + Onboarded *UserOnboarded `json:"onboarded,omitempty"` + // ProfileImageURL Profile image URL of user ProfileImageURL *string `json:"profile_image_url,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` diff --git a/spec.json b/spec.json index 6c68754..7cf29db 100644 --- a/spec.json +++ b/spec.json @@ -9061,6 +9061,10 @@ "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", "type" : "string" }, + "UserOnboarded" : { + "description" : "Whether the user has completed onboarding", + "type" : "boolean" + }, "User" : { "additionalProperties" : false, "description" : "CloudQuery User", @@ -9084,6 +9088,9 @@ "name" : { "$ref" : "#/components/schemas/UserName" }, + "onboarded" : { + "$ref" : "#/components/schemas/UserOnboarded" + }, "updated_at" : { "example" : "2017-07-14T16:53:42Z", "format" : "date-time", @@ -9576,10 +9583,6 @@ } } }, - "UserOnboarded" : { - "description" : "Whether the user has completed onboarding", - "type" : "boolean" - }, "InvitationWithToken" : { "additionalProperties" : false, "allOf" : [ { From ed62fb1d3f5f2f5dd38528d6b5a7035f5fae88a1 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 27 Oct 2025 15:21:14 +0000 Subject: [PATCH 320/343] fix: Generate CloudQuery Go API Client from `spec.json` (#335) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 101 +++++++++++++++++++++++++++++ spec.json | 69 ++++++++++++++++++++ 3 files changed, 341 insertions(+) diff --git a/client.gen.go b/client.gen.go index 7f088dc..29637c3 100644 --- a/client.gen.go +++ b/client.gen.go @@ -685,6 +685,11 @@ type ClientInterface interface { // GetCurrentUserMemberships request GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // RegisterUserWithBody request with any body + RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ResetUserPasswordWithBody request with any body ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3332,6 +3337,30 @@ func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurre return c.Client.Do(req) } +func (c *Client) RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRegisterUserRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRegisterUserRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewResetUserPasswordRequestWithBody(c.Server, contentType, body) if err != nil { @@ -12177,6 +12206,46 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return req, nil } +// NewRegisterUserRequest calls the generic RegisterUser builder with application/json body +func NewRegisterUserRequest(server string, body RegisterUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRegisterUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewRegisterUserRequestWithBody generates requests for RegisterUser with any type of body +func NewRegisterUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/register") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewResetUserPasswordRequest calls the generic ResetUserPassword builder with application/json body func NewResetUserPasswordRequest(server string, body ResetUserPasswordJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -13109,6 +13178,11 @@ type ClientWithResponsesInterface interface { // GetCurrentUserMembershipsWithResponse request GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) + // RegisterUserWithBodyWithResponse request with any body + RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) + + RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) + // ResetUserPasswordWithBodyWithResponse request with any body ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) @@ -17217,6 +17291,32 @@ func (r GetCurrentUserMembershipsResponse) StatusCode() int { return 0 } +type RegisterUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *RegisterUser201Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RegisterUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RegisterUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ResetUserPasswordResponse struct { Body []byte HTTPResponse *http.Response @@ -19331,6 +19431,23 @@ func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context. return ParseGetCurrentUserMembershipsResponse(rsp) } +// RegisterUserWithBodyWithResponse request with arbitrary body returning *RegisterUserResponse +func (c *ClientWithResponses) RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { + rsp, err := c.RegisterUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRegisterUserResponse(rsp) +} + +func (c *ClientWithResponses) RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { + rsp, err := c.RegisterUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRegisterUserResponse(rsp) +} + // ResetUserPasswordWithBodyWithResponse request with arbitrary body returning *ResetUserPasswordResponse func (c *ClientWithResponses) ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { rsp, err := c.ResetUserPasswordWithBody(ctx, contentType, body, reqEditors...) @@ -27998,6 +28115,60 @@ func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUser return response, nil } +// ParseRegisterUserResponse parses an HTTP response from a RegisterUserWithResponse call +func ParseRegisterUserResponse(rsp *http.Response) (*RegisterUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RegisterUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest RegisterUser201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseResetUserPasswordResponse parses an HTTP response from a ResetUserPasswordWithResponse call func ParseResetUserPasswordResponse(rsp *http.Response) (*ResetUserPasswordResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index ccc9f9f..b906fee 100644 --- a/models.gen.go +++ b/models.gen.go @@ -2108,6 +2108,25 @@ type PromoteSyncSourceTestConnection struct { Tables []string `json:"tables"` } +// RegisterUser201Response defines model for RegisterUser_201_response. +type RegisterUser201Response struct { + // CustomToken Token to exchange for ID token + CustomToken string `json:"custom_token"` + + // Email Indicates successful user creation + Email string `json:"email"` +} + +// RegisterUserRequest defines model for RegisterUser_request. +type RegisterUserRequest struct { + // Email Email address + Email interface{} `json:"email"` + + // Password Password for the new user account + Password interface{} `json:"password"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // RegistryAuthToken JWT token for the image registry type RegistryAuthToken struct { AccessToken string `json:"access_token"` @@ -3827,6 +3846,9 @@ type SendUserEventJSONRequestBody = SendUserEventRequest // LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType. type LoginUserJSONRequestBody = LoginUserRequest +// RegisterUserJSONRequestBody defines body for RegisterUser for application/json ContentType. +type RegisterUserJSONRequestBody = RegisterUserRequest + // ResetUserPasswordJSONRequestBody defines body for ResetUserPassword for application/json ContentType. type ResetUserPasswordJSONRequestBody = ResetUserPasswordRequest @@ -5280,6 +5302,85 @@ func (a LoginUserRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for RegisterUserRequest. Returns the specified +// element and whether it was found +func (a RegisterUserRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for RegisterUserRequest +func (a *RegisterUserRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for RegisterUserRequest to handle AdditionalProperties +func (a *RegisterUserRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["email"]; found { + err = json.Unmarshal(raw, &a.Email) + if err != nil { + return fmt.Errorf("error reading 'email': %w", err) + } + delete(object, "email") + } + + if raw, found := object["password"]; found { + err = json.Unmarshal(raw, &a.Password) + if err != nil { + return fmt.Errorf("error reading 'password': %w", err) + } + delete(object, "password") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for RegisterUserRequest to handle AdditionalProperties +func (a RegisterUserRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["email"], err = json.Marshal(a.Email) + if err != nil { + return nil, fmt.Errorf("error marshaling 'email': %w", err) + } + + object["password"], err = json.Marshal(a.Password) + if err != nil { + return nil, fmt.Errorf("error marshaling 'password': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for RenewPlatformActivation200Response. Returns the specified // element and whether it was found func (a RenewPlatformActivation200Response) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index 7cf29db..8ce2417 100644 --- a/spec.json +++ b/spec.json @@ -4042,6 +4042,48 @@ "tags" : [ "users" ] } }, + "/user/register" : { + "post" : { + "description" : "Register new user", + "operationId" : "RegisterUser", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegisterUser_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegisterUser_201_response" + } + } + }, + "description" : "User created but email not verified" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ], + "x-internal" : true + } + }, "/user/reset-password" : { "post" : { "description" : "Reset user password from email", @@ -11632,6 +11674,33 @@ }, "required" : [ "secret", "url" ] }, + "RegisterUser_request" : { + "additionalProperties" : { }, + "properties" : { + "email" : { + "description" : "Email address", + "format" : "email" + }, + "password" : { + "description" : "Password for the new user account", + "minLength" : 6 + } + }, + "required" : [ "email", "password" ] + }, + "RegisterUser_201_response" : { + "properties" : { + "email" : { + "description" : "Indicates successful user creation", + "type" : "string" + }, + "custom_token" : { + "description" : "Token to exchange for ID token", + "type" : "string" + } + }, + "required" : [ "custom_token", "email" ] + }, "ResetUserPassword_request" : { "additionalProperties" : { }, "properties" : { From fc7968c99994838255f0c57aaff3a8022e6de21b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 18 Nov 2025 09:45:06 +0000 Subject: [PATCH 321/343] fix: Generate CloudQuery Go API Client from `spec.json` (#336) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 22685 +++++++++++++++--------------------------------- models.gen.go | 1966 +---- spec.json | 7950 +++++------------ 3 files changed, 9591 insertions(+), 23010 deletions(-) diff --git a/client.gen.go b/client.gen.go index 29637c3..da298df 100644 --- a/client.gen.go +++ b/client.gen.go @@ -337,59 +337,6 @@ type ClientInterface interface { // DeleteTeamAPIKey request DeleteTeamAPIKey(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListConnectors request - ListConnectors(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateConnectorWithBody request with any body - CreateConnectorWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateConnector(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetConnector request - GetConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateConnectorWithBody request with any body - UpdateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // RevokeConnector request - RevokeConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetConnectorAuthStatusAWS request - GetConnectorAuthStatusAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AuthenticateConnectorFinishAWSWithBody request with any body - AuthenticateConnectorFinishAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AuthenticateConnectorFinishAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AuthenticateConnectorAWSWithBody request with any body - AuthenticateConnectorAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AuthenticateConnectorAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetConnectorAuthStatusGCP request - GetConnectorAuthStatusGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AuthenticateConnectorGCPWithBody request with any body - AuthenticateConnectorGCPWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AuthenticateConnectorGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AuthenticateConnectorFinishGCP request - AuthenticateConnectorFinishGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AuthenticateConnectorFinishOAuthWithBody request with any body - AuthenticateConnectorFinishOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AuthenticateConnectorFinishOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // AuthenticateConnectorOAuthWithBody request with any body - AuthenticateConnectorOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - AuthenticateConnectorOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateTeamImagesWithBody request with any body CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -491,135 +438,6 @@ type ClientInterface interface { // GetSubscriptionOrderByTeam request GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSyncDestinationTestConnectionWithBody request with any body - CreateSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSyncDestinationTestConnection(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncDestinationTestConnection request - GetSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncTestConnectionForSyncDestinationWithBody request with any body - UpdateSyncTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PromoteSyncDestinationTestConnectionWithBody request with any body - PromoteSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PromoteSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListSyncDestinations request - ListSyncDestinations(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSyncDestination request - DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncDestination request - GetSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncDestinationWithBody request with any body - UpdateSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListSyncDestinationSyncs request - ListSyncDestinationSyncs(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetTestConnectionForSyncDestination request - GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSyncSourceTestConnectionWithBody request with any body - CreateSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSyncSourceTestConnection(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncSourceTestConnection request - GetSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncTestConnectionForSyncSourceWithBody request with any body - UpdateSyncTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PromoteSyncSourceTestConnectionWithBody request with any body - PromoteSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PromoteSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListSyncSources request - ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSyncSource request - DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncSource request - GetSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncSourceWithBody request with any body - UpdateSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListSyncSourceSyncs request - ListSyncSourceSyncs(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetTestConnectionForSyncSource request - GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListSyncs request - ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSyncWithBody request with any body - CreateSyncWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetTestConnectionConnectorCredentials request - GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetTestConnectionConnectorIdentity request - GetTestConnectionConnectorIdentity(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSync request - DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSync request - GetSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncWithBody request with any body - UpdateSyncWithBody(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSync(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ListSyncRuns request - ListSyncRuns(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSyncRun request - CreateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncRun request - GetSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSyncRunWithBody request with any body - UpdateSyncRunWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncRunConnectorCredentials request - GetSyncRunConnectorCredentials(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncRunConnectorIdentity request - GetSyncRunConnectorIdentity(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSyncRunLogs request - GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSyncRunProgressWithBody request with any body - CreateSyncRunProgressWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSyncRunProgress(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListTeamPluginUsage request ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1801,8 +1619,8 @@ func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, apiKey return c.Client.Do(req) } -func (c *Client) ListConnectors(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListConnectorsRequest(c.Server, teamName, params) +func (c *Client) CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamImagesRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -1813,8 +1631,8 @@ func (c *Client) ListConnectors(ctx context.Context, teamName TeamName, params * return c.Client.Do(req) } -func (c *Client) CreateConnectorWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateConnectorRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) CreateTeamImages(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamImagesRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -1825,8 +1643,8 @@ func (c *Client) CreateConnectorWithBody(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) CreateConnector(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateConnectorRequest(c.Server, teamName, body) +func (c *Client) DeleteTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -1837,8 +1655,8 @@ func (c *Client) CreateConnector(ctx context.Context, teamName TeamName, body Cr return c.Client.Do(req) } -func (c *Client) GetConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetConnectorRequest(c.Server, teamName, connectorID) +func (c *Client) DeleteTeamInvitation(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamInvitationRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -1849,8 +1667,8 @@ func (c *Client) GetConnector(ctx context.Context, teamName TeamName, connectorI return c.Client.Do(req) } -func (c *Client) UpdateConnectorWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateConnectorRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamInvitationsRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -1861,8 +1679,8 @@ func (c *Client) UpdateConnectorWithBody(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) UpdateConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateConnectorRequest(c.Server, teamName, connectorID, body) +func (c *Client) EmailTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -1873,8 +1691,8 @@ func (c *Client) UpdateConnector(ctx context.Context, teamName TeamName, connect return c.Client.Do(req) } -func (c *Client) RevokeConnector(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRevokeConnectorRequest(c.Server, teamName, connectorID) +func (c *Client) EmailTeamInvitation(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTeamInvitationRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -1885,8 +1703,8 @@ func (c *Client) RevokeConnector(ctx context.Context, teamName TeamName, connect return c.Client.Do(req) } -func (c *Client) GetConnectorAuthStatusAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetConnectorAuthStatusAWSRequest(c.Server, teamName, connectorID) +func (c *Client) AcceptTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAcceptTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -1897,8 +1715,8 @@ func (c *Client) GetConnectorAuthStatusAWS(ctx context.Context, teamName TeamNam return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorFinishAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorFinishAWSRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAcceptTeamInvitationRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -1909,8 +1727,8 @@ func (c *Client) AuthenticateConnectorFinishAWSWithBody(ctx context.Context, tea return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorFinishAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorFinishAWSRequest(c.Server, teamName, connectorID, body) +func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCancelTeamInvitationRequest(c.Server, teamName, email) if err != nil { return nil, err } @@ -1921,8 +1739,8 @@ func (c *Client) AuthenticateConnectorFinishAWS(ctx context.Context, teamName Te return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorAWSWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorAWSRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListInvoicesByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -1933,8 +1751,8 @@ func (c *Client) AuthenticateConnectorAWSWithBody(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorAWS(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorAWSRequest(c.Server, teamName, connectorID, body) +func (c *Client) GetManagedDatabases(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetManagedDatabasesRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -1945,8 +1763,8 @@ func (c *Client) AuthenticateConnectorAWS(ctx context.Context, teamName TeamName return c.Client.Do(req) } -func (c *Client) GetConnectorAuthStatusGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetConnectorAuthStatusGCPRequest(c.Server, teamName, connectorID) +func (c *Client) CreateManagedDatabaseWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateManagedDatabaseRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -1957,8 +1775,8 @@ func (c *Client) GetConnectorAuthStatusGCP(ctx context.Context, teamName TeamNam return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorGCPWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorGCPRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) CreateManagedDatabase(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateManagedDatabaseRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -1969,8 +1787,8 @@ func (c *Client) AuthenticateConnectorGCPWithBody(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorGCPRequest(c.Server, teamName, connectorID, body) +func (c *Client) DeleteManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) if err != nil { return nil, err } @@ -1981,8 +1799,8 @@ func (c *Client) AuthenticateConnectorGCP(ctx context.Context, teamName TeamName return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorFinishGCP(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorFinishGCPRequest(c.Server, teamName, connectorID) +func (c *Client) GetManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) if err != nil { return nil, err } @@ -1993,8 +1811,8 @@ func (c *Client) AuthenticateConnectorFinishGCP(ctx context.Context, teamName Te return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorFinishOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorFinishOAuthRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) RemoveTeamMembershipWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemoveTeamMembershipRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -2005,8 +1823,8 @@ func (c *Client) AuthenticateConnectorFinishOAuthWithBody(ctx context.Context, t return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorFinishOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorFinishOAuthRequest(c.Server, teamName, connectorID, body) +func (c *Client) RemoveTeamMembership(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemoveTeamMembershipRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -2017,8 +1835,8 @@ func (c *Client) AuthenticateConnectorFinishOAuth(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorOAuthWithBody(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorOAuthRequestWithBody(c.Server, teamName, connectorID, contentType, body) +func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -2029,8 +1847,8 @@ func (c *Client) AuthenticateConnectorOAuthWithBody(ctx context.Context, teamNam return c.Client.Do(req) } -func (c *Client) AuthenticateConnectorOAuth(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAuthenticateConnectorOAuthRequest(c.Server, teamName, connectorID, body) +func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamMembershipRequest(c.Server, teamName, email) if err != nil { return nil, err } @@ -2041,8 +1859,8 @@ func (c *Client) AuthenticateConnectorOAuth(ctx context.Context, teamName TeamNa return c.Client.Do(req) } -func (c *Client) CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTeamImagesRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginsByTeamRequest(c.Server, teamName) if err != nil { return nil, err } @@ -2053,8 +1871,8 @@ func (c *Client) CreateTeamImagesWithBody(ctx context.Context, teamName TeamName return c.Client.Do(req) } -func (c *Client) CreateTeamImages(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTeamImagesRequest(c.Server, teamName, body) +func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginsByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -2065,8 +1883,8 @@ func (c *Client) CreateTeamImages(ctx context.Context, teamName TeamName, body C return c.Client.Do(req) } -func (c *Client) DeleteTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadPluginAssetByTeamRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params) if err != nil { return nil, err } @@ -2077,8 +1895,8 @@ func (c *Client) DeleteTeamInvitationWithBody(ctx context.Context, teamName Team return c.Client.Do(req) } -func (c *Client) DeleteTeamInvitation(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamInvitationRequest(c.Server, teamName, body) +func (c *Client) GetSettings(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSettingsRequest(c.Server, teamName) if err != nil { return nil, err } @@ -2089,8 +1907,8 @@ func (c *Client) DeleteTeamInvitation(ctx context.Context, teamName TeamName, bo return c.Client.Do(req) } -func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeamInvitationsRequest(c.Server, teamName, params) +func (c *Client) UpdateSettingsWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSettingsRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -2101,8 +1919,8 @@ func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, par return c.Client.Do(req) } -func (c *Client) EmailTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewEmailTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) UpdateSettings(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSettingsRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -2113,8 +1931,8 @@ func (c *Client) EmailTeamInvitationWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) EmailTeamInvitation(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewEmailTeamInvitationRequest(c.Server, teamName, body) +func (c *Client) GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamSpendRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -2125,8 +1943,8 @@ func (c *Client) EmailTeamInvitation(ctx context.Context, teamName TeamName, bod return c.Client.Do(req) } -func (c *Client) AcceptTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAcceptTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSpendingLimitRequest(c.Server, teamName) if err != nil { return nil, err } @@ -2137,8 +1955,8 @@ func (c *Client) AcceptTeamInvitationWithBody(ctx context.Context, teamName Team return c.Client.Do(req) } -func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAcceptTeamInvitationRequest(c.Server, teamName, body) +func (c *Client) GetSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSpendingLimitRequest(c.Server, teamName) if err != nil { return nil, err } @@ -2149,8 +1967,8 @@ func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, bo return c.Client.Do(req) } -func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCancelTeamInvitationRequest(c.Server, teamName, email) +func (c *Client) CreateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -2161,8 +1979,8 @@ func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, em return c.Client.Do(req) } -func (c *Client) ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListInvoicesByTeamRequest(c.Server, teamName, params) +func (c *Client) CreateSpendingLimit(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSpendingLimitRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -2173,8 +1991,8 @@ func (c *Client) ListInvoicesByTeam(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } -func (c *Client) GetManagedDatabases(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetManagedDatabasesRequest(c.Server, teamName, params) +func (c *Client) UpdateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -2185,8 +2003,8 @@ func (c *Client) GetManagedDatabases(ctx context.Context, teamName TeamName, par return c.Client.Do(req) } -func (c *Client) CreateManagedDatabaseWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateManagedDatabaseRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) UpdateSpendingLimit(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSpendingLimitRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -2197,8 +2015,8 @@ func (c *Client) CreateManagedDatabaseWithBody(ctx context.Context, teamName Tea return c.Client.Do(req) } -func (c *Client) CreateManagedDatabase(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateManagedDatabaseRequest(c.Server, teamName, body) +func (c *Client) ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSubscriptionOrdersByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -2209,8 +2027,8 @@ func (c *Client) CreateManagedDatabase(ctx context.Context, teamName TeamName, b return c.Client.Do(req) } -func (c *Client) DeleteManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) +func (c *Client) CreateSubscriptionOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSubscriptionOrderForTeamRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -2221,8 +2039,8 @@ func (c *Client) DeleteManagedDatabase(ctx context.Context, teamName TeamName, m return c.Client.Do(req) } -func (c *Client) GetManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) +func (c *Client) CreateSubscriptionOrderForTeam(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSubscriptionOrderForTeamRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -2233,8 +2051,8 @@ func (c *Client) GetManagedDatabase(ctx context.Context, teamName TeamName, mana return c.Client.Do(req) } -func (c *Client) RemoveTeamMembershipWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRemoveTeamMembershipRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSubscriptionOrderByTeamRequest(c.Server, teamName, teamSubscriptionOrderID) if err != nil { return nil, err } @@ -2245,8 +2063,8 @@ func (c *Client) RemoveTeamMembershipWithBody(ctx context.Context, teamName Team return c.Client.Do(req) } -func (c *Client) RemoveTeamMembership(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRemoveTeamMembershipRequest(c.Server, teamName, body) +func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -2257,8 +2075,8 @@ func (c *Client) RemoveTeamMembership(ctx context.Context, teamName TeamName, bo return c.Client.Do(req) } -func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) +func (c *Client) IncreaseTeamPluginUsageWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncreaseTeamPluginUsageRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } @@ -2269,8 +2087,8 @@ func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } -func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamMembershipRequest(c.Server, teamName, email) +func (c *Client) IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncreaseTeamPluginUsageRequest(c.Server, teamName, body) if err != nil { return nil, err } @@ -2281,8 +2099,8 @@ func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, em return c.Client.Do(req) } -func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginsByTeamRequest(c.Server, teamName) +func (c *Client) GetTeamUsageSummary(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamUsageSummaryRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -2293,8 +2111,8 @@ func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, req return c.Client.Do(req) } -func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginsByTeamRequest(c.Server, teamName, params) +func (c *Client) GetGroupedTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetGroupedTeamUsageSummaryRequest(c.Server, teamName, groupBy, params) if err != nil { return nil, err } @@ -2305,8 +2123,8 @@ func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, param return c.Client.Do(req) } -func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadPluginAssetByTeamRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params) +func (c *Client) GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamPluginUsageRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) if err != nil { return nil, err } @@ -2317,8 +2135,8 @@ func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamNam return c.Client.Do(req) } -func (c *Client) GetSettings(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSettingsRequest(c.Server, teamName) +func (c *Client) ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListUsersByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } @@ -2329,8 +2147,8 @@ func (c *Client) GetSettings(ctx context.Context, teamName TeamName, reqEditors return c.Client.Do(req) } -func (c *Client) UpdateSettingsWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSettingsRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) UploadImageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadImageRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2341,8 +2159,8 @@ func (c *Client) UpdateSettingsWithBody(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) UpdateSettings(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSettingsRequest(c.Server, teamName, body) +func (c *Client) UploadImage(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadImageRequest(c.Server, body) if err != nil { return nil, err } @@ -2353,8 +2171,8 @@ func (c *Client) UpdateSettings(ctx context.Context, teamName TeamName, body Upd return c.Client.Do(req) } -func (c *Client) GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamSpendRequest(c.Server, teamName, params) +func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentUserRequest(c.Server) if err != nil { return nil, err } @@ -2365,8 +2183,8 @@ func (c *Client) GetTeamSpend(ctx context.Context, teamName TeamName, params *Ge return c.Client.Do(req) } -func (c *Client) DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSpendingLimitRequest(c.Server, teamName) +func (c *Client) UpdateCurrentUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCurrentUserRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2377,8 +2195,8 @@ func (c *Client) DeleteSpendingLimit(ctx context.Context, teamName TeamName, req return c.Client.Do(req) } -func (c *Client) GetSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSpendingLimitRequest(c.Server, teamName) +func (c *Client) UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCurrentUserRequest(c.Server, body) if err != nil { return nil, err } @@ -2389,8 +2207,8 @@ func (c *Client) GetSpendingLimit(ctx context.Context, teamName TeamName, reqEdi return c.Client.Do(req) } -func (c *Client) CreateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) SendAnonymousEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendAnonymousEventRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2401,8 +2219,8 @@ func (c *Client) CreateSpendingLimitWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) CreateSpendingLimit(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSpendingLimitRequest(c.Server, teamName, body) +func (c *Client) SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendAnonymousEventRequest(c.Server, body) if err != nil { return nil, err } @@ -2413,8 +2231,8 @@ func (c *Client) CreateSpendingLimit(ctx context.Context, teamName TeamName, bod return c.Client.Do(req) } -func (c *Client) UpdateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) CheckUserAuthStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCheckUserAuthStatusRequest(c.Server) if err != nil { return nil, err } @@ -2425,8 +2243,8 @@ func (c *Client) UpdateSpendingLimitWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) UpdateSpendingLimit(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSpendingLimitRequest(c.Server, teamName, body) +func (c *Client) UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCustomerRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2437,8 +2255,8 @@ func (c *Client) UpdateSpendingLimit(ctx context.Context, teamName TeamName, bod return c.Client.Do(req) } -func (c *Client) ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSubscriptionOrdersByTeamRequest(c.Server, teamName, params) +func (c *Client) UpdateCustomer(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCustomerRequest(c.Server, body) if err != nil { return nil, err } @@ -2449,8 +2267,8 @@ func (c *Client) ListSubscriptionOrdersByTeam(ctx context.Context, teamName Team return c.Client.Do(req) } -func (c *Client) CreateSubscriptionOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSubscriptionOrderForTeamRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendUserEventRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2461,8 +2279,8 @@ func (c *Client) CreateSubscriptionOrderForTeamWithBody(ctx context.Context, tea return c.Client.Do(req) } -func (c *Client) CreateSubscriptionOrderForTeam(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSubscriptionOrderForTeamRequest(c.Server, teamName, body) +func (c *Client) SendUserEvent(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendUserEventRequest(c.Server, body) if err != nil { return nil, err } @@ -2473,8 +2291,8 @@ func (c *Client) CreateSubscriptionOrderForTeam(ctx context.Context, teamName Te return c.Client.Do(req) } -func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSubscriptionOrderByTeamRequest(c.Server, teamName, teamSubscriptionOrderID) +func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListCurrentUserInvitationsRequest(c.Server, params) if err != nil { return nil, err } @@ -2485,9 +2303,9 @@ func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamNa return c.Client.Do(req) } -func (c *Client) CreateSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncDestinationTestConnectionRequestWithBody(c.Server, teamName, contentType, body) - if err != nil { +func (c *Client) LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLogoutUserRequest(c.Server) + if err != nil { return nil, err } req = req.WithContext(ctx) @@ -2497,8 +2315,8 @@ func (c *Client) CreateSyncDestinationTestConnectionWithBody(ctx context.Context return c.Client.Do(req) } -func (c *Client) CreateSyncDestinationTestConnection(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncDestinationTestConnectionRequest(c.Server, teamName, body) +func (c *Client) LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLoginUserRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2509,8 +2327,8 @@ func (c *Client) CreateSyncDestinationTestConnection(ctx context.Context, teamNa return c.Client.Do(req) } -func (c *Client) GetSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncDestinationTestConnectionRequest(c.Server, teamName, syncDestinationTestConnectionID) +func (c *Client) LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLoginUserRequest(c.Server, body) if err != nil { return nil, err } @@ -2521,8 +2339,8 @@ func (c *Client) GetSyncDestinationTestConnection(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) UpdateSyncTestConnectionForSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody(c.Server, teamName, syncDestinationTestConnectionID, contentType, body) +func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentUserMembershipsRequest(c.Server, params) if err != nil { return nil, err } @@ -2533,8 +2351,8 @@ func (c *Client) UpdateSyncTestConnectionForSyncDestinationWithBody(ctx context. return c.Client.Do(req) } -func (c *Client) UpdateSyncTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationTestConnectionID, body) +func (c *Client) RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRegisterUserRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2545,8 +2363,8 @@ func (c *Client) UpdateSyncTestConnectionForSyncDestination(ctx context.Context, return c.Client.Do(req) } -func (c *Client) PromoteSyncDestinationTestConnectionWithBody(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPromoteSyncDestinationTestConnectionRequestWithBody(c.Server, teamName, syncDestinationTestConnectionID, contentType, body) +func (c *Client) RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRegisterUserRequest(c.Server, body) if err != nil { return nil, err } @@ -2557,8 +2375,8 @@ func (c *Client) PromoteSyncDestinationTestConnectionWithBody(ctx context.Contex return c.Client.Do(req) } -func (c *Client) PromoteSyncDestinationTestConnection(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPromoteSyncDestinationTestConnectionRequest(c.Server, teamName, syncDestinationTestConnectionID, body) +func (c *Client) ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewResetUserPasswordRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2569,8 +2387,8 @@ func (c *Client) PromoteSyncDestinationTestConnection(ctx context.Context, teamN return c.Client.Do(req) } -func (c *Client) ListSyncDestinations(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSyncDestinationsRequest(c.Server, teamName, params) +func (c *Client) ResetUserPassword(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewResetUserPasswordRequest(c.Server, body) if err != nil { return nil, err } @@ -2581,8 +2399,8 @@ func (c *Client) ListSyncDestinations(ctx context.Context, teamName TeamName, pa return c.Client.Do(req) } -func (c *Client) DeleteSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSyncDestinationRequest(c.Server, teamName, syncDestinationName) +func (c *Client) DeterminePlatformTenantByEmail(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeterminePlatformTenantByEmailRequest(c.Server, params) if err != nil { return nil, err } @@ -2593,8 +2411,8 @@ func (c *Client) DeleteSyncDestination(ctx context.Context, teamName TeamName, s return c.Client.Do(req) } -func (c *Client) GetSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncDestinationRequest(c.Server, teamName, syncDestinationName) +func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUserTokenRequest(c.Server) if err != nil { return nil, err } @@ -2605,8 +2423,8 @@ func (c *Client) GetSyncDestination(ctx context.Context, teamName TeamName, sync return c.Client.Do(req) } -func (c *Client) UpdateSyncDestinationWithBody(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncDestinationRequestWithBody(c.Server, teamName, syncDestinationName, contentType, body) +func (c *Client) UserTOTPDelete(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPDeleteRequest(c.Server) if err != nil { return nil, err } @@ -2617,8 +2435,8 @@ func (c *Client) UpdateSyncDestinationWithBody(ctx context.Context, teamName Tea return c.Client.Do(req) } -func (c *Client) UpdateSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncDestinationRequest(c.Server, teamName, syncDestinationName, body) +func (c *Client) UserTOTPSetup(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPSetupRequest(c.Server) if err != nil { return nil, err } @@ -2629,8 +2447,8 @@ func (c *Client) UpdateSyncDestination(ctx context.Context, teamName TeamName, s return c.Client.Do(req) } -func (c *Client) ListSyncDestinationSyncs(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSyncDestinationSyncsRequest(c.Server, teamName, syncDestinationName, params) +func (c *Client) UserTOTPVerifyWithBody(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPVerifyRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -2641,8 +2459,8 @@ func (c *Client) ListSyncDestinationSyncs(ctx context.Context, teamName TeamName return c.Client.Do(req) } -func (c *Client) GetTestConnectionForSyncDestination(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTestConnectionForSyncDestinationRequest(c.Server, teamName, syncDestinationName, syncTestConnectionId) +func (c *Client) UserTOTPVerify(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPVerifyRequest(c.Server, params, body) if err != nil { return nil, err } @@ -2653,8 +2471,8 @@ func (c *Client) GetTestConnectionForSyncDestination(ctx context.Context, teamNa return c.Client.Do(req) } -func (c *Client) CreateSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncSourceTestConnectionRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVerifyUserEmailRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -2665,8 +2483,8 @@ func (c *Client) CreateSyncSourceTestConnectionWithBody(ctx context.Context, tea return c.Client.Do(req) } -func (c *Client) CreateSyncSourceTestConnection(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncSourceTestConnectionRequest(c.Server, teamName, body) +func (c *Client) VerifyUserEmail(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVerifyUserEmailRequest(c.Server, body) if err != nil { return nil, err } @@ -2677,8 +2495,8 @@ func (c *Client) CreateSyncSourceTestConnection(ctx context.Context, teamName Te return c.Client.Do(req) } -func (c *Client) GetSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncSourceTestConnectionRequest(c.Server, teamName, syncSourceTestConnectionID) +func (c *Client) DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteUserRequest(c.Server, userID) if err != nil { return nil, err } @@ -2689,812 +2507,892 @@ func (c *Client) GetSyncSourceTestConnection(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) UpdateSyncTestConnectionForSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionForSyncSourceRequestWithBody(c.Server, teamName, syncSourceTestConnectionID, contentType, body) +// NewHealthCheckRequest generates requests for HealthCheck +func NewHealthCheckRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) UpdateSyncTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceTestConnectionID, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { return nil, err } - return c.Client.Do(req) + + return req, nil } -func (c *Client) PromoteSyncSourceTestConnectionWithBody(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPromoteSyncSourceTestConnectionRequestWithBody(c.Server, teamName, syncSourceTestConnectionID, contentType, body) +// NewListAddonsRequest generates requests for ListAddons +func NewListAddonsRequest(server string, params *ListAddonsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) PromoteSyncSourceTestConnection(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPromoteSyncSourceTestConnectionRequest(c.Server, teamName, syncSourceTestConnectionID, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if params.SortBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) ListSyncSources(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSyncSourcesRequest(c.Server, teamName, params) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) DeleteSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSyncSourceRequest(c.Server, teamName, syncSourceName) +// NewCreateAddonRequest calls the generic CreateAddon builder with application/json body +func NewCreateAddonRequest(server string, body CreateAddonJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewCreateAddonRequestWithBody(server, "application/json", bodyReader) } -func (c *Client) GetSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncSourceRequest(c.Server, teamName, syncSourceName) +// NewCreateAddonRequestWithBody generates requests for CreateAddon with any type of body +func NewCreateAddonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) UpdateSyncSourceWithBody(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncSourceRequestWithBody(c.Server, teamName, syncSourceName, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { return nil, err } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) UpdateSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncSourceRequest(c.Server, teamName, syncSourceName, body) +// NewDeleteAddonByTeamAndNameRequest generates requests for DeleteAddonByTeamAndName +func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) ListSyncSourceSyncs(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSyncSourceSyncsRequest(c.Server, teamName, syncSourceName, params) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) GetTestConnectionForSyncSource(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTestConnectionForSyncSourceRequest(c.Server, teamName, syncSourceName, syncTestConnectionId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) ListSyncs(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSyncsRequest(c.Server, teamName, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { return nil, err } - return c.Client.Do(req) + + return req, nil } -func (c *Client) CreateSyncWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncRequestWithBody(c.Server, teamName, contentType, body) +// NewGetAddonRequest generates requests for GetAddon +func NewGetAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncRequest(c.Server, teamName, body) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTestConnectionConnectorCredentialsRequest(c.Server, teamName, syncTestConnectionId, connectorID) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) GetTestConnectionConnectorIdentity(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTestConnectionConnectorIdentityRequest(c.Server, teamName, syncTestConnectionId, connectorID) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { return nil, err } - return c.Client.Do(req) + + return req, nil } -func (c *Client) DeleteSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSyncRequest(c.Server, teamName, syncName) +// NewUpdateAddonRequest calls the generic UpdateAddon builder with application/json body +func NewUpdateAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewUpdateAddonRequestWithBody(server, teamName, addonType, addonName, "application/json", bodyReader) } -func (c *Client) GetSync(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncRequest(c.Server, teamName, syncName) +// NewUpdateAddonRequestWithBody generates requests for UpdateAddon with any type of body +func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) UpdateSyncWithBody(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncRequestWithBody(c.Server, teamName, syncName, contentType, body) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) UpdateSync(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncRequest(c.Server, teamName, syncName, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) ListSyncRuns(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSyncRunsRequest(c.Server, teamName, syncName, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { return nil, err } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) CreateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncRunRequest(c.Server, teamName, syncName) +// NewListAddonVersionsRequest generates requests for ListAddonVersions +func NewListAddonVersionsRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) GetSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncRunRequest(c.Server, teamName, syncName, syncRunId) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) UpdateSyncRunWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncRunRequestWithBody(c.Server, teamName, syncName, syncRunId, contentType, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) UpdateSyncRun(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncRunRequest(c.Server, teamName, syncName, syncRunId, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if params.SortBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeDrafts != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) GetSyncRunConnectorCredentials(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncRunConnectorCredentialsRequest(c.Server, teamName, syncName, syncRunId, connectorID) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) GetSyncRunConnectorIdentity(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncRunConnectorIdentityRequest(c.Server, teamName, syncName, syncRunId, connectorID) +// NewGetAddonVersionRequest generates requests for GetAddonVersion +func NewGetAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) GetSyncRunLogs(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSyncRunLogsRequest(c.Server, teamName, syncName, syncRunId, params) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) CreateSyncRunProgressWithBody(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncRunProgressRequestWithBody(c.Server, teamName, syncName, syncRunId, contentType, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) CreateSyncRunProgress(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSyncRunProgressRequest(c.Server, teamName, syncName, syncRunId, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { return nil, err } - return c.Client.Do(req) + + return req, nil } -func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) +// NewUpdateAddonVersionRequest calls the generic UpdateAddonVersion builder with application/json body +func NewUpdateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + bodyReader = bytes.NewReader(buf) + return NewUpdateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) +} + +// NewUpdateAddonVersionRequestWithBody generates requests for UpdateAddonVersion with any type of body +func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) IncreaseTeamPluginUsageWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncreaseTeamPluginUsageRequestWithBody(c.Server, teamName, contentType, body) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewIncreaseTeamPluginUsageRequest(c.Server, teamName, body) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) GetTeamUsageSummary(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamUsageSummaryRequest(c.Server, teamName, params) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) GetGroupedTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetGroupedTeamUsageSummaryRequest(c.Server, teamName, groupBy, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { return nil, err } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamPluginUsageRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) +// NewCreateAddonVersionRequest calls the generic CreateAddonVersion builder with application/json body +func NewCreateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewCreateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) } -func (c *Client) ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUsersByTeamRequest(c.Server, teamName, params) +// NewCreateAddonVersionRequestWithBody generates requests for CreateAddonVersion with any type of body +func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) UploadImageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUploadImageRequestWithBody(c.Server, contentType, body) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) UploadImage(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUploadImageRequest(c.Server, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentUserRequest(c.Server) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { return nil, err } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) UpdateCurrentUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateCurrentUserRequestWithBody(c.Server, contentType, body) +// NewDownloadAddonAssetRequest generates requests for DownloadAddonAsset +func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateCurrentUserRequest(c.Server, body) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) SendAnonymousEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSendAnonymousEventRequestWithBody(c.Server, contentType, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSendAnonymousEventRequest(c.Server, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) CheckUserAuthStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCheckUserAuthStatusRequest(c.Server) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + } - return c.Client.Do(req) + + return req, nil } -func (c *Client) UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateCustomerRequestWithBody(c.Server, contentType, body) +// NewUploadAddonAssetRequest generates requests for UploadAddonAsset +func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) UpdateCustomer(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateCustomerRequest(c.Server, body) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSendUserEventRequestWithBody(c.Server, contentType, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) SendUserEvent(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSendUserEventRequest(c.Server, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { return nil, err } - return c.Client.Do(req) + + return req, nil } -func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListCurrentUserInvitationsRequest(c.Server, params) +// NewCQHealthCheckRequest generates requests for CQHealthCheck +func NewCQHealthCheckRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewLogoutUserRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + operationPath := fmt.Sprintf("/cq-healthcheck") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewLoginUserRequestWithBody(c.Server, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewLoginUserRequest(c.Server, body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentUserMembershipsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + return req, nil } -func (c *Client) RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRegisterUserRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} +// NewGetOpenAPIJSONRequest generates requests for GetOpenAPIJSON +func NewGetOpenAPIJSONRequest(server string) (*http.Request, error) { + var err error -func (c *Client) RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRegisterUserRequest(c.Server, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/openapi.json") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewResetUserPasswordRequestWithBody(c.Server, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) ResetUserPassword(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewResetUserPasswordRequest(c.Server, body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) DeterminePlatformTenantByEmail(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeterminePlatformTenantByEmailRequest(c.Server, params) +// NewActivatePlatformRequest calls the generic ActivatePlatform builder with application/json body +func NewActivatePlatformRequest(server string, body ActivatePlatformJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewActivatePlatformRequestWithBody(server, "application/json", bodyReader) } -func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUserTokenRequest(c.Server) +// NewActivatePlatformRequestWithBody generates requests for ActivatePlatform with any type of body +func NewActivatePlatformRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/platform/activate") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) UserTOTPDelete(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUserTOTPDeleteRequest(c.Server) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) UserTOTPSetup(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUserTOTPSetupRequest(c.Server) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) UserTOTPVerifyWithBody(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUserTOTPVerifyRequestWithBody(c.Server, params, contentType, body) +// NewRenewPlatformActivationRequest calls the generic RenewPlatformActivation builder with application/json body +func NewRenewPlatformActivationRequest(server string, body RenewPlatformActivationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewRenewPlatformActivationRequestWithBody(server, "application/json", bodyReader) } -func (c *Client) UserTOTPVerify(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUserTOTPVerifyRequest(c.Server, params, body) +// NewRenewPlatformActivationRequestWithBody generates requests for RenewPlatformActivation with any type of body +func NewRenewPlatformActivationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/platform/activate/renew") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewVerifyUserEmailRequestWithBody(c.Server, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) VerifyUserEmail(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewVerifyUserEmailRequest(c.Server, body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUserRequest(c.Server, userID) +// NewReportPlatformDataRequest calls the generic ReportPlatformData builder with application/json body +func NewReportPlatformDataRequest(server string, body ReportPlatformDataJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewReportPlatformDataRequestWithBody(server, "application/json", bodyReader) } -// NewHealthCheckRequest generates requests for HealthCheck -func NewHealthCheckRequest(server string) (*http.Request, error) { +// NewReportPlatformDataRequestWithBody generates requests for ReportPlatformData with any type of body +func NewReportPlatformDataRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3502,7 +3400,7 @@ func NewHealthCheckRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/") + operationPath := fmt.Sprintf("/platform/report") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3512,16 +3410,18 @@ func NewHealthCheckRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListAddonsRequest generates requests for ListAddons -func NewListAddonsRequest(server string, params *ListAddonsParams) (*http.Request, error) { +// NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests +func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3529,7 +3429,7 @@ func NewListAddonsRequest(server string, params *ListAddonsParams) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/addons") + operationPath := fmt.Sprintf("/plugin-notification-requests") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3542,22 +3442,6 @@ func NewListAddonsRequest(server string, params *ListAddonsParams) (*http.Reques if params != nil { queryValues := queryURL.Query() - if params.SortBy != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.Page != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { @@ -3601,19 +3485,19 @@ func NewListAddonsRequest(server string, params *ListAddonsParams) (*http.Reques return req, nil } -// NewCreateAddonRequest calls the generic CreateAddon builder with application/json body -func NewCreateAddonRequest(server string, body CreateAddonJSONRequestBody) (*http.Request, error) { +// NewCreatePluginNotificationRequestRequest calls the generic CreatePluginNotificationRequest builder with application/json body +func NewCreatePluginNotificationRequestRequest(server string, body CreatePluginNotificationRequestJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateAddonRequestWithBody(server, "application/json", bodyReader) + return NewCreatePluginNotificationRequestRequestWithBody(server, "application/json", bodyReader) } -// NewCreateAddonRequestWithBody generates requests for CreateAddon with any type of body -func NewCreateAddonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePluginNotificationRequestRequestWithBody generates requests for CreatePluginNotificationRequest with any type of body +func NewCreatePluginNotificationRequestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3621,7 +3505,7 @@ func NewCreateAddonRequestWithBody(server string, contentType string, body io.Re return nil, err } - operationPath := fmt.Sprintf("/addons") + operationPath := fmt.Sprintf("/plugin-notification-requests") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3641,27 +3525,27 @@ func NewCreateAddonRequestWithBody(server string, contentType string, body io.Re return req, nil } -// NewDeleteAddonByTeamAndNameRequest generates requests for DeleteAddonByTeamAndName -func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { +// NewDeletePluginNotificationRequestRequest generates requests for DeletePluginNotificationRequest +func NewDeletePluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -3671,7 +3555,7 @@ func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonT return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3689,27 +3573,27 @@ func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonT return req, nil } -// NewGetAddonRequest generates requests for GetAddon -func NewGetAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { +// NewGetPluginNotificationRequestRequest generates requests for GetPluginNotificationRequest +func NewGetPluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -3719,7 +3603,7 @@ func NewGetAddonRequest(server string, teamName TeamName, addonType AddonType, a return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3737,98 +3621,16 @@ func NewGetAddonRequest(server string, teamName TeamName, addonType AddonType, a return req, nil } -// NewUpdateAddonRequest calls the generic UpdateAddon builder with application/json body -func NewUpdateAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateAddonRequestWithBody(server, teamName, addonType, addonName, "application/json", bodyReader) -} - -// NewUpdateAddonRequestWithBody generates requests for UpdateAddon with any type of body -func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListAddonVersionsRequest generates requests for ListAddonVersions -func NewListAddonVersionsRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams) (*http.Request, error) { +// NewListPluginsRequest generates requests for ListPlugins +func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3889,9 +3691,25 @@ func NewListAddonVersionsRequest(server string, teamName TeamName, addonType Add } - if params.IncludeDrafts != nil { + if params.IncludeReleaseStages != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_release_stages", runtime.ParamLocationQuery, *params.IncludeReleaseStages); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExcludeReleaseStages != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "exclude_release_stages", runtime.ParamLocationQuery, *params.ExcludeReleaseStages); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3916,34 +3734,67 @@ func NewListAddonVersionsRequest(server string, teamName TeamName, addonType Add return req, nil } -// NewGetAddonVersionRequest generates requests for GetAddonVersion -func NewGetAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { +// NewCreatePluginRequest calls the generic CreatePlugin builder with application/json body +func NewCreatePluginRequest(server string, body CreatePluginJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreatePluginRequestWithBody generates requests for CreatePlugin with any type of body +func NewCreatePluginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + operationPath := fmt.Sprintf("/plugins") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam1 string + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName +func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - var pathParam2 string + var pathParam1 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - var pathParam3 string + var pathParam2 string - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -3953,7 +3804,7 @@ func NewGetAddonVersionRequest(server string, teamName TeamName, addonType Addon return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3963,7 +3814,7 @@ func NewGetAddonVersionRequest(server string, teamName TeamName, addonType Addon return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -3971,19 +3822,8 @@ func NewGetAddonVersionRequest(server string, teamName TeamName, addonType Addon return req, nil } -// NewUpdateAddonVersionRequest calls the generic UpdateAddonVersion builder with application/json body -func NewUpdateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) -} - -// NewUpdateAddonVersionRequestWithBody generates requests for UpdateAddonVersion with any type of body -func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetPluginRequest generates requests for GetPlugin +func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -3995,21 +3835,14 @@ func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addo var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -4019,7 +3852,7 @@ func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addo return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4029,29 +3862,27 @@ func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addo return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewCreateAddonVersionRequest calls the generic CreateAddonVersion builder with application/json body -func NewCreateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody) (*http.Request, error) { +// NewUpdatePluginRequest calls the generic UpdatePlugin builder with application/json body +func NewUpdatePluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) + return NewUpdatePluginRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) } -// NewCreateAddonVersionRequestWithBody generates requests for CreateAddonVersion with any type of body -func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdatePluginRequestWithBody generates requests for UpdatePlugin with any type of body +func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -4063,21 +3894,14 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -4087,7 +3911,7 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4097,7 +3921,7 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -4107,8 +3931,8 @@ func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addo return req, nil } -// NewDownloadAddonAssetRequest generates requests for DownloadAddonAsset -func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams) (*http.Request, error) { +// NewDeletePluginUpcomingPriceChangesRequest generates requests for DeletePluginUpcomingPriceChanges +func NewDeletePluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -4120,21 +3944,14 @@ func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType Ad var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } @@ -4144,7 +3961,7 @@ func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType Ad return nil, err } - operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4154,31 +3971,16 @@ func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType Ad return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - if params != nil { - - if params.Accept != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) - if err != nil { - return nil, err - } - - req.Header.Set("Accept", headerParam0) - } - - } - return req, nil } -// NewUploadAddonAssetRequest generates requests for UploadAddonAsset -func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { +// NewListPluginUpcomingPriceChangesRequest generates requests for ListPluginUpcomingPriceChanges +func NewListPluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -4190,85 +3992,24 @@ func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType Addo var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCQHealthCheckRequest generates requests for CQHealthCheck -func NewCQHealthCheckRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/cq-healthcheck") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - return req, nil -} - -// NewGetOpenAPIJSONRequest generates requests for GetOpenAPIJSON -func NewGetOpenAPIJSONRequest(server string) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/openapi.json") + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4286,67 +4027,48 @@ func NewGetOpenAPIJSONRequest(server string) (*http.Request, error) { return req, nil } -// NewActivatePlatformRequest calls the generic ActivatePlatform builder with application/json body -func NewActivatePlatformRequest(server string, body ActivatePlatformJSONRequestBody) (*http.Request, error) { +// NewCreatePluginUpcomingPriceChangeRequest calls the generic CreatePluginUpcomingPriceChange builder with application/json body +func NewCreatePluginUpcomingPriceChangeRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewActivatePlatformRequestWithBody(server, "application/json", bodyReader) + return NewCreatePluginUpcomingPriceChangeRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) } -// NewActivatePlatformRequestWithBody generates requests for ActivatePlatform with any type of body -func NewActivatePlatformRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreatePluginUpcomingPriceChangeRequestWithBody generates requests for CreatePluginUpcomingPriceChange with any type of body +func NewCreatePluginUpcomingPriceChangeRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/platform/activate") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam0 string - queryURL, err := serverURL.Parse(operationPath) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} + var pathParam2 string -// NewRenewPlatformActivationRequest calls the generic RenewPlatformActivation builder with application/json body -func NewRenewPlatformActivationRequest(server string, body RenewPlatformActivationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewRenewPlatformActivationRequestWithBody(server, "application/json", bodyReader) -} - -// NewRenewPlatformActivationRequestWithBody generates requests for RenewPlatformActivation with any type of body -func NewRenewPlatformActivationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/platform/activate/renew") + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4366,56 +4088,37 @@ func NewRenewPlatformActivationRequestWithBody(server string, contentType string return req, nil } -// NewReportPlatformDataRequest calls the generic ReportPlatformData builder with application/json body -func NewReportPlatformDataRequest(server string, body ReportPlatformDataJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewReportPlatformDataRequestWithBody(server, "application/json", bodyReader) -} - -// NewReportPlatformDataRequestWithBody generates requests for ReportPlatformData with any type of body -func NewReportPlatformDataRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewListPluginVersionsRequest generates requests for ListPluginVersions +func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/platform/report") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests -func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugin-notification-requests") + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4428,6 +4131,22 @@ func NewListPluginNotificationRequestsRequest(server string, params *ListPluginN if params != nil { queryValues := queryURL.Query() + if params.SortBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.Page != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { @@ -4460,6 +4179,70 @@ func NewListPluginNotificationRequestsRequest(server string, params *ListPluginN } + if params.IncludeDrafts != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeFips != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_fips", runtime.ParamLocationQuery, *params.IncludeFips); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludePrereleases != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_prereleases", runtime.ParamLocationQuery, *params.IncludePrereleases); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VersionFilter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version_filter", runtime.ParamLocationQuery, *params.VersionFilter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -4471,27 +4254,44 @@ func NewListPluginNotificationRequestsRequest(server string, params *ListPluginN return req, nil } -// NewCreatePluginNotificationRequestRequest calls the generic CreatePluginNotificationRequest builder with application/json body -func NewCreatePluginNotificationRequestRequest(server string, body CreatePluginNotificationRequestJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewGetPluginVersionRequest generates requests for GetPluginVersion +func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginNotificationRequestRequestWithBody(server, "application/json", bodyReader) -} -// NewCreatePluginNotificationRequestRequestWithBody generates requests for CreatePluginNotificationRequest with any type of body -func NewCreatePluginNotificationRequestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugin-notification-requests") + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4501,23 +4301,32 @@ func NewCreatePluginNotificationRequestRequestWithBody(server string, contentTyp return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeletePluginNotificationRequestRequest generates requests for DeletePluginNotificationRequest -func NewDeletePluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body +func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body +func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -4536,12 +4345,19 @@ func NewDeletePluginNotificationRequestRequest(server string, pluginTeam PluginT return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4551,21 +4367,34 @@ func NewDeletePluginNotificationRequestRequest(server string, pluginTeam PluginT return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetPluginNotificationRequestRequest generates requests for GetPluginNotificationRequest -func NewGetPluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body +func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body +func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -4584,12 +4413,19 @@ func NewGetPluginNotificationRequestRequest(server string, pluginTeam PluginTeam return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4599,148 +4435,61 @@ func NewGetPluginNotificationRequestRequest(server string, pluginTeam PluginTeam return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListPluginsRequest generates requests for ListPlugins -func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Request, error) { +// NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset +func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.SortBy != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludeReleaseStages != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_release_stages", runtime.ParamLocationQuery, *params.IncludeReleaseStages); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ExcludeReleaseStages != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "exclude_release_stages", runtime.ParamLocationQuery, *params.ExcludeReleaseStages); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } + var pathParam2 string - queryURL.RawQuery = queryValues.Encode() + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } - return req, nil -} + var pathParam4 string -// NewCreatePluginRequest calls the generic CreatePlugin builder with application/json body -func NewCreatePluginRequest(server string, body CreatePluginJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreatePluginRequestWithBody generates requests for CreatePlugin with any type of body -func NewCreatePluginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins") + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4750,18 +4499,31 @@ func NewCreatePluginRequestWithBody(server string, contentType string, body io.R return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } return req, nil } -// NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName -func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewUploadPluginAssetRequest generates requests for UploadPluginAsset +func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { var err error var pathParam0 string @@ -4785,22 +4547,36 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, return nil, err } - serverURL, err := url.Parse(server) + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam4 string - queryURL, err := serverURL.Parse(operationPath) + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) if err != nil { return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -4808,8 +4584,19 @@ func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, return req, nil } -// NewGetPluginRequest generates requests for GetPlugin -func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewDeletePluginVersionDocsRequest calls the generic DeletePluginVersionDocs builder with application/json body +func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewDeletePluginVersionDocsRequestWithBody generates requests for DeletePluginVersionDocs with any type of body +func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -4833,12 +4620,19 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4848,27 +4642,18 @@ func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewUpdatePluginRequest calls the generic UpdatePlugin builder with application/json body -func NewUpdatePluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdatePluginRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) + return req, nil } -// NewUpdatePluginRequestWithBody generates requests for UpdatePlugin with any type of body -func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { +// NewListPluginVersionDocsRequest generates requests for ListPluginVersionDocs +func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { var err error var pathParam0 string @@ -4892,12 +4677,19 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4907,18 +4699,65 @@ func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeletePluginUpcomingPriceChangesRequest generates requests for DeletePluginUpcomingPriceChanges -func NewDeletePluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewReplacePluginVersionDocsRequest calls the generic ReplacePluginVersionDocs builder with application/json body +func NewReplacePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewReplacePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewReplacePluginVersionDocsRequestWithBody generates requests for ReplacePluginVersionDocs with any type of body +func NewReplacePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -4942,12 +4781,19 @@ func NewDeletePluginUpcomingPriceChangesRequest(server string, teamName TeamName return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4957,16 +4803,29 @@ func NewDeletePluginUpcomingPriceChangesRequest(server string, teamName TeamName return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListPluginUpcomingPriceChangesRequest generates requests for ListPluginUpcomingPriceChanges -func NewListPluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { +// NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body +func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewCreatePluginVersionDocsRequestWithBody generates requests for CreatePluginVersionDocs with any type of body +func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -4990,12 +4849,19 @@ func NewListPluginUpcomingPriceChangesRequest(server string, teamName TeamName, return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5005,27 +4871,29 @@ func NewListPluginUpcomingPriceChangesRequest(server string, teamName TeamName, return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCreatePluginUpcomingPriceChangeRequest calls the generic CreatePluginUpcomingPriceChange builder with application/json body -func NewCreatePluginUpcomingPriceChangeRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody) (*http.Request, error) { +// NewDeletePluginVersionTablesRequest calls the generic DeletePluginVersionTables builder with application/json body +func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginUpcomingPriceChangeRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) + return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } -// NewCreatePluginUpcomingPriceChangeRequestWithBody generates requests for CreatePluginUpcomingPriceChange with any type of body -func NewCreatePluginUpcomingPriceChangeRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeletePluginVersionTablesRequestWithBody generates requests for DeletePluginVersionTables with any type of body +func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5049,12 +4917,19 @@ func NewCreatePluginUpcomingPriceChangeRequestWithBody(server string, teamName T return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5064,7 +4939,7 @@ func NewCreatePluginUpcomingPriceChangeRequestWithBody(server string, teamName T return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } @@ -5074,8 +4949,8 @@ func NewCreatePluginUpcomingPriceChangeRequestWithBody(server string, teamName T return req, nil } -// NewListPluginVersionsRequest generates requests for ListPluginVersions -func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { +// NewListPluginVersionTablesRequest generates requests for ListPluginVersionTables +func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { var err error var pathParam0 string @@ -5099,12 +4974,19 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P return nil, err } + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5117,22 +4999,6 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P if params != nil { queryValues := queryURL.Query() - if params.SortBy != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.Page != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { @@ -5165,83 +5031,30 @@ func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind P } - if params.IncludeDrafts != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.IncludeFips != nil { +// NewCreatePluginVersionTablesRequest calls the generic CreatePluginVersionTables builder with application/json body +func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_fips", runtime.ParamLocationQuery, *params.IncludeFips); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludePrereleases != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_prereleases", runtime.ParamLocationQuery, *params.IncludePrereleases); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.VersionFilter != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version_filter", runtime.ParamLocationQuery, *params.VersionFilter); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetPluginVersionRequest generates requests for GetPluginVersion -func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { +// NewCreatePluginVersionTablesRequestWithBody generates requests for CreatePluginVersionTables with any type of body +func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5277,7 +5090,7 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind Plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5287,27 +5100,18 @@ func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind Plu return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body -func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return req, nil } -// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body -func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetPluginVersionTableRequest generates requests for GetPluginVersionTable +func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { var err error var pathParam0 string @@ -5338,70 +5142,9 @@ func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body -func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) -} - -// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body -func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string + var pathParam4 string - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) if err != nil { return nil, err } @@ -5411,7 +5154,7 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5421,18 +5164,16 @@ func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, plu return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset -func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams) (*http.Request, error) { +// NewRemovePluginUIAssetsRequest generates requests for RemovePluginUIAssets +func NewRemovePluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -5463,19 +5204,12 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind return nil, err } - var pathParam4 string - - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5485,31 +5219,27 @@ func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - if params != nil { - - if params.Accept != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) - if err != nil { - return nil, err - } - - req.Header.Set("Accept", headerParam0) - } + return req, nil +} +// NewUploadPluginUIAssetsRequest calls the generic UploadPluginUIAssets builder with application/json body +func NewUploadPluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewUploadPluginUIAssetsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } -// NewUploadPluginAssetRequest generates requests for UploadPluginAsset -func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { +// NewUploadPluginUIAssetsRequestWithBody generates requests for UploadPluginUIAssets with any type of body +func NewUploadPluginUIAssetsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5540,19 +5270,12 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind Pl return nil, err } - var pathParam4 string - - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5562,27 +5285,29 @@ func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind Pl return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewDeletePluginVersionDocsRequest calls the generic DeletePluginVersionDocs builder with application/json body -func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { +// NewFinalizePluginUIAssetUploadRequest calls the generic FinalizePluginUIAssetUpload builder with application/json body +func NewFinalizePluginUIAssetUploadRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewFinalizePluginUIAssetUploadRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) } -// NewDeletePluginVersionDocsRequestWithBody generates requests for DeletePluginVersionDocs with any type of body -func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewFinalizePluginUIAssetUploadRequestWithBody generates requests for FinalizePluginUIAssetUpload with any type of body +func NewFinalizePluginUIAssetUploadRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5618,7 +5343,7 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5628,7 +5353,7 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -5638,44 +5363,16 @@ func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, return req, nil } -// NewListPluginVersionDocsRequest generates requests for ListPluginVersionDocs -func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { +// NewAuthRegistryRequestRequest generates requests for AuthRegistryRequest +func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/registry/auth") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5688,9 +5385,9 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKin if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.Account != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "account", runtime.ParamLocationQuery, *params.Account); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5704,9 +5401,25 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKin } - if params.PerPage != nil { + if params.Service != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service", runtime.ParamLocationQuery, *params.Service); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Scope != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5728,58 +5441,121 @@ func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKin return nil, err } - return req, nil -} + if params != nil { + + if params.XMetaPluginVersion != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-Plugin-Version", runtime.ParamLocationHeader, *params.XMetaPluginVersion) + if err != nil { + return nil, err + } + + req.Header.Set("X-Meta-Plugin-Version", headerParam0) + } + + if params.XMetaUserTeamName != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-User-Team-Name", runtime.ParamLocationHeader, *params.XMetaUserTeamName) + if err != nil { + return nil, err + } + + req.Header.Set("X-Meta-User-Team-Name", headerParam1) + } -// NewReplacePluginVersionDocsRequest calls the generic ReplacePluginVersionDocs builder with application/json body -func NewReplacePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err } - bodyReader = bytes.NewReader(buf) - return NewReplacePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + + return req, nil } -// NewReplacePluginVersionDocsRequestWithBody generates requests for ReplacePluginVersionDocs with any type of body -func NewReplacePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewListTeamsRequest generates requests for ListTeams +func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam1 string + operationPath := fmt.Sprintf("/teams") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam2 string + if params != nil { + queryValues := queryURL.Query() - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - var pathParam3 string + return req, nil +} - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body +func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body +func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5799,19 +5575,8 @@ func NewReplacePluginVersionDocsRequestWithBody(server string, teamName TeamName return req, nil } -// NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body -func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) -} - -// NewCreatePluginVersionDocsRequestWithBody generates requests for CreatePluginVersionDocs with any type of body -func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteTeamRequest generates requests for DeleteTeam +func NewDeleteTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -5821,23 +5586,36 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/teams/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + return req, nil +} + +// NewGetTeamByNameRequest generates requests for GetTeamByName +func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -5847,7 +5625,7 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5857,29 +5635,27 @@ func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeletePluginVersionTablesRequest calls the generic DeletePluginVersionTables builder with application/json body -func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { +// NewUpdateTeamRequest calls the generic UpdateTeam builder with application/json body +func NewUpdateTeamRequest(server string, teamName TeamName, body UpdateTeamJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewUpdateTeamRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewDeletePluginVersionTablesRequestWithBody generates requests for DeletePluginVersionTables with any type of body -func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateTeamRequestWithBody generates requests for UpdateTeam with any type of body +func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5889,33 +5665,12 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5925,7 +5680,7 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -5935,8 +5690,8 @@ func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamNam return req, nil } -// NewListPluginVersionTablesRequest generates requests for ListPluginVersionTables -func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { +// NewListAddonOrdersByTeamRequest generates requests for ListAddonOrdersByTeam +func NewListAddonOrdersByTeamRequest(server string, teamName TeamName, params *ListAddonOrdersByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -5946,33 +5701,12 @@ func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginK return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6028,19 +5762,19 @@ func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginK return req, nil } -// NewCreatePluginVersionTablesRequest calls the generic CreatePluginVersionTables builder with application/json body -func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { +// NewCreateAddonOrderForTeamRequest calls the generic CreateAddonOrderForTeam builder with application/json body +func NewCreateAddonOrderForTeamRequest(server string, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewCreateAddonOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreatePluginVersionTablesRequestWithBody generates requests for CreatePluginVersionTables with any type of body -func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateAddonOrderForTeamRequestWithBody generates requests for CreateAddonOrderForTeam with any type of body +func NewCreateAddonOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6050,23 +5784,45 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetAddonOrderByTeamRequest generates requests for GetAddonOrderByTeam +func NewGetAddonOrderByTeamRequest(server string, teamName TeamName, addonOrderID AddonOrderID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_order_id", runtime.ParamLocationPath, addonOrderID) if err != nil { return nil, err } @@ -6076,7 +5832,7 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/addon-orders/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6086,18 +5842,16 @@ func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamNam return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetPluginVersionTableRequest generates requests for GetPluginVersionTable -func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { +// NewDeleteAddonsByTeamRequest generates requests for DeleteAddonsByTeam +func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -6107,30 +5861,36 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - var pathParam4 string + return req, nil +} - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) +// NewListAddonsByTeamRequest generates requests for ListAddonsByTeam +func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAddonsByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -6140,7 +5900,7 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6150,6 +5910,60 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludePrivate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -6158,8 +5972,8 @@ func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKin return req, nil } -// NewRemovePluginUIAssetsRequest generates requests for RemovePluginUIAssets -func NewRemovePluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { +// NewDownloadAddonAssetByTeamRequest generates requests for DownloadAddonAssetByTeam +func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -6171,21 +5985,28 @@ func NewRemovePluginUIAssetsRequest(server string, teamName TeamName, pluginKind var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_team", runtime.ParamLocationPath, addonTeam) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } var pathParam3 string - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } @@ -6195,7 +6016,7 @@ func NewRemovePluginUIAssetsRequest(server string, teamName TeamName, pluginKind return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6205,27 +6026,42 @@ func NewRemovePluginUIAssetsRequest(server string, teamName TeamName, pluginKind return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + return req, nil } -// NewUploadPluginUIAssetsRequest calls the generic UploadPluginUIAssets builder with application/json body -func NewUploadPluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody) (*http.Request, error) { +// NewAIOnboardingChatRequest calls the generic AIOnboardingChat builder with application/json body +func NewAIOnboardingChatRequest(server string, teamName string, body AIOnboardingChatJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUploadPluginUIAssetsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewAIOnboardingChatRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewUploadPluginUIAssetsRequestWithBody generates requests for UploadPluginUIAssets with any type of body -func NewUploadPluginUIAssetsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewAIOnboardingChatRequestWithBody generates requests for AIOnboardingChat with any type of body +func NewAIOnboardingChatRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6235,23 +6071,38 @@ func NewUploadPluginUIAssetsRequestWithBody(server string, teamName TeamName, pl return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/chat", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam3 string + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAIOnboardingEndConversationRequest generates requests for AIOnboardingEndConversation +func NewAIOnboardingEndConversationRequest(server string, teamName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -6261,7 +6112,7 @@ func NewUploadPluginUIAssetsRequestWithBody(server string, teamName TeamName, pl return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6271,29 +6122,27 @@ func NewUploadPluginUIAssetsRequestWithBody(server string, teamName TeamName, pl return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewFinalizePluginUIAssetUploadRequest calls the generic FinalizePluginUIAssetUpload builder with application/json body -func NewFinalizePluginUIAssetUploadRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody) (*http.Request, error) { +// NewAIOnboardingNewConversationRequest calls the generic AIOnboardingNewConversation builder with application/json body +func NewAIOnboardingNewConversationRequest(server string, teamName string, body AIOnboardingNewConversationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewFinalizePluginUIAssetUploadRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) + return NewAIOnboardingNewConversationRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewFinalizePluginUIAssetUploadRequestWithBody generates requests for FinalizePluginUIAssetUpload with any type of body -func NewFinalizePluginUIAssetUploadRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { +// NewAIOnboardingNewConversationRequestWithBody generates requests for AIOnboardingNewConversation with any type of body +func NewAIOnboardingNewConversationRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6303,33 +6152,12 @@ func NewFinalizePluginUIAssetUploadRequestWithBody(server string, teamName TeamN return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err - } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err - } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6339,7 +6167,7 @@ func NewFinalizePluginUIAssetUploadRequestWithBody(server string, teamName TeamN return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -6349,16 +6177,23 @@ func NewFinalizePluginUIAssetUploadRequestWithBody(server string, teamName TeamN return req, nil } -// NewAuthRegistryRequestRequest generates requests for AuthRegistryRequest -func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestParams) (*http.Request, error) { +// NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys +func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/registry/auth") + operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6371,9 +6206,9 @@ func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestPar if params != nil { queryValues := queryURL.Query() - if params.Account != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "account", runtime.ParamLocationQuery, *params.Account); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6387,116 +6222,9 @@ func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestPar } - if params.Service != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service", runtime.ParamLocationQuery, *params.Service); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Scope != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - if params != nil { - - if params.XMetaPluginVersion != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-Plugin-Version", runtime.ParamLocationHeader, *params.XMetaPluginVersion) - if err != nil { - return nil, err - } - - req.Header.Set("X-Meta-Plugin-Version", headerParam0) - } - - if params.XMetaUserTeamName != nil { - var headerParam1 string - - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-User-Team-Name", runtime.ParamLocationHeader, *params.XMetaUserTeamName) - if err != nil { - return nil, err - } - - req.Header.Set("X-Meta-User-Team-Name", headerParam1) - } - - } - - return req, nil -} - -// NewListTeamsRequest generates requests for ListTeams -func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6521,27 +6249,34 @@ func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, return req, nil } -// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body -func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { +// NewCreateTeamAPIKeyRequest calls the generic CreateTeamAPIKey builder with application/json body +func NewCreateTeamAPIKeyRequest(server string, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) + return NewCreateTeamAPIKeyRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body -func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateTeamAPIKeyRequestWithBody generates requests for CreateTeamAPIKey with any type of body +func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams") + operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6561,8 +6296,8 @@ func NewCreateTeamRequestWithBody(server string, contentType string, body io.Rea return req, nil } -// NewDeleteTeamRequest generates requests for DeleteTeam -func NewDeleteTeamRequest(server string, teamName TeamName) (*http.Request, error) { +// NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey +func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, apiKeyID APIKeyID) (*http.Request, error) { var err error var pathParam0 string @@ -6572,12 +6307,19 @@ func NewDeleteTeamRequest(server string, teamName TeamName) (*http.Request, erro return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_id", runtime.ParamLocationPath, apiKeyID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/apikeys/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6595,8 +6337,19 @@ func NewDeleteTeamRequest(server string, teamName TeamName) (*http.Request, erro return req, nil } -// NewGetTeamByNameRequest generates requests for GetTeamByName -func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, error) { +// NewCreateTeamImagesRequest calls the generic CreateTeamImages builder with application/json body +func NewCreateTeamImagesRequest(server string, teamName TeamName, body CreateTeamImagesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamImagesRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateTeamImagesRequestWithBody generates requests for CreateTeamImages with any type of body +func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6611,7 +6364,7 @@ func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, e return nil, err } - operationPath := fmt.Sprintf("/teams/%s", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/images", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6621,27 +6374,29 @@ func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, e return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdateTeamRequest calls the generic UpdateTeam builder with application/json body -func NewUpdateTeamRequest(server string, teamName TeamName, body UpdateTeamJSONRequestBody) (*http.Request, error) { +// NewDeleteTeamInvitationRequest calls the generic DeleteTeamInvitation builder with application/json body +func NewDeleteTeamInvitationRequest(server string, teamName TeamName, body DeleteTeamInvitationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateTeamRequestWithBody(server, teamName, "application/json", bodyReader) + return NewDeleteTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewUpdateTeamRequestWithBody generates requests for UpdateTeam with any type of body -func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteTeamInvitationRequestWithBody generates requests for DeleteTeamInvitation with any type of body +func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6656,7 +6411,7 @@ func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType return nil, err } - operationPath := fmt.Sprintf("/teams/%s", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6666,7 +6421,7 @@ func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } @@ -6676,8 +6431,8 @@ func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType return req, nil } -// NewListAddonOrdersByTeamRequest generates requests for ListAddonOrdersByTeam -func NewListAddonOrdersByTeamRequest(server string, teamName TeamName, params *ListAddonOrdersByTeamParams) (*http.Request, error) { +// NewListTeamInvitationsRequest generates requests for ListTeamInvitations +func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6692,7 +6447,7 @@ func NewListAddonOrdersByTeamRequest(server string, teamName TeamName, params *L return nil, err } - operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6748,19 +6503,19 @@ func NewListAddonOrdersByTeamRequest(server string, teamName TeamName, params *L return req, nil } -// NewCreateAddonOrderForTeamRequest calls the generic CreateAddonOrderForTeam builder with application/json body -func NewCreateAddonOrderForTeamRequest(server string, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody) (*http.Request, error) { +// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body +func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateAddonOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) + return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreateAddonOrderForTeamRequestWithBody generates requests for CreateAddonOrderForTeam with any type of body -func NewCreateAddonOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body +func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6775,7 +6530,7 @@ func NewCreateAddonOrderForTeamRequestWithBody(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6795,20 +6550,24 @@ func NewCreateAddonOrderForTeamRequestWithBody(server string, teamName TeamName, return req, nil } -// NewGetAddonOrderByTeamRequest generates requests for GetAddonOrderByTeam -func NewGetAddonOrderByTeamRequest(server string, teamName TeamName, addonOrderID AddonOrderID) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body +func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam1 string +// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body +func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_order_id", runtime.ParamLocationPath, addonOrderID) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -6818,7 +6577,7 @@ func NewGetAddonOrderByTeamRequest(server string, teamName TeamName, addonOrderI return nil, err } - operationPath := fmt.Sprintf("/teams/%s/addon-orders/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6828,16 +6587,18 @@ func NewGetAddonOrderByTeamRequest(server string, teamName TeamName, addonOrderI return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewDeleteAddonsByTeamRequest generates requests for DeleteAddonsByTeam -func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { +// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation +func NewCancelTeamInvitationRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { var err error var pathParam0 string @@ -6847,12 +6608,19 @@ func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Reque return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6870,8 +6638,8 @@ func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Reque return req, nil } -// NewListAddonsByTeamRequest generates requests for ListAddonsByTeam -func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAddonsByTeamParams) (*http.Request, error) { +// NewListInvoicesByTeamRequest generates requests for ListInvoicesByTeam +func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *ListInvoicesByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -6886,7 +6654,7 @@ func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAd return nil, err } - operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/invoices", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6931,22 +6699,6 @@ func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAd } - if params.IncludePrivate != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - queryURL.RawQuery = queryValues.Encode() } @@ -6958,9 +6710,9 @@ func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAd return req, nil } -// NewDownloadAddonAssetByTeamRequest generates requests for DownloadAddonAssetByTeam -func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams) (*http.Request, error) { - var err error +// NewGetManagedDatabasesRequest generates requests for GetManagedDatabases +func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *GetManagedDatabasesParams) (*http.Request, error) { + var err error var pathParam0 string @@ -6969,30 +6721,85 @@ func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonT return nil, err } - var pathParam1 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_team", runtime.ParamLocationPath, addonTeam) + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam2 string + if params != nil { + queryValues := queryURL.Query() - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - var pathParam3 string + return req, nil +} - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) +// NewCreateManagedDatabaseRequest calls the generic CreateManagedDatabase builder with application/json body +func NewCreateManagedDatabaseRequest(server string, teamName TeamName, body CreateManagedDatabaseJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateManagedDatabaseRequestWithBody(server, teamName, "application/json", bodyReader) +} - var pathParam4 string +// NewCreateManagedDatabaseRequestWithBody generates requests for CreateManagedDatabase with any type of body +func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -7002,7 +6809,7 @@ func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonT return nil, err } - operationPath := fmt.Sprintf("/teams/%s/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7012,42 +6819,18 @@ func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonT return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - if params != nil { - - if params.Accept != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) - if err != nil { - return nil, err - } - - req.Header.Set("Accept", headerParam0) - } - - } + req.Header.Add("Content-Type", contentType) return req, nil } -// NewAIOnboardingChatRequest calls the generic AIOnboardingChat builder with application/json body -func NewAIOnboardingChatRequest(server string, teamName string, body AIOnboardingChatJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewAIOnboardingChatRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewAIOnboardingChatRequestWithBody generates requests for AIOnboardingChat with any type of body -func NewAIOnboardingChatRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteManagedDatabaseRequest generates requests for DeleteManagedDatabase +func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { var err error var pathParam0 string @@ -7057,12 +6840,19 @@ func NewAIOnboardingChatRequestWithBody(server string, teamName string, contentT return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/chat", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7072,18 +6862,16 @@ func NewAIOnboardingChatRequestWithBody(server string, teamName string, contentT return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewAIOnboardingEndConversationRequest generates requests for AIOnboardingEndConversation -func NewAIOnboardingEndConversationRequest(server string, teamName string) (*http.Request, error) { +// NewGetManagedDatabaseRequest generates requests for GetManagedDatabase +func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { var err error var pathParam0 string @@ -7093,12 +6881,19 @@ func NewAIOnboardingEndConversationRequest(server string, teamName string) (*htt return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7108,7 +6903,7 @@ func NewAIOnboardingEndConversationRequest(server string, teamName string) (*htt return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -7116,19 +6911,19 @@ func NewAIOnboardingEndConversationRequest(server string, teamName string) (*htt return req, nil } -// NewAIOnboardingNewConversationRequest calls the generic AIOnboardingNewConversation builder with application/json body -func NewAIOnboardingNewConversationRequest(server string, teamName string, body AIOnboardingNewConversationJSONRequestBody) (*http.Request, error) { +// NewRemoveTeamMembershipRequest calls the generic RemoveTeamMembership builder with application/json body +func NewRemoveTeamMembershipRequest(server string, teamName TeamName, body RemoveTeamMembershipJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAIOnboardingNewConversationRequestWithBody(server, teamName, "application/json", bodyReader) + return NewRemoveTeamMembershipRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewAIOnboardingNewConversationRequestWithBody generates requests for AIOnboardingNewConversation with any type of body -func NewAIOnboardingNewConversationRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { +// NewRemoveTeamMembershipRequestWithBody generates requests for RemoveTeamMembership with any type of body +func NewRemoveTeamMembershipRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7143,7 +6938,7 @@ func NewAIOnboardingNewConversationRequestWithBody(server string, teamName strin return nil, err } - operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7153,7 +6948,7 @@ func NewAIOnboardingNewConversationRequestWithBody(server string, teamName strin return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } @@ -7163,8 +6958,8 @@ func NewAIOnboardingNewConversationRequestWithBody(server string, teamName strin return req, nil } -// NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys -func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { +// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships +func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { var err error var pathParam0 string @@ -7179,7 +6974,7 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7192,9 +6987,9 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea if params != nil { queryValues := queryURL.Query() - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7208,9 +7003,9 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea } - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7235,19 +7030,8 @@ func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTea return req, nil } -// NewCreateTeamAPIKeyRequest calls the generic CreateTeamAPIKey builder with application/json body -func NewCreateTeamAPIKeyRequest(server string, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateTeamAPIKeyRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateTeamAPIKeyRequestWithBody generates requests for CreateTeamAPIKey with any type of body -func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership +func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { var err error var pathParam0 string @@ -7257,12 +7041,19 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7272,18 +7063,16 @@ func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, conten return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey -func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, apiKeyID APIKeyID) (*http.Request, error) { +// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam +func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -7293,19 +7082,12 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, apiKeyID APIKe return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_id", runtime.ParamLocationPath, apiKeyID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7323,8 +7105,8 @@ func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, apiKeyID APIKe return req, nil } -// NewListConnectorsRequest generates requests for ListConnectors -func NewListConnectorsRequest(server string, teamName TeamName, params *ListConnectorsParams) (*http.Request, error) { +// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam +func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -7339,7 +7121,7 @@ func NewListConnectorsRequest(server string, teamName TeamName, params *ListConn return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7352,22 +7134,6 @@ func NewListConnectorsRequest(server string, teamName TeamName, params *ListConn if params != nil { queryValues := queryURL.Query() - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.Page != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { @@ -7384,9 +7150,9 @@ func NewListConnectorsRequest(server string, teamName TeamName, params *ListConn } - if params.FilterType != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter_type", runtime.ParamLocationQuery, *params.FilterType); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7400,9 +7166,9 @@ func NewListConnectorsRequest(server string, teamName TeamName, params *ListConn } - if params.FilterPlugin != nil { + if params.IncludePrivate != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter_plugin", runtime.ParamLocationQuery, *params.FilterPlugin); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7427,19 +7193,8 @@ func NewListConnectorsRequest(server string, teamName TeamName, params *ListConn return req, nil } -// NewCreateConnectorRequest calls the generic CreateConnector builder with application/json body -func NewCreateConnectorRequest(server string, teamName TeamName, body CreateConnectorJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateConnectorRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateConnectorRequestWithBody generates requests for CreateConnector with any type of body -func NewCreateConnectorRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewDownloadPluginAssetByTeamRequest generates requests for DownloadPluginAssetByTeam +func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -7449,45 +7204,86 @@ func NewCreateConnectorRequestWithBody(server string, teamName TeamName, content return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam2 string - queryURL, err := serverURL.Parse(operationPath) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) if err != nil { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) + var pathParam4 string - return req, nil -} + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } -// NewGetConnectorRequest generates requests for GetConnector -func NewGetConnectorRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { - var err error + var pathParam5 string - var pathParam0 string + pathParam5, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + if err != nil { + return nil, err + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam1 string + operationPath := fmt.Sprintf("/teams/%s/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4, pathParam5) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + + return req, nil +} + +// NewGetSettingsRequest generates requests for GetSettings +func NewGetSettingsRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -7497,7 +7293,7 @@ func NewGetConnectorRequest(server string, teamName TeamName, connectorID Connec return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7515,19 +7311,19 @@ func NewGetConnectorRequest(server string, teamName TeamName, connectorID Connec return req, nil } -// NewUpdateConnectorRequest calls the generic UpdateConnector builder with application/json body -func NewUpdateConnectorRequest(server string, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody) (*http.Request, error) { +// NewUpdateSettingsRequest calls the generic UpdateSettings builder with application/json body +func NewUpdateSettingsRequest(server string, teamName TeamName, body UpdateSettingsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateConnectorRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) + return NewUpdateSettingsRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewUpdateConnectorRequestWithBody generates requests for UpdateConnector with any type of body -func NewUpdateConnectorRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSettingsRequestWithBody generates requests for UpdateSettings with any type of body +func NewUpdateSettingsRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7537,19 +7333,12 @@ func NewUpdateConnectorRequestWithBody(server string, teamName TeamName, connect return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7569,8 +7358,8 @@ func NewUpdateConnectorRequestWithBody(server string, teamName TeamName, connect return req, nil } -// NewRevokeConnectorRequest generates requests for RevokeConnector -func NewRevokeConnectorRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { +// NewGetTeamSpendRequest generates requests for GetTeamSpend +func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpendParams) (*http.Request, error) { var err error var pathParam0 string @@ -7580,9 +7369,74 @@ func NewRevokeConnectorRequest(server string, teamName TeamName, connectorID Con return nil, err } - var pathParam1 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/spend", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteSpendingLimitRequest generates requests for DeleteSpendingLimit +func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } @@ -7592,7 +7446,7 @@ func NewRevokeConnectorRequest(server string, teamName TeamName, connectorID Con return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7610,8 +7464,8 @@ func NewRevokeConnectorRequest(server string, teamName TeamName, connectorID Con return req, nil } -// NewGetConnectorAuthStatusAWSRequest generates requests for GetConnectorAuthStatusAWS -func NewGetConnectorAuthStatusAWSRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { +// NewGetSpendingLimitRequest generates requests for GetSpendingLimit +func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { var err error var pathParam0 string @@ -7621,19 +7475,12 @@ func NewGetConnectorAuthStatusAWSRequest(server string, teamName TeamName, conne return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/aws", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7651,19 +7498,19 @@ func NewGetConnectorAuthStatusAWSRequest(server string, teamName TeamName, conne return req, nil } -// NewAuthenticateConnectorFinishAWSRequest calls the generic AuthenticateConnectorFinishAWS builder with application/json body -func NewAuthenticateConnectorFinishAWSRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody) (*http.Request, error) { +// NewCreateSpendingLimitRequest calls the generic CreateSpendingLimit builder with application/json body +func NewCreateSpendingLimitRequest(server string, teamName TeamName, body CreateSpendingLimitJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAuthenticateConnectorFinishAWSRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) + return NewCreateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewAuthenticateConnectorFinishAWSRequestWithBody generates requests for AuthenticateConnectorFinishAWS with any type of body -func NewAuthenticateConnectorFinishAWSRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSpendingLimitRequestWithBody generates requests for CreateSpendingLimit with any type of body +func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7673,19 +7520,12 @@ func NewAuthenticateConnectorFinishAWSRequestWithBody(server string, teamName Te return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/aws", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7695,7 +7535,7 @@ func NewAuthenticateConnectorFinishAWSRequestWithBody(server string, teamName Te return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -7705,19 +7545,19 @@ func NewAuthenticateConnectorFinishAWSRequestWithBody(server string, teamName Te return req, nil } -// NewAuthenticateConnectorAWSRequest calls the generic AuthenticateConnectorAWS builder with application/json body -func NewAuthenticateConnectorAWSRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody) (*http.Request, error) { +// NewUpdateSpendingLimitRequest calls the generic UpdateSpendingLimit builder with application/json body +func NewUpdateSpendingLimitRequest(server string, teamName TeamName, body UpdateSpendingLimitJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAuthenticateConnectorAWSRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) + return NewUpdateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewAuthenticateConnectorAWSRequestWithBody generates requests for AuthenticateConnectorAWS with any type of body -func NewAuthenticateConnectorAWSRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateSpendingLimitRequestWithBody generates requests for UpdateSpendingLimit with any type of body +func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7727,19 +7567,12 @@ func NewAuthenticateConnectorAWSRequestWithBody(server string, teamName TeamName return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/aws", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7749,7 +7582,7 @@ func NewAuthenticateConnectorAWSRequestWithBody(server string, teamName TeamName return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -7759,8 +7592,8 @@ func NewAuthenticateConnectorAWSRequestWithBody(server string, teamName TeamName return req, nil } -// NewGetConnectorAuthStatusGCPRequest generates requests for GetConnectorAuthStatusGCP -func NewGetConnectorAuthStatusGCPRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { +// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam +func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -7770,19 +7603,12 @@ func NewGetConnectorAuthStatusGCPRequest(server string, teamName TeamName, conne return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/gcp", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7792,6 +7618,44 @@ func NewGetConnectorAuthStatusGCPRequest(server string, teamName TeamName, conne return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -7800,19 +7664,19 @@ func NewGetConnectorAuthStatusGCPRequest(server string, teamName TeamName, conne return req, nil } -// NewAuthenticateConnectorGCPRequest calls the generic AuthenticateConnectorGCP builder with application/json body -func NewAuthenticateConnectorGCPRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody) (*http.Request, error) { +// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body +func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAuthenticateConnectorGCPRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) + return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewAuthenticateConnectorGCPRequestWithBody generates requests for AuthenticateConnectorGCP with any type of body -func NewAuthenticateConnectorGCPRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body +func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7822,19 +7686,12 @@ func NewAuthenticateConnectorGCPRequestWithBody(server string, teamName TeamName return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/gcp", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7854,8 +7711,8 @@ func NewAuthenticateConnectorGCPRequestWithBody(server string, teamName TeamName return req, nil } -// NewAuthenticateConnectorFinishGCPRequest generates requests for AuthenticateConnectorFinishGCP -func NewAuthenticateConnectorFinishGCPRequest(server string, teamName TeamName, connectorID ConnectorID) (*http.Request, error) { +// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam +func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { var err error var pathParam0 string @@ -7867,7 +7724,7 @@ func NewAuthenticateConnectorFinishGCPRequest(server string, teamName TeamName, var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) if err != nil { return nil, err } @@ -7877,7 +7734,7 @@ func NewAuthenticateConnectorFinishGCPRequest(server string, teamName TeamName, return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/gcp/finish", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7887,7 +7744,7 @@ func NewAuthenticateConnectorFinishGCPRequest(server string, teamName TeamName, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -7895,19 +7752,8 @@ func NewAuthenticateConnectorFinishGCPRequest(server string, teamName TeamName, return req, nil } -// NewAuthenticateConnectorFinishOAuthRequest calls the generic AuthenticateConnectorFinishOAuth builder with application/json body -func NewAuthenticateConnectorFinishOAuthRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewAuthenticateConnectorFinishOAuthRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) -} - -// NewAuthenticateConnectorFinishOAuthRequestWithBody generates requests for AuthenticateConnectorFinishOAuth with any type of body -func NewAuthenticateConnectorFinishOAuthRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error var pathParam0 string @@ -7917,19 +7763,12 @@ func NewAuthenticateConnectorFinishOAuthRequestWithBody(server string, teamName return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/oauth", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7939,29 +7778,65 @@ func NewAuthenticateConnectorFinishOAuthRequestWithBody(server string, teamName return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewAuthenticateConnectorOAuthRequest calls the generic AuthenticateConnectorOAuth builder with application/json body -func NewAuthenticateConnectorOAuthRequest(server string, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAuthenticateConnectorOAuthRequestWithBody(server, teamName, connectorID, "application/json", bodyReader) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewAuthenticateConnectorOAuthRequestWithBody generates requests for AuthenticateConnectorOAuth with any type of body -func NewAuthenticateConnectorOAuthRequestWithBody(server string, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7971,19 +7846,12 @@ func NewAuthenticateConnectorOAuthRequestWithBody(server string, teamName TeamNa return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/connectors/%s/authenticate/oauth", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8003,19 +7871,8 @@ func NewAuthenticateConnectorOAuthRequestWithBody(server string, teamName TeamNa return req, nil } -// NewCreateTeamImagesRequest calls the generic CreateTeamImages builder with application/json body -func NewCreateTeamImagesRequest(server string, teamName TeamName, body CreateTeamImagesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateTeamImagesRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewCreateTeamImagesRequestWithBody generates requests for CreateTeamImages with any type of body -func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary +func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { var err error var pathParam0 string @@ -8030,7 +7887,7 @@ func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, conten return nil, err } - operationPath := fmt.Sprintf("/teams/%s/images", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8040,65 +7897,86 @@ func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, conten return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - req.Header.Add("Content-Type", contentType) + if params.Metrics != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// NewDeleteTeamInvitationRequest calls the generic DeleteTeamInvitation builder with application/json body -func NewDeleteTeamInvitationRequest(server string, teamName TeamName, body DeleteTeamInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) -} + } -// NewDeleteTeamInvitationRequestWithBody generates requests for DeleteTeamInvitation with any type of body -func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error + if params.Start != nil { - var pathParam0 string + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params.End != nil { - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + } + + if params.AggregationPeriod != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListTeamInvitationsRequest generates requests for ListTeamInvitations -func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { +// NewGetGroupedTeamUsageSummaryRequest generates requests for GetGroupedTeamUsageSummary +func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams) (*http.Request, error) { var err error var pathParam0 string @@ -8108,12 +7986,19 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group_by", runtime.ParamLocationPath, groupBy) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage-summary/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8126,9 +8011,9 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.Metrics != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8142,9 +8027,41 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis } - if params.PerPage != nil { + if params.Start != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.AggregationPeriod != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8169,19 +8086,8 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body -func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body -func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage +func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { var err error var pathParam0 string @@ -8191,102 +8097,33 @@ func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, con return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err } - queryURL, err := serverURL.Parse(operationPath) + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) if err != nil { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body -func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body -func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation -func NewCancelTeamInvitationRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8296,7 +8133,7 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -8304,8 +8141,8 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai return req, nil } -// NewListInvoicesByTeamRequest generates requests for ListInvoicesByTeam -func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *ListInvoicesByTeamParams) (*http.Request, error) { +// NewListUsersByTeamRequest generates requests for ListUsersByTeam +func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -8320,7 +8157,7 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invoices", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8333,9 +8170,9 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8349,9 +8186,9 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List } - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8376,23 +8213,27 @@ func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *List return req, nil } -// NewGetManagedDatabasesRequest generates requests for GetManagedDatabases -func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *GetManagedDatabasesParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewUploadImageRequest calls the generic UploadImage builder with application/json body +func NewUploadImageRequest(server string, body UploadImageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewUploadImageRequestWithBody(server, "application/json", bodyReader) +} + +// NewUploadImageRequestWithBody generates requests for UploadImage with any type of body +func NewUploadImageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + operationPath := fmt.Sprintf("/upload/image") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8402,42 +8243,33 @@ func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *Get return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req.Header.Add("Content-Type", contentType) - } + return req, nil +} - if params.PerPage != nil { +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -8448,34 +8280,27 @@ func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *Get return req, nil } -// NewCreateManagedDatabaseRequest calls the generic CreateManagedDatabase builder with application/json body -func NewCreateManagedDatabaseRequest(server string, teamName TeamName, body CreateManagedDatabaseJSONRequestBody) (*http.Request, error) { +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateManagedDatabaseRequestWithBody(server, teamName, "application/json", bodyReader) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) } -// NewCreateManagedDatabaseRequestWithBody generates requests for CreateManagedDatabase with any type of body -func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + operationPath := fmt.Sprintf("/user") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8485,7 +8310,7 @@ func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, c return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -8495,30 +8320,27 @@ func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, c return req, nil } -// NewDeleteManagedDatabaseRequest generates requests for DeleteManagedDatabase -func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewSendAnonymousEventRequest calls the generic SendAnonymousEvent builder with application/json body +func NewSendAnonymousEventRequest(server string, body SendAnonymousEventJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewSendAnonymousEventRequestWithBody(server, "application/json", bodyReader) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) - if err != nil { - return nil, err - } +// NewSendAnonymousEventRequestWithBody generates requests for SendAnonymousEvent with any type of body +func NewSendAnonymousEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/user/anon-event") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8528,38 +8350,26 @@ func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDa return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetManagedDatabaseRequest generates requests for GetManagedDatabase -func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { +// NewCheckUserAuthStatusRequest generates requests for CheckUserAuthStatus +func NewCheckUserAuthStatusRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/user/authenticated-status") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8577,34 +8387,27 @@ func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatab return req, nil } -// NewRemoveTeamMembershipRequest calls the generic RemoveTeamMembership builder with application/json body -func NewRemoveTeamMembershipRequest(server string, teamName TeamName, body RemoveTeamMembershipJSONRequestBody) (*http.Request, error) { +// NewUpdateCustomerRequest calls the generic UpdateCustomer builder with application/json body +func NewUpdateCustomerRequest(server string, body UpdateCustomerJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewRemoveTeamMembershipRequestWithBody(server, teamName, "application/json", bodyReader) + return NewUpdateCustomerRequestWithBody(server, "application/json", bodyReader) } -// NewRemoveTeamMembershipRequestWithBody generates requests for RemoveTeamMembership with any type of body -func NewRemoveTeamMembershipRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateCustomerRequestWithBody generates requests for UpdateCustomer with any type of body +func NewUpdateCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + operationPath := fmt.Sprintf("/user/customer") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8614,7 +8417,7 @@ func NewRemoveTeamMembershipRequestWithBody(server string, teamName TeamName, co return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -8624,23 +8427,56 @@ func NewRemoveTeamMembershipRequestWithBody(server string, teamName TeamName, co return req, nil } -// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships -func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { +// NewSendUserEventRequest calls the generic SendUserEvent builder with application/json body +func NewSendUserEventRequest(server string, body SendUserEventJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendUserEventRequestWithBody(server, "application/json", bodyReader) +} + +// NewSendUserEventRequestWithBody generates requests for SendUserEvent with any type of body +func NewSendUserEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + operationPath := fmt.Sprintf("/user/event") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations +func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { + var err error + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + operationPath := fmt.Sprintf("/user/invitations") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8696,30 +8532,16 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return req, nil } -// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership -func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { +// NewLogoutUserRequest generates requests for LogoutUser +func NewLogoutUserRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/user/login") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8737,23 +8559,27 @@ func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email Emai return req, nil } -// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam -func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewLoginUserRequest calls the generic LoginUser builder with application/json body +func NewLoginUserRequest(server string, body LoginUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewLoginUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewLoginUserRequestWithBody generates requests for LoginUser with any type of body +func NewLoginUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + operationPath := fmt.Sprintf("/user/login") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8763,31 +8589,26 @@ func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Requ return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam -func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { +// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships +func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + operationPath := fmt.Sprintf("/user/memberships") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8832,22 +8653,6 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } - if params.IncludePrivate != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - queryURL.RawQuery = queryValues.Encode() } @@ -8859,58 +8664,67 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return req, nil } -// NewDownloadPluginAssetByTeamRequest generates requests for DownloadPluginAssetByTeam -func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewRegisterUserRequest calls the generic RegisterUser builder with application/json body +func NewRegisterUserRequest(server string, body RegisterUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewRegisterUserRequestWithBody(server, "application/json", bodyReader) +} - var pathParam1 string +// NewRegisterUserRequestWithBody generates requests for RegisterUser with any type of body +func NewRegisterUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err + operationPath := fmt.Sprintf("/user/register") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - var pathParam4 string - - pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - var pathParam5 string + req.Header.Add("Content-Type", contentType) - pathParam5, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + return req, nil +} + +// NewResetUserPasswordRequest calls the generic ResetUserPassword builder with application/json body +func NewResetUserPasswordRequest(server string, body ResetUserPasswordJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewResetUserPasswordRequestWithBody(server, "application/json", bodyReader) +} + +// NewResetUserPasswordRequestWithBody generates requests for ResetUserPassword with any type of body +func NewResetUserPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4, pathParam5) + operationPath := fmt.Sprintf("/user/reset-password") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8920,46 +8734,26 @@ func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, plugi return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - if params != nil { - - if params.Accept != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) - if err != nil { - return nil, err - } - - req.Header.Set("Accept", headerParam0) - } - - } + req.Header.Add("Content-Type", contentType) return req, nil } -// NewGetSettingsRequest generates requests for GetSettings -func NewGetSettingsRequest(server string, teamName TeamName) (*http.Request, error) { +// NewDeterminePlatformTenantByEmailRequest generates requests for DeterminePlatformTenantByEmail +func NewDeterminePlatformTenantByEmailRequest(server string, params *DeterminePlatformTenantByEmailParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) + operationPath := fmt.Sprintf("/user/tenant") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8969,6 +8763,24 @@ func NewGetSettingsRequest(server string, teamName TeamName) (*http.Request, err return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "email", runtime.ParamLocationQuery, params.Email); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -8977,34 +8789,16 @@ func NewGetSettingsRequest(server string, teamName TeamName) (*http.Request, err return req, nil } -// NewUpdateSettingsRequest calls the generic UpdateSettings builder with application/json body -func NewUpdateSettingsRequest(server string, teamName TeamName, body UpdateSettingsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSettingsRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewUpdateSettingsRequestWithBody generates requests for UpdateSettings with any type of body -func NewUpdateSettingsRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateUserTokenRequest generates requests for CreateUserToken +func NewCreateUserTokenRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) + operationPath := fmt.Sprintf("/user/token") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9014,105 +8808,24 @@ func NewUpdateSettingsRequestWithBody(server string, teamName TeamName, contentT return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetTeamSpendRequest generates requests for GetTeamSpend -func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpendParams) (*http.Request, error) { +// NewUserTOTPDeleteRequest generates requests for UserTOTPDelete +func NewUserTOTPDeleteRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/spend", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Start != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.End != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteSpendingLimitRequest generates requests for DeleteSpendingLimit -func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/user/totp") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9130,23 +8843,16 @@ func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Requ return req, nil } -// NewGetSpendingLimitRequest generates requests for GetSpendingLimit -func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { +// NewUserTOTPSetupRequest generates requests for UserTOTPSetup +func NewUserTOTPSetupRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/user/totp") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9156,7 +8862,7 @@ func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -9164,34 +8870,27 @@ func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request return req, nil } -// NewCreateSpendingLimitRequest calls the generic CreateSpendingLimit builder with application/json body -func NewCreateSpendingLimitRequest(server string, teamName TeamName, body CreateSpendingLimitJSONRequestBody) (*http.Request, error) { +// NewUserTOTPVerifyRequest calls the generic UserTOTPVerify builder with application/json body +func NewUserTOTPVerifyRequest(server string, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) + return NewUserTOTPVerifyRequestWithBody(server, params, "application/json", bodyReader) } -// NewCreateSpendingLimitRequestWithBody generates requests for CreateSpendingLimit with any type of body -func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewUserTOTPVerifyRequestWithBody generates requests for UserTOTPVerify with any type of body +func NewUserTOTPVerifyRequestWithBody(server string, params *UserTOTPVerifyParams, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/user/totp/verify") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9208,37 +8907,47 @@ func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, con req.Header.Add("Content-Type", contentType) + if params != nil { + + if params.Session != nil { + var cookieParam0 string + + cookieParam0, err = runtime.StyleParamWithLocation("simple", true, "__session", runtime.ParamLocationCookie, *params.Session) + if err != nil { + return nil, err + } + + cookie0 := &http.Cookie{ + Name: "__session", + Value: cookieParam0, + } + req.AddCookie(cookie0) + } + } return req, nil } -// NewUpdateSpendingLimitRequest calls the generic UpdateSpendingLimit builder with application/json body -func NewUpdateSpendingLimitRequest(server string, teamName TeamName, body UpdateSpendingLimitJSONRequestBody) (*http.Request, error) { +// NewVerifyUserEmailRequest calls the generic VerifyUserEmail builder with application/json body +func NewVerifyUserEmailRequest(server string, body VerifyUserEmailJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) + return NewVerifyUserEmailRequestWithBody(server, "application/json", bodyReader) } -// NewUpdateSpendingLimitRequestWithBody generates requests for UpdateSpendingLimit with any type of body -func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewVerifyUserEmailRequestWithBody generates requests for VerifyUserEmail with any type of body +func NewVerifyUserEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/user/verify-email") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9248,7 +8957,7 @@ func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, con return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -9258,13 +8967,13 @@ func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, con return req, nil } -// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam -func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { +// NewDeleteUserRequest generates requests for DeleteUser +func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) if err != nil { return nil, err } @@ -9274,7 +8983,7 @@ func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, pa return nil, err } - operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + operationPath := fmt.Sprintf("/users/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -9284,45 +8993,7 @@ func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, pa return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -9330,12889 +9001,5015 @@ func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, pa return req, nil } -// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body -func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } } - bodyReader = bytes.NewReader(buf) - return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil } -// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body -func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) if err != nil { return nil, err } + return &ClientWithResponses{client}, nil +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil } +} - operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // HealthCheckWithResponse request + HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // ListAddonsWithResponse request + ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + // CreateAddonWithBodyWithResponse request with any body + CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - req.Header.Add("Content-Type", contentType) + CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - return req, nil -} + // DeleteAddonByTeamAndNameWithResponse request + DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) -// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam -func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { - var err error + // GetAddonWithResponse request + GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) - var pathParam0 string + // UpdateAddonWithBodyWithResponse request with any body + UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - var pathParam1 string + // ListAddonVersionsWithResponse request + ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) - if err != nil { - return nil, err - } + // GetAddonVersionWithResponse request + GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // UpdateAddonVersionWithBodyWithResponse request with any body + UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // CreateAddonVersionWithBodyWithResponse request with any body + CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - return req, nil -} + // DownloadAddonAssetWithResponse request + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) -// NewCreateSyncDestinationTestConnectionRequest calls the generic CreateSyncDestinationTestConnection builder with application/json body -func NewCreateSyncDestinationTestConnectionRequest(server string, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncDestinationTestConnectionRequestWithBody(server, teamName, "application/json", bodyReader) -} + // UploadAddonAssetWithResponse request + UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) -// NewCreateSyncDestinationTestConnectionRequestWithBody generates requests for CreateSyncDestinationTestConnection with any type of body -func NewCreateSyncDestinationTestConnectionRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error + // CQHealthCheckWithResponse request + CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) - var pathParam0 string + // GetOpenAPIJSONWithResponse request + GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // ActivatePlatformWithBodyWithResponse request with any body + ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // RenewPlatformActivationWithBodyWithResponse request with any body + RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + // ReportPlatformDataWithBodyWithResponse request with any body + ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) - req.Header.Add("Content-Type", contentType) + ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) - return req, nil -} + // ListPluginNotificationRequestsWithResponse request + ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) -// NewGetSyncDestinationTestConnectionRequest generates requests for GetSyncDestinationTestConnection -func NewGetSyncDestinationTestConnectionRequest(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID) (*http.Request, error) { - var err error + // CreatePluginNotificationRequestWithBodyWithResponse request with any body + CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - var pathParam0 string + CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // DeletePluginNotificationRequestWithResponse request + DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) - var pathParam1 string + // GetPluginNotificationRequestWithResponse request + GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_test_connection_id", runtime.ParamLocationPath, syncDestinationTestConnectionID) - if err != nil { - return nil, err - } + // ListPluginsWithResponse request + ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // CreatePluginWithBodyWithResponse request with any body + CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // DeletePluginByTeamAndPluginNameWithResponse request + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + // GetPluginWithResponse request + GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) - return req, nil -} + // UpdatePluginWithBodyWithResponse request with any body + UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) -// NewUpdateSyncTestConnectionForSyncDestinationRequest calls the generic UpdateSyncTestConnectionForSyncDestination builder with application/json body -func NewUpdateSyncTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody(server, teamName, syncDestinationTestConnectionID, "application/json", bodyReader) -} + UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) -// NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody generates requests for UpdateSyncTestConnectionForSyncDestination with any type of body -func NewUpdateSyncTestConnectionForSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { - var err error + // DeletePluginUpcomingPriceChangesWithResponse request + DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) - var pathParam0 string + // ListPluginUpcomingPriceChangesWithResponse request + ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body + CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) - var pathParam1 string + CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_test_connection_id", runtime.ParamLocationPath, syncDestinationTestConnectionID) - if err != nil { - return nil, err - } + // ListPluginVersionsWithResponse request + ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // GetPluginVersionWithResponse request + GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // UpdatePluginVersionWithBodyWithResponse request with any body + UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } + // CreatePluginVersionWithBodyWithResponse request with any body + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - req.Header.Add("Content-Type", contentType) + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - return req, nil -} + // DownloadPluginAssetWithResponse request + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) -// NewPromoteSyncDestinationTestConnectionRequest calls the generic PromoteSyncDestinationTestConnection builder with application/json body -func NewPromoteSyncDestinationTestConnectionRequest(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPromoteSyncDestinationTestConnectionRequestWithBody(server, teamName, syncDestinationTestConnectionID, "application/json", bodyReader) -} + // UploadPluginAssetWithResponse request + UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) -// NewPromoteSyncDestinationTestConnectionRequestWithBody generates requests for PromoteSyncDestinationTestConnection with any type of body -func NewPromoteSyncDestinationTestConnectionRequestWithBody(server string, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { - var err error + // DeletePluginVersionDocsWithBodyWithResponse request with any body + DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) - var pathParam0 string + DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // ListPluginVersionDocsWithResponse request + ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) - var pathParam1 string + // ReplacePluginVersionDocsWithBodyWithResponse request with any body + ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_test_connection_id", runtime.ParamLocationPath, syncDestinationTestConnectionID) - if err != nil { - return nil, err - } + ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // CreatePluginVersionDocsWithBodyWithResponse request with any body + CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destination-test-connections/%s/promote", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // DeletePluginVersionTablesWithBodyWithResponse request with any body + DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) - req.Header.Add("Content-Type", contentType) + // ListPluginVersionTablesWithResponse request + ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) - return req, nil -} + // CreatePluginVersionTablesWithBodyWithResponse request with any body + CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) -// NewListSyncDestinationsRequest generates requests for ListSyncDestinations -func NewListSyncDestinationsRequest(server string, teamName TeamName, params *ListSyncDestinationsParams) (*http.Request, error) { - var err error + CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) - var pathParam0 string + // GetPluginVersionTableWithResponse request + GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // RemovePluginUIAssetsWithResponse request + RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // UploadPluginUIAssetsWithBodyWithResponse request with any body + UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destinations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // FinalizePluginUIAssetUploadWithBodyWithResponse request with any body + FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) - if params != nil { - queryValues := queryURL.Query() + FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) - if params.PerPage != nil { + // AuthRegistryRequestWithResponse request + AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + // ListTeamsWithResponse request + ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) - } + // CreateTeamWithBodyWithResponse request with any body + CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) - if params.Page != nil { + CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + // DeleteTeamWithResponse request + DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) - } + // GetTeamByNameWithResponse request + GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) - queryURL.RawQuery = queryValues.Encode() - } + // UpdateTeamWithBodyWithResponse request with any body + UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) - return req, nil -} + // ListAddonOrdersByTeamWithResponse request + ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) -// NewDeleteSyncDestinationRequest generates requests for DeleteSyncDestination -func NewDeleteSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { - var err error + // CreateAddonOrderForTeamWithBodyWithResponse request with any body + CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) - var pathParam0 string + CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // GetAddonOrderByTeamWithResponse request + GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) - var pathParam1 string + // DeleteAddonsByTeamWithResponse request + DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) - if err != nil { - return nil, err - } + // ListAddonsByTeamWithResponse request + ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // DownloadAddonAssetByTeamWithResponse request + DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // AIOnboardingChatWithBodyWithResponse request with any body + AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } + // AIOnboardingEndConversationWithResponse request + AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) - return req, nil -} + // AIOnboardingNewConversationWithBodyWithResponse request with any body + AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) -// NewGetSyncDestinationRequest generates requests for GetSyncDestination -func NewGetSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName) (*http.Request, error) { - var err error + AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) - var pathParam0 string + // ListTeamAPIKeysWithResponse request + ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // CreateTeamAPIKeyWithBodyWithResponse request with any body + CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) - var pathParam1 string + CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) - if err != nil { - return nil, err - } + // DeleteTeamAPIKeyWithResponse request + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // CreateTeamImagesWithBodyWithResponse request with any body + CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // DeleteTeamInvitationWithBodyWithResponse request with any body + DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) - return req, nil -} + // ListTeamInvitationsWithResponse request + ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) -// NewUpdateSyncDestinationRequest calls the generic UpdateSyncDestination builder with application/json body -func NewUpdateSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncDestinationRequestWithBody(server, teamName, syncDestinationName, "application/json", bodyReader) -} + // EmailTeamInvitationWithBodyWithResponse request with any body + EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) -// NewUpdateSyncDestinationRequestWithBody generates requests for UpdateSyncDestination with any type of body -func NewUpdateSyncDestinationRequestWithBody(server string, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader) (*http.Request, error) { - var err error + EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) - var pathParam0 string + // AcceptTeamInvitationWithBodyWithResponse request with any body + AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) - var pathParam1 string + // CancelTeamInvitationWithResponse request + CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) - if err != nil { - return nil, err - } + // ListInvoicesByTeamWithResponse request + ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // GetManagedDatabasesWithResponse request + GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // CreateManagedDatabaseWithBodyWithResponse request with any body + CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } + // DeleteManagedDatabaseWithResponse request + DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) - req.Header.Add("Content-Type", contentType) + // GetManagedDatabaseWithResponse request + GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) - return req, nil -} + // RemoveTeamMembershipWithBodyWithResponse request with any body + RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) -// NewListSyncDestinationSyncsRequest generates requests for ListSyncDestinationSyncs -func NewListSyncDestinationSyncsRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams) (*http.Request, error) { - var err error + RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) - var pathParam0 string + // GetTeamMembershipsWithResponse request + GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // DeleteTeamMembershipWithResponse request + DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) - var pathParam1 string + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) - if err != nil { - return nil, err - } + // ListPluginsByTeamWithResponse request + ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/syncs", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // DownloadPluginAssetByTeamWithResponse request + DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // GetSettingsWithResponse request + GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) - if params != nil { - queryValues := queryURL.Query() + // UpdateSettingsWithBodyWithResponse request with any body + UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) - if params.PerPage != nil { + UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + // GetTeamSpendWithResponse request + GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) - } + // DeleteSpendingLimitWithResponse request + DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) - if params.Page != nil { + // GetSpendingLimitWithResponse request + GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + // CreateSpendingLimitWithBodyWithResponse request with any body + CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) - } + CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) - queryURL.RawQuery = queryValues.Encode() - } + // UpdateSpendingLimitWithBodyWithResponse request with any body + UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) - return req, nil -} + // ListSubscriptionOrdersByTeamWithResponse request + ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) -// NewGetTestConnectionForSyncDestinationRequest generates requests for GetTestConnectionForSyncDestination -func NewGetTestConnectionForSyncDestinationRequest(server string, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { - var err error + // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body + CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) - var pathParam0 string + CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // GetSubscriptionOrderByTeamWithResponse request + GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) - var pathParam1 string + // ListTeamPluginUsageWithResponse request + ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_destination_name", runtime.ParamLocationPath, syncDestinationName) - if err != nil { - return nil, err - } + // IncreaseTeamPluginUsageWithBodyWithResponse request with any body + IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) - var pathParam2 string + IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } + // GetTeamUsageSummaryWithResponse request + GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // GetGroupedTeamUsageSummaryWithResponse request + GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-destinations/%s/test-connections/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // GetTeamPluginUsageWithResponse request + GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // ListUsersByTeamWithResponse request + ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + // UploadImageWithBodyWithResponse request with any body + UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) - return req, nil -} + UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) -// NewCreateSyncSourceTestConnectionRequest calls the generic CreateSyncSourceTestConnection builder with application/json body -func NewCreateSyncSourceTestConnectionRequest(server string, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncSourceTestConnectionRequestWithBody(server, teamName, "application/json", bodyReader) -} + // GetCurrentUserWithResponse request + GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) -// NewCreateSyncSourceTestConnectionRequestWithBody generates requests for CreateSyncSourceTestConnection with any type of body -func NewCreateSyncSourceTestConnectionRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error + // UpdateCurrentUserWithBodyWithResponse request with any body + UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) - var pathParam0 string + UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // SendAnonymousEventWithBodyWithResponse request with any body + SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // CheckUserAuthStatusWithResponse request + CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // UpdateCustomerWithBodyWithResponse request with any body + UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } + UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) - req.Header.Add("Content-Type", contentType) + // SendUserEventWithBodyWithResponse request with any body + SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) - return req, nil -} + SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) -// NewGetSyncSourceTestConnectionRequest generates requests for GetSyncSourceTestConnection -func NewGetSyncSourceTestConnectionRequest(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID) (*http.Request, error) { - var err error + // ListCurrentUserInvitationsWithResponse request + ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) - var pathParam0 string + // LogoutUserWithResponse request + LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // LoginUserWithBodyWithResponse request with any body + LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) - var pathParam1 string + LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_test_connection_id", runtime.ParamLocationPath, syncSourceTestConnectionID) - if err != nil { - return nil, err - } + // GetCurrentUserMembershipsWithResponse request + GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + // RegisterUserWithBodyWithResponse request with any body + RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + // ResetUserPasswordWithBodyWithResponse request with any body + ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) - return req, nil -} + // DeterminePlatformTenantByEmailWithResponse request + DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) -// NewUpdateSyncTestConnectionForSyncSourceRequest calls the generic UpdateSyncTestConnectionForSyncSource builder with application/json body -func NewUpdateSyncTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncTestConnectionForSyncSourceRequestWithBody(server, teamName, syncSourceTestConnectionID, "application/json", bodyReader) -} + // CreateUserTokenWithResponse request + CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) -// NewUpdateSyncTestConnectionForSyncSourceRequestWithBody generates requests for UpdateSyncTestConnectionForSyncSource with any type of body -func NewUpdateSyncTestConnectionForSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { - var err error + // UserTOTPDeleteWithResponse request + UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) - var pathParam0 string + // UserTOTPSetupWithResponse request + UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } + // UserTOTPVerifyWithBodyWithResponse request with any body + UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) - var pathParam1 string + UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_test_connection_id", runtime.ParamLocationPath, syncSourceTestConnectionID) - if err != nil { - return nil, err - } + // VerifyUserEmailWithBodyWithResponse request with any body + VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) - operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + // DeleteUserWithResponse request + DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } +type HealthCheckResponse struct { + Body []byte + HTTPResponse *http.Response +} - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r HealthCheckResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return http.StatusText(0) } -// NewPromoteSyncSourceTestConnectionRequest calls the generic PromoteSyncSourceTestConnection builder with application/json body -func NewPromoteSyncSourceTestConnectionRequest(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r HealthCheckResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - bodyReader = bytes.NewReader(buf) - return NewPromoteSyncSourceTestConnectionRequestWithBody(server, teamName, syncSourceTestConnectionID, "application/json", bodyReader) + return 0 } -// NewPromoteSyncSourceTestConnectionRequestWithBody generates requests for PromoteSyncSourceTestConnection with any type of body -func NewPromoteSyncSourceTestConnectionRequestWithBody(server string, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader) (*http.Request, error) { - var err error +type ListAddonsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddons200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError +} - var pathParam0 string +// Status returns HTTPResponse.Status +func (r ListAddonsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type CreateAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Addon + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_test_connection_id", runtime.ParamLocationPath, syncSourceTestConnectionID) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreateAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/sync-source-test-connections/%s/promote", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type DeleteAddonByTeamAndNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeleteAddonByTeamAndNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddonByTeamAndNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return 0 } -// NewListSyncSourcesRequest generates requests for ListSyncSources -func NewListSyncSourcesRequest(server string, teamName TeamName, params *ListSyncSourcesParams) (*http.Request, error) { - var err error - - var pathParam0 string +type GetAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddon + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/sync-sources", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type UpdateAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Addon + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UpdateAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - } +type ListAddonVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddonVersions200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL.RawQuery = queryValues.Encode() +// Status returns HTTPResponse.Status +func (r ListAddonVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewDeleteSyncSourceRequest generates requests for DeleteSyncSource -func NewDeleteSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { - var err error - - var pathParam0 string +type GetAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type UpdateAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UpdateAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetSyncSourceRequest generates requests for GetSyncSource -func NewGetSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName) (*http.Request, error) { - var err error +type CreateAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON201 *AddonVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - var pathParam0 string +// Status returns HTTPResponse.Status +func (r CreateAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type DownloadAddonAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonAsset + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DownloadAddonAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadAddonAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type UploadAddonAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ReleaseURL + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UploadAddonAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UploadAddonAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return req, nil +type CQHealthCheckResponse struct { + Body []byte + HTTPResponse *http.Response + JSON500 *InternalError } -// NewUpdateSyncSourceRequest calls the generic UpdateSyncSource builder with application/json body -func NewUpdateSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CQHealthCheckResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncSourceRequestWithBody(server, teamName, syncSourceName, "application/json", bodyReader) + return http.StatusText(0) } -// NewUpdateSyncSourceRequestWithBody generates requests for UpdateSyncSource with any type of body -func NewUpdateSyncSourceRequestWithBody(server string, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CQHealthCheckResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type GetOpenAPIJSONResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]interface{} +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetOpenAPIJSONResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetOpenAPIJSONResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type ActivatePlatformResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActivatePlatform200Response + JSON205 *ActivatePlatform205Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ActivatePlatformResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ActivatePlatformResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return 0 } -// NewListSyncSourceSyncsRequest generates requests for ListSyncSourceSyncs -func NewListSyncSourceSyncsRequest(server string, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams) (*http.Request, error) { - var err error +type RenewPlatformActivationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RenewPlatformActivation200Response + JSON205 *ActivatePlatform205Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - var pathParam0 string +// Status returns HTTPResponse.Status +func (r RenewPlatformActivationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r RenewPlatformActivationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type ReportPlatformDataResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ReportPlatformDataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/syncs", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ReportPlatformDataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - if params != nil { - queryValues := queryURL.Query() +type ListPluginNotificationRequestsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginNotificationRequests200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError +} - if params.PerPage != nil { +// Status returns HTTPResponse.Status +func (r ListPluginNotificationRequestsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginNotificationRequestsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - } +type CreatePluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *PluginNotificationRequest + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - if params.Page != nil { +// Status returns HTTPResponse.Status +func (r CreatePluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - } +type DeletePluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - queryURL.RawQuery = queryValues.Encode() +// Status returns HTTPResponse.Status +func (r DeletePluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetTestConnectionForSyncSourceRequest generates requests for GetTestConnectionForSyncSource -func NewGetTestConnectionForSyncSourceRequest(server string, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId) (*http.Request, error) { - var err error - - var pathParam0 string +type GetPluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginNotificationRequests200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetPluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_source_name", runtime.ParamLocationPath, syncSourceName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string +type ListPluginsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPlugins200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError +} - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListPluginsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/sync-sources/%s/test-connections/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type CreatePluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Plugin + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreatePluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewListSyncsRequest generates requests for ListSyncs -func NewListSyncsRequest(server string, teamName TeamName, params *ListSyncsParams) (*http.Request, error) { - var err error - - var pathParam0 string +type DeletePluginByTeamAndPluginNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeletePluginByTeamAndPluginNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginByTeamAndPluginNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath +type GetPluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPlugin + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } +type UpdatePluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Plugin + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - queryURL.RawQuery = queryValues.Encode() +// Status returns HTTPResponse.Status +func (r UpdatePluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatePluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return req, nil +type DeletePluginUpcomingPriceChangesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } -// NewCreateSyncRequest calls the generic CreateSync builder with application/json body -func NewCreateSyncRequest(server string, teamName TeamName, body CreateSyncJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeletePluginUpcomingPriceChangesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncRequestWithBody(server, teamName, "application/json", bodyReader) + return http.StatusText(0) } -// NewCreateSyncRequestWithBody generates requests for CreateSync with any type of body -func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginUpcomingPriceChangesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - var pathParam0 string +type ListPluginUpcomingPriceChangesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginUpcomingPriceChanges200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListPluginUpcomingPriceChangesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginUpcomingPriceChangesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type CreatePluginUpcomingPriceChangeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *PluginPrice + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreatePluginUpcomingPriceChangeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginUpcomingPriceChangeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return 0 } -// NewGetTestConnectionConnectorCredentialsRequest generates requests for GetTestConnectionConnectorCredentials -func NewGetTestConnectionConnectorCredentialsRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID) (*http.Request, error) { - var err error - - var pathParam0 string +type ListPluginVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginVersions200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListPluginVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string +type GetPluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersionDetails + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetPluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/connector/%s/credentials", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type UpdatePluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UpdatePluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatePluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetTestConnectionConnectorIdentityRequest generates requests for GetTestConnectionConnectorIdentity -func NewGetTestConnectionConnectorIdentityRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID) (*http.Request, error) { - var err error - - var pathParam0 string +type CreatePluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersion + JSON201 *PluginVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreatePluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } +type DownloadPluginAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginAsset + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DownloadPluginAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s/connector/%s/identity", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadPluginAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } +type UploadPluginAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ReleaseURL + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UploadPluginAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - - return req, nil + return http.StatusText(0) } -// NewDeleteSyncRequest generates requests for DeleteSync -func NewDeleteSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UploadPluginAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type DeletePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeletePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type ListPluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginVersionDocs200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListPluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetSyncRequest generates requests for GetSync -func NewGetSyncRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { - var err error +type ReplacePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreatePluginVersionDocs201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - var pathParam0 string +// Status returns HTTPResponse.Status +func (r ReplacePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ReplacePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type CreatePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreatePluginVersionDocs201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreatePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type DeletePluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeletePluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return req, nil +type ListPluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginVersionTables200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } -// NewUpdateSyncRequest calls the generic UpdateSync builder with application/json body -func NewUpdateSyncRequest(server string, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListPluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRequestWithBody(server, teamName, syncName, "application/json", bodyReader) + return http.StatusText(0) } -// NewUpdateSyncRequestWithBody generates requests for UpdateSync with any type of body -func NewUpdateSyncRequestWithBody(server string, teamName TeamName, syncName SyncName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type CreatePluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreatePluginVersionTables201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreatePluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type GetPluginVersionTableResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginTableDetails + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetPluginVersionTableResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginVersionTableResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return 0 } -// NewListSyncRunsRequest generates requests for ListSyncRuns -func NewListSyncRunsRequest(server string, teamName TeamName, syncName SyncName, params *ListSyncRunsParams) (*http.Request, error) { - var err error - - var pathParam0 string +type RemovePluginUIAssetsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r RemovePluginUIAssetsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r RemovePluginUIAssetsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } +type UploadPluginUIAssetsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *UploadPluginUIAssets201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath +// Status returns HTTPResponse.Status +func (r UploadPluginUIAssetsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UploadPluginUIAssetsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } +type FinalizePluginUIAssetUploadResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r FinalizePluginUIAssetUploadResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - - return req, nil + return http.StatusText(0) } -// NewCreateSyncRunRequest generates requests for CreateSyncRun -func NewCreateSyncRunRequest(server string, teamName TeamName, syncName SyncName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r FinalizePluginUIAssetUploadResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type AuthRegistryRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RegistryAuthToken + JSON400 *DockerError + JSON401 *DockerError + JSON404 *DockerError + JSON422 *DockerError + JSON500 *DockerError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r AuthRegistryRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r AuthRegistryRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type ListTeamsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeams200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListTeamsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetSyncRunRequest generates requests for GetSyncRun -func NewGetSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } +type CreateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - var pathParam1 string +// Status returns HTTPResponse.Status +func (r CreateTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string +type DeleteTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeleteTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type GetTeamByNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetTeamByNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamByNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return req, nil +type UpdateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError } -// NewUpdateSyncRunRequest calls the generic UpdateSyncRun builder with application/json body -func NewUpdateSyncRunRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UpdateTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncRunRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) + return http.StatusText(0) } -// NewUpdateSyncRunRequestWithBody generates requests for UpdateSyncRun with any type of body -func NewUpdateSyncRunRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { - var err error +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - var pathParam0 string +type ListAddonOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddonOrdersByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListAddonOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string +type CreateAddonOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *AddonOrder + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreateAddonOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonOrderForTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type GetAddonOrderByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonOrder + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetAddonOrderByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonOrderByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return 0 } -// NewGetSyncRunConnectorCredentialsRequest generates requests for GetSyncRunConnectorCredentials -func NewGetSyncRunConnectorCredentialsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { - var err error - - var pathParam0 string +type DeleteAddonsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeleteAddonsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddonsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string +type ListAddonsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddonsByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListAddonsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/connector/%s/credentials", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type DownloadAddonAssetByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonAsset + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DownloadAddonAssetByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadAddonAssetByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetSyncRunConnectorIdentityRequest generates requests for GetSyncRunConnectorIdentity -func NewGetSyncRunConnectorIdentityRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID) (*http.Request, error) { - var err error +type AIOnboardingChatResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingChat200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} - var pathParam0 string +// Status returns HTTPResponse.Status +func (r AIOnboardingChatResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingChatResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type AIOnboardingEndConversationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingEndConversation200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r AIOnboardingEndConversationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingEndConversationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam3 string +type AIOnboardingNewConversationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingNewConversation200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "connector_id", runtime.ParamLocationPath, connectorID) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r AIOnboardingNewConversationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingNewConversationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/connector/%s/identity", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type ListTeamAPIKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeamAPIKeys200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListTeamAPIKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamAPIKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetSyncRunLogsRequest generates requests for GetSyncRunLogs -func NewGetSyncRunLogsRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams) (*http.Request, error) { - var err error - - var pathParam0 string +type CreateTeamAPIKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *APIKey + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreateTeamAPIKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamAPIKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string +type DeleteTeamAPIKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeleteTeamAPIKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamAPIKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/logs", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type CreateTeamImagesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateTeamImages201Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreateTeamImagesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamImagesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - if params != nil { - - if params.Accept != nil { - var headerParam0 string - - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) - if err != nil { - return nil, err - } +type DeleteTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - req.Header.Set("Accept", headerParam0) - } +// Status returns HTTPResponse.Status +func (r DeleteTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return req, nil +type ListTeamInvitationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeamInvitations200Response + JSON403 *Forbidden + JSON500 *InternalError } -// NewCreateSyncRunProgressRequest calls the generic CreateSyncRunProgress builder with application/json body -func NewCreateSyncRunProgressRequest(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListTeamInvitationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - bodyReader = bytes.NewReader(buf) - return NewCreateSyncRunProgressRequestWithBody(server, teamName, syncName, syncRunId, "application/json", bodyReader) + return http.StatusText(0) } -// NewCreateSyncRunProgressRequestWithBody generates requests for CreateSyncRunProgress with any type of body -func NewCreateSyncRunProgressRequestWithBody(server string, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader) (*http.Request, error) { - var err error +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamInvitationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - var pathParam0 string +type EmailTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Invitation + JSON202 *Invitation + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r EmailTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_name", runtime.ParamLocationPath, syncName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r EmailTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam2 string +type AcceptTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *MembershipWithTeam + JSON303 *MembershipWithTeam + JSON403 *Forbidden + JSON500 *InternalError +} - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "sync_run_id", runtime.ParamLocationPath, syncRunId) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r AcceptTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r AcceptTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/syncs/%s/runs/%s/progress", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type CancelTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CancelTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CancelTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - req.Header.Add("Content-Type", contentType) +type ListInvoicesByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListInvoicesByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - return req, nil +// Status returns HTTPResponse.Status +func (r ListInvoicesByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) } -// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage -func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { - var err error +// StatusCode returns HTTPResponse.StatusCode +func (r ListInvoicesByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - var pathParam0 string +type GetManagedDatabasesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetManagedDatabases200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetManagedDatabasesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetManagedDatabasesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type CreateManagedDatabaseResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ManagedDatabase + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON409 *Conflict + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreateManagedDatabaseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - if params != nil { - queryValues := queryURL.Query() +// StatusCode returns HTTPResponse.StatusCode +func (r CreateManagedDatabaseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - if params.Page != nil { +type DeleteManagedDatabaseResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// Status returns HTTPResponse.Status +func (r DeleteManagedDatabaseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteManagedDatabaseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - } +type GetManagedDatabaseResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ManagedDatabase + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - queryURL.RawQuery = queryValues.Encode() +// Status returns HTTPResponse.Status +func (r GetManagedDatabaseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetManagedDatabaseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return req, nil +type RemoveTeamMembershipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError } -// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body -func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r RemoveTeamMembershipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - bodyReader = bytes.NewReader(buf) - return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) + return http.StatusText(0) } -// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body -func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error +// StatusCode returns HTTPResponse.StatusCode +func (r RemoveTeamMembershipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - var pathParam0 string +type GetTeamMembershipsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetTeamMemberships200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetTeamMembershipsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamMembershipsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type DeleteTeamMembershipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DeleteTeamMembershipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamMembershipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - req.Header.Add("Content-Type", contentType) +type DeletePluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - return req, nil +// Status returns HTTPResponse.Status +func (r DeletePluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) } -// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary -func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { - var err error +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - var pathParam0 string +type ListPluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginsByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListPluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type DownloadPluginAssetByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginAsset + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r DownloadPluginAssetByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - if params != nil { - queryValues := queryURL.Query() +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadPluginAssetByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - if params.Metrics != nil { +type GetSettingsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Settings + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// Status returns HTTPResponse.Status +func (r GetSettingsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - } - - if params.Start != nil { +// StatusCode returns HTTPResponse.StatusCode +func (r GetSettingsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +type UpdateSettingsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Settings + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - } +// Status returns HTTPResponse.Status +func (r UpdateSettingsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - if params.End != nil { +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSettingsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +type GetTeamSpendResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SpendSummary + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - } +// Status returns HTTPResponse.Status +func (r GetTeamSpendResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - if params.AggregationPeriod != nil { +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamSpendResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +type DeleteSpendingLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - } +// Status returns HTTPResponse.Status +func (r DeleteSpendingLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - queryURL.RawQuery = queryValues.Encode() +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSpendingLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +type GetSpendingLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SpendingLimit + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSpendingLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - return req, nil +// StatusCode returns HTTPResponse.StatusCode +func (r GetSpendingLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -// NewGetGroupedTeamUsageSummaryRequest generates requests for GetGroupedTeamUsageSummary -func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams) (*http.Request, error) { - var err error +type CreateSpendingLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SpendingLimit + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - var pathParam0 string +// Status returns HTTPResponse.Status +func (r CreateSpendingLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSpendingLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type UpdateSpendingLimitResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SpendingLimit + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group_by", runtime.ParamLocationPath, groupBy) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UpdateSpendingLimitResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSpendingLimitResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/usage-summary/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath +type ListSubscriptionOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListSubscriptionOrdersByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSubscriptionOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListSubscriptionOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - if params != nil { - queryValues := queryURL.Query() +type CreateSubscriptionOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *TeamSubscriptionOrder + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - if params.Metrics != nil { +// Status returns HTTPResponse.Status +func (r CreateSubscriptionOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Start != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSubscriptionOrderForTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - } +type GetSubscriptionOrderByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TeamSubscriptionOrder + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - if params.End != nil { +// Status returns HTTPResponse.Status +func (r GetSubscriptionOrderByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// StatusCode returns HTTPResponse.StatusCode +func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - } +type ListTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeamPluginUsage200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - if params.AggregationPeriod != nil { +// Status returns HTTPResponse.Status +func (r ListTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - } +type IncreaseTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError + JSON503 *ServiceUnavailable +} - queryURL.RawQuery = queryValues.Encode() +// Status returns HTTPResponse.Status +func (r IncreaseTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r IncreaseTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage -func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { - var err error +type GetTeamUsageSummaryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageSummary + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - var pathParam0 string +// Status returns HTTPResponse.Status +func (r GetTeamUsageSummaryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamUsageSummaryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam1 string +type GetGroupedTeamUsageSummaryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageSummary + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetGroupedTeamUsageSummaryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetGroupedTeamUsageSummaryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - var pathParam3 string +type GetTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageCurrent + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +type ListUsersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListUsersByTeam200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r ListUsersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ListUsersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - return req, nil + return 0 } -// NewListUsersByTeamRequest generates requests for ListUsersByTeam -func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil +type UploadImageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ImageURL + JSON500 *InternalError } -// NewUploadImageRequest calls the generic UploadImage builder with application/json body -func NewUploadImageRequest(server string, body UploadImageJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UploadImageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - bodyReader = bytes.NewReader(buf) - return NewUploadImageRequestWithBody(server, "application/json", bodyReader) + return http.StatusText(0) } -// NewUploadImageRequestWithBody generates requests for UploadImage with any type of body -func NewUploadImageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/upload/image") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r UploadImageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return 0 } -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } +type GetCurrentUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *User + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r GetCurrentUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - - return req, nil + return http.StatusText(0) } -// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body -func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrentUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - bodyReader = bytes.NewReader(buf) - return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) + return 0 } -// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body -func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error +type UpdateCurrentUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *User + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON405 *MethodNotAllowed + JSON500 *InternalError +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UpdateCurrentUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - operationPath := fmt.Sprintf("/user") - if operationPath[0] == '/' { - operationPath = "." + operationPath +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCurrentUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } +type SendAnonymousEventResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r SendAnonymousEventResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return http.StatusText(0) } -// NewSendAnonymousEventRequest calls the generic SendAnonymousEvent builder with application/json body -func NewSendAnonymousEventRequest(server string, body SendAnonymousEventJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r SendAnonymousEventResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } - bodyReader = bytes.NewReader(buf) - return NewSendAnonymousEventRequestWithBody(server, "application/json", bodyReader) + return 0 } -// NewSendAnonymousEventRequestWithBody generates requests for SendAnonymousEvent with any type of body -func NewSendAnonymousEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error +type CheckUserAuthStatusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CheckUserAuthStatus200Response + JSON500 *InternalError +} - serverURL, err := url.Parse(server) - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CheckUserAuthStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - operationPath := fmt.Sprintf("/user/anon-event") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCheckUserAuthStatusRequest generates requests for CheckUserAuthStatus -func NewCheckUserAuthStatusRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/authenticated-status") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUpdateCustomerRequest calls the generic UpdateCustomer builder with application/json body -func NewUpdateCustomerRequest(server string, body UpdateCustomerJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateCustomerRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateCustomerRequestWithBody generates requests for UpdateCustomer with any type of body -func NewUpdateCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/customer") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewSendUserEventRequest calls the generic SendUserEvent builder with application/json body -func NewSendUserEventRequest(server string, body SendUserEventJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSendUserEventRequestWithBody(server, "application/json", bodyReader) -} - -// NewSendUserEventRequestWithBody generates requests for SendUserEvent with any type of body -func NewSendUserEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/event") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations -func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/invitations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewLogoutUserRequest generates requests for LogoutUser -func NewLogoutUserRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/login") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewLoginUserRequest calls the generic LoginUser builder with application/json body -func NewLoginUserRequest(server string, body LoginUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewLoginUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewLoginUserRequestWithBody generates requests for LoginUser with any type of body -func NewLoginUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/login") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships -func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/memberships") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewRegisterUserRequest calls the generic RegisterUser builder with application/json body -func NewRegisterUserRequest(server string, body RegisterUserJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRegisterUserRequestWithBody(server, "application/json", bodyReader) -} - -// NewRegisterUserRequestWithBody generates requests for RegisterUser with any type of body -func NewRegisterUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/register") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewResetUserPasswordRequest calls the generic ResetUserPassword builder with application/json body -func NewResetUserPasswordRequest(server string, body ResetUserPasswordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewResetUserPasswordRequestWithBody(server, "application/json", bodyReader) -} - -// NewResetUserPasswordRequestWithBody generates requests for ResetUserPassword with any type of body -func NewResetUserPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/reset-password") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeterminePlatformTenantByEmailRequest generates requests for DeterminePlatformTenantByEmail -func NewDeterminePlatformTenantByEmailRequest(server string, params *DeterminePlatformTenantByEmailParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/tenant") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "email", runtime.ParamLocationQuery, params.Email); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateUserTokenRequest generates requests for CreateUserToken -func NewCreateUserTokenRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/token") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUserTOTPDeleteRequest generates requests for UserTOTPDelete -func NewUserTOTPDeleteRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/totp") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUserTOTPSetupRequest generates requests for UserTOTPSetup -func NewUserTOTPSetupRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/totp") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUserTOTPVerifyRequest calls the generic UserTOTPVerify builder with application/json body -func NewUserTOTPVerifyRequest(server string, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUserTOTPVerifyRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewUserTOTPVerifyRequestWithBody generates requests for UserTOTPVerify with any type of body -func NewUserTOTPVerifyRequestWithBody(server string, params *UserTOTPVerifyParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/totp/verify") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - if params != nil { - - if params.Session != nil { - var cookieParam0 string - - cookieParam0, err = runtime.StyleParamWithLocation("simple", true, "__session", runtime.ParamLocationCookie, *params.Session) - if err != nil { - return nil, err - } - - cookie0 := &http.Cookie{ - Name: "__session", - Value: cookieParam0, - } - req.AddCookie(cookie0) - } - } - return req, nil -} - -// NewVerifyUserEmailRequest calls the generic VerifyUserEmail builder with application/json body -func NewVerifyUserEmailRequest(server string, body VerifyUserEmailJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewVerifyUserEmailRequestWithBody(server, "application/json", bodyReader) -} - -// NewVerifyUserEmailRequestWithBody generates requests for VerifyUserEmail with any type of body -func NewVerifyUserEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/user/verify-email") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteUserRequest generates requests for DeleteUser -func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/users/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} - -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} - -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // HealthCheckWithResponse request - HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) - - // ListAddonsWithResponse request - ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) - - // CreateAddonWithBodyWithResponse request with any body - CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - - CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) - - // DeleteAddonByTeamAndNameWithResponse request - DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) - - // GetAddonWithResponse request - GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) - - // UpdateAddonWithBodyWithResponse request with any body - UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - - UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) - - // ListAddonVersionsWithResponse request - ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) - - // GetAddonVersionWithResponse request - GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) - - // UpdateAddonVersionWithBodyWithResponse request with any body - UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - - UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) - - // CreateAddonVersionWithBodyWithResponse request with any body - CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - - CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) - - // DownloadAddonAssetWithResponse request - DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) - - // UploadAddonAssetWithResponse request - UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) - - // CQHealthCheckWithResponse request - CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) - - // GetOpenAPIJSONWithResponse request - GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) - - // ActivatePlatformWithBodyWithResponse request with any body - ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) - - ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) - - // RenewPlatformActivationWithBodyWithResponse request with any body - RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) - - RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) - - // ReportPlatformDataWithBodyWithResponse request with any body - ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) - - ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) - - // ListPluginNotificationRequestsWithResponse request - ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) - - // CreatePluginNotificationRequestWithBodyWithResponse request with any body - CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - - CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) - - // DeletePluginNotificationRequestWithResponse request - DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) - - // GetPluginNotificationRequestWithResponse request - GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) - - // ListPluginsWithResponse request - ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) - - // CreatePluginWithBodyWithResponse request with any body - CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) - - CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) - - // DeletePluginByTeamAndPluginNameWithResponse request - DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) - - // GetPluginWithResponse request - GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) - - // UpdatePluginWithBodyWithResponse request with any body - UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) - - UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) - - // DeletePluginUpcomingPriceChangesWithResponse request - DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) - - // ListPluginUpcomingPriceChangesWithResponse request - ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) - - // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body - CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) - - CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) - - // ListPluginVersionsWithResponse request - ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) - - // GetPluginVersionWithResponse request - GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) - - // UpdatePluginVersionWithBodyWithResponse request with any body - UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) - - UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) - - // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) - - // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) - - // UploadPluginAssetWithResponse request - UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) - - // DeletePluginVersionDocsWithBodyWithResponse request with any body - DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) - - DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) - - // ListPluginVersionDocsWithResponse request - ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) - - // ReplacePluginVersionDocsWithBodyWithResponse request with any body - ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) - - ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) - - // CreatePluginVersionDocsWithBodyWithResponse request with any body - CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) - - CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) - - // DeletePluginVersionTablesWithBodyWithResponse request with any body - DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) - - DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) - - // ListPluginVersionTablesWithResponse request - ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) - - // CreatePluginVersionTablesWithBodyWithResponse request with any body - CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) - - CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) - - // GetPluginVersionTableWithResponse request - GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) - - // RemovePluginUIAssetsWithResponse request - RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) - - // UploadPluginUIAssetsWithBodyWithResponse request with any body - UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) - - UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) - - // FinalizePluginUIAssetUploadWithBodyWithResponse request with any body - FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) - - FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) - - // AuthRegistryRequestWithResponse request - AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) - - // ListTeamsWithResponse request - ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) - - // CreateTeamWithBodyWithResponse request with any body - CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) - - CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) - - // DeleteTeamWithResponse request - DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) - - // GetTeamByNameWithResponse request - GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) - - // UpdateTeamWithBodyWithResponse request with any body - UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) - - UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) - - // ListAddonOrdersByTeamWithResponse request - ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) - - // CreateAddonOrderForTeamWithBodyWithResponse request with any body - CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) - - CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) - - // GetAddonOrderByTeamWithResponse request - GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) - - // DeleteAddonsByTeamWithResponse request - DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) - - // ListAddonsByTeamWithResponse request - ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) - - // DownloadAddonAssetByTeamWithResponse request - DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) - - // AIOnboardingChatWithBodyWithResponse request with any body - AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) - - AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) - - // AIOnboardingEndConversationWithResponse request - AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) - - // AIOnboardingNewConversationWithBodyWithResponse request with any body - AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) - - AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) - - // ListTeamAPIKeysWithResponse request - ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) - - // CreateTeamAPIKeyWithBodyWithResponse request with any body - CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) - - CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) - - // DeleteTeamAPIKeyWithResponse request - DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) - - // ListConnectorsWithResponse request - ListConnectorsWithResponse(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*ListConnectorsResponse, error) - - // CreateConnectorWithBodyWithResponse request with any body - CreateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) - - CreateConnectorWithResponse(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) - - // GetConnectorWithResponse request - GetConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorResponse, error) - - // UpdateConnectorWithBodyWithResponse request with any body - UpdateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) - - UpdateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) - - // RevokeConnectorWithResponse request - RevokeConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*RevokeConnectorResponse, error) - - // GetConnectorAuthStatusAWSWithResponse request - GetConnectorAuthStatusAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusAWSResponse, error) - - // AuthenticateConnectorFinishAWSWithBodyWithResponse request with any body - AuthenticateConnectorFinishAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) - - AuthenticateConnectorFinishAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) - - // AuthenticateConnectorAWSWithBodyWithResponse request with any body - AuthenticateConnectorAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) - - AuthenticateConnectorAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) - - // GetConnectorAuthStatusGCPWithResponse request - GetConnectorAuthStatusGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusGCPResponse, error) - - // AuthenticateConnectorGCPWithBodyWithResponse request with any body - AuthenticateConnectorGCPWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) - - AuthenticateConnectorGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) - - // AuthenticateConnectorFinishGCPWithResponse request - AuthenticateConnectorFinishGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishGCPResponse, error) - - // AuthenticateConnectorFinishOAuthWithBodyWithResponse request with any body - AuthenticateConnectorFinishOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) - - AuthenticateConnectorFinishOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) - - // AuthenticateConnectorOAuthWithBodyWithResponse request with any body - AuthenticateConnectorOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) - - AuthenticateConnectorOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) - - // CreateTeamImagesWithBodyWithResponse request with any body - CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) - - CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) - - // DeleteTeamInvitationWithBodyWithResponse request with any body - DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) - - DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) - - // ListTeamInvitationsWithResponse request - ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) - - // EmailTeamInvitationWithBodyWithResponse request with any body - EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) - - EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) - - // AcceptTeamInvitationWithBodyWithResponse request with any body - AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) - - AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) - - // CancelTeamInvitationWithResponse request - CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) - - // ListInvoicesByTeamWithResponse request - ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) - - // GetManagedDatabasesWithResponse request - GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) - - // CreateManagedDatabaseWithBodyWithResponse request with any body - CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) - - CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) - - // DeleteManagedDatabaseWithResponse request - DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) - - // GetManagedDatabaseWithResponse request - GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) - - // RemoveTeamMembershipWithBodyWithResponse request with any body - RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) - - RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) - - // GetTeamMembershipsWithResponse request - GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) - - // DeleteTeamMembershipWithResponse request - DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) - - // DeletePluginsByTeamWithResponse request - DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) - - // ListPluginsByTeamWithResponse request - ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) - - // DownloadPluginAssetByTeamWithResponse request - DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) - - // GetSettingsWithResponse request - GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) - - // UpdateSettingsWithBodyWithResponse request with any body - UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) - - UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) - - // GetTeamSpendWithResponse request - GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) - - // DeleteSpendingLimitWithResponse request - DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) - - // GetSpendingLimitWithResponse request - GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) - - // CreateSpendingLimitWithBodyWithResponse request with any body - CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) - - CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) - - // UpdateSpendingLimitWithBodyWithResponse request with any body - UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) - - UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) - - // ListSubscriptionOrdersByTeamWithResponse request - ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) - - // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body - CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) - - CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) - - // GetSubscriptionOrderByTeamWithResponse request - GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) - - // CreateSyncDestinationTestConnectionWithBodyWithResponse request with any body - CreateSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) - - CreateSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) - - // GetSyncDestinationTestConnectionWithResponse request - GetSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncDestinationTestConnectionResponse, error) - - // UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse request with any body - UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) - - UpdateSyncTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) - - // PromoteSyncDestinationTestConnectionWithBodyWithResponse request with any body - PromoteSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) - - PromoteSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) - - // ListSyncDestinationsWithResponse request - ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) - - // DeleteSyncDestinationWithResponse request - DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) - - // GetSyncDestinationWithResponse request - GetSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*GetSyncDestinationResponse, error) - - // UpdateSyncDestinationWithBodyWithResponse request with any body - UpdateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) - - UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) - - // ListSyncDestinationSyncsWithResponse request - ListSyncDestinationSyncsWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationSyncsResponse, error) - - // GetTestConnectionForSyncDestinationWithResponse request - GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) - - // CreateSyncSourceTestConnectionWithBodyWithResponse request with any body - CreateSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) - - CreateSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) - - // GetSyncSourceTestConnectionWithResponse request - GetSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncSourceTestConnectionResponse, error) - - // UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse request with any body - UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) - - UpdateSyncTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) - - // PromoteSyncSourceTestConnectionWithBodyWithResponse request with any body - PromoteSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) - - PromoteSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) - - // ListSyncSourcesWithResponse request - ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) - - // DeleteSyncSourceWithResponse request - DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) - - // GetSyncSourceWithResponse request - GetSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*GetSyncSourceResponse, error) - - // UpdateSyncSourceWithBodyWithResponse request with any body - UpdateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) - - UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) - - // ListSyncSourceSyncsWithResponse request - ListSyncSourceSyncsWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncSourceSyncsResponse, error) - - // GetTestConnectionForSyncSourceWithResponse request - GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) - - // ListSyncsWithResponse request - ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) - - // CreateSyncWithBodyWithResponse request with any body - CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) - - CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) - - // GetTestConnectionConnectorCredentialsWithResponse request - GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) - - // GetTestConnectionConnectorIdentityWithResponse request - GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) - - // DeleteSyncWithResponse request - DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) - - // GetSyncWithResponse request - GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) - - // UpdateSyncWithBodyWithResponse request with any body - UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) - - UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) - - // ListSyncRunsWithResponse request - ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) - - // CreateSyncRunWithResponse request - CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) - - // GetSyncRunWithResponse request - GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) - - // UpdateSyncRunWithBodyWithResponse request with any body - UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) - - UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) - - // GetSyncRunConnectorCredentialsWithResponse request - GetSyncRunConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorCredentialsResponse, error) - - // GetSyncRunConnectorIdentityWithResponse request - GetSyncRunConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorIdentityResponse, error) - - // GetSyncRunLogsWithResponse request - GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) - - // CreateSyncRunProgressWithBodyWithResponse request with any body - CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) - - CreateSyncRunProgressWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) - - // ListTeamPluginUsageWithResponse request - ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) - - // IncreaseTeamPluginUsageWithBodyWithResponse request with any body - IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) - - IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) - - // GetTeamUsageSummaryWithResponse request - GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) - - // GetGroupedTeamUsageSummaryWithResponse request - GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) - - // GetTeamPluginUsageWithResponse request - GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) - - // ListUsersByTeamWithResponse request - ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) - - // UploadImageWithBodyWithResponse request with any body - UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) - - UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) - - // GetCurrentUserWithResponse request - GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) - - // UpdateCurrentUserWithBodyWithResponse request with any body - UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) - - UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) - - // SendAnonymousEventWithBodyWithResponse request with any body - SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) - - SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) - - // CheckUserAuthStatusWithResponse request - CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) - - // UpdateCustomerWithBodyWithResponse request with any body - UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) - - UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) - - // SendUserEventWithBodyWithResponse request with any body - SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) - - SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) - - // ListCurrentUserInvitationsWithResponse request - ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) - - // LogoutUserWithResponse request - LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) - - // LoginUserWithBodyWithResponse request with any body - LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) - - LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) - - // GetCurrentUserMembershipsWithResponse request - GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) - - // RegisterUserWithBodyWithResponse request with any body - RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) - - RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) - - // ResetUserPasswordWithBodyWithResponse request with any body - ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) - - ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) - - // DeterminePlatformTenantByEmailWithResponse request - DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) - - // CreateUserTokenWithResponse request - CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) - - // UserTOTPDeleteWithResponse request - UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) - - // UserTOTPSetupWithResponse request - UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) - - // UserTOTPVerifyWithBodyWithResponse request with any body - UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) - - UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) - - // VerifyUserEmailWithBodyWithResponse request with any body - VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) - - VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) - - // DeleteUserWithResponse request - DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) -} - -type HealthCheckResponse struct { - Body []byte - HTTPResponse *http.Response -} - -// Status returns HTTPResponse.Status -func (r HealthCheckResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r HealthCheckResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListAddonsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListAddons200Response - JSON401 *RequiresAuthentication - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListAddonsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListAddonsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateAddonResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Addon - JSON400 *BadRequest - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateAddonResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateAddonResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteAddonByTeamAndNameResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteAddonByTeamAndNameResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteAddonByTeamAndNameResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetAddonResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListAddon - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetAddonResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetAddonResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateAddonResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Addon - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateAddonResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateAddonResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListAddonVersionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListAddonVersions200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListAddonVersionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListAddonVersionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetAddonVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AddonVersion - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetAddonVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetAddonVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateAddonVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AddonVersion - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateAddonVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateAddonVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateAddonVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AddonVersion - JSON201 *AddonVersion - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateAddonVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateAddonVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DownloadAddonAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AddonAsset - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DownloadAddonAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DownloadAddonAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UploadAddonAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ReleaseURL - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UploadAddonAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UploadAddonAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CQHealthCheckResponse struct { - Body []byte - HTTPResponse *http.Response - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CQHealthCheckResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CQHealthCheckResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOpenAPIJSONResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *map[string]interface{} -} - -// Status returns HTTPResponse.Status -func (r GetOpenAPIJSONResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOpenAPIJSONResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ActivatePlatformResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ActivatePlatform200Response - JSON205 *ActivatePlatform205Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ActivatePlatformResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ActivatePlatformResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type RenewPlatformActivationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *RenewPlatformActivation200Response - JSON205 *ActivatePlatform205Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r RenewPlatformActivationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RenewPlatformActivationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ReportPlatformDataResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ReportPlatformDataResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ReportPlatformDataResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListPluginNotificationRequestsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPluginNotificationRequests200Response - JSON401 *RequiresAuthentication - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListPluginNotificationRequestsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginNotificationRequestsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreatePluginNotificationRequestResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *PluginNotificationRequest - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreatePluginNotificationRequestResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginNotificationRequestResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePluginNotificationRequestResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginNotificationRequestResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginNotificationRequestResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPluginNotificationRequestResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPluginNotificationRequests200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetPluginNotificationRequestResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginNotificationRequestResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListPluginsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPlugins200Response - JSON401 *RequiresAuthentication - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListPluginsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreatePluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Plugin - JSON400 *BadRequest - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreatePluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePluginByTeamAndPluginNameResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginByTeamAndPluginNameResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginByTeamAndPluginNameResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPlugin - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetPluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdatePluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Plugin - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdatePluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdatePluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePluginUpcomingPriceChangesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginUpcomingPriceChangesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginUpcomingPriceChangesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListPluginUpcomingPriceChangesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPluginUpcomingPriceChanges200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListPluginUpcomingPriceChangesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginUpcomingPriceChangesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreatePluginUpcomingPriceChangeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *PluginPrice - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreatePluginUpcomingPriceChangeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginUpcomingPriceChangeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListPluginVersionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPluginVersions200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListPluginVersionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersionDetails - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetPluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdatePluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersion - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdatePluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdatePluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreatePluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersion - JSON201 *PluginVersion - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreatePluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DownloadPluginAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginAsset - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DownloadPluginAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DownloadPluginAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UploadPluginAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ReleaseURL - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UploadPluginAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UploadPluginAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListPluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPluginVersionDocs200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListPluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ReplacePluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *CreatePluginVersionDocs201Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ReplacePluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ReplacePluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreatePluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *CreatePluginVersionDocs201Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreatePluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListPluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPluginVersionTables200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListPluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreatePluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *CreatePluginVersionTables201Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreatePluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetPluginVersionTableResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginTableDetails - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetPluginVersionTableResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginVersionTableResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type RemovePluginUIAssetsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r RemovePluginUIAssetsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RemovePluginUIAssetsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UploadPluginUIAssetsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *UploadPluginUIAssets201Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UploadPluginUIAssetsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UploadPluginUIAssetsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type FinalizePluginUIAssetUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r FinalizePluginUIAssetUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r FinalizePluginUIAssetUploadResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AuthRegistryRequestResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *RegistryAuthToken - JSON400 *DockerError - JSON401 *DockerError - JSON404 *DockerError - JSON422 *DockerError - JSON500 *DockerError -} - -// Status returns HTTPResponse.Status -func (r AuthRegistryRequestResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthRegistryRequestResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListTeamsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListTeams200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListTeamsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Team - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTeamByNameResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Team - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTeamByNameResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamByNameResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Team - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListAddonOrdersByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListAddonOrdersByTeam200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListAddonOrdersByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListAddonOrdersByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateAddonOrderForTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *AddonOrder - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateAddonOrderForTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateAddonOrderForTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetAddonOrderByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AddonOrder - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetAddonOrderByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetAddonOrderByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteAddonsByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteAddonsByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteAddonsByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListAddonsByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListAddonsByTeam200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListAddonsByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListAddonsByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DownloadAddonAssetByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AddonAsset - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DownloadAddonAssetByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DownloadAddonAssetByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AIOnboardingChatResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AIOnboardingChat200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AIOnboardingChatResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AIOnboardingChatResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AIOnboardingEndConversationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AIOnboardingEndConversation200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AIOnboardingEndConversationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AIOnboardingEndConversationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AIOnboardingNewConversationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *AIOnboardingNewConversation200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AIOnboardingNewConversationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AIOnboardingNewConversationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListTeamAPIKeysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListTeamAPIKeys200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListTeamAPIKeysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamAPIKeysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateTeamAPIKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *APIKey - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateTeamAPIKeyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamAPIKeyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteTeamAPIKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteTeamAPIKeyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamAPIKeyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListConnectorsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListConnectors200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListConnectorsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListConnectorsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateConnectorResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Connector - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateConnectorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateConnectorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetConnectorResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Connector - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetConnectorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetConnectorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateConnectorResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Connector - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateConnectorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateConnectorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type RevokeConnectorResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r RevokeConnectorResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RevokeConnectorResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetConnectorAuthStatusAWSResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetConnectorAuthStatusAWS200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetConnectorAuthStatusAWSResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetConnectorAuthStatusAWSResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AuthenticateConnectorFinishAWSResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AuthenticateConnectorFinishAWSResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorFinishAWSResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AuthenticateConnectorAWSResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ConnectorAuthResponseAWS - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AuthenticateConnectorAWSResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorAWSResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetConnectorAuthStatusGCPResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetConnectorAuthStatusGCP200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetConnectorAuthStatusGCPResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetConnectorAuthStatusGCPResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AuthenticateConnectorGCPResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ConnectorAuthResponseGCP - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AuthenticateConnectorGCPResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorGCPResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AuthenticateConnectorFinishGCPResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AuthenticateConnectorFinishGCPResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorFinishGCPResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AuthenticateConnectorFinishOAuthResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ConnectorAuthResponseOAuth - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AuthenticateConnectorFinishOAuthResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorFinishOAuthResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AuthenticateConnectorOAuthResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ConnectorAuthResponseOAuth - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AuthenticateConnectorOAuthResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AuthenticateConnectorOAuthResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateTeamImagesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *CreateTeamImages201Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateTeamImagesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamImagesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteTeamInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteTeamInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListTeamInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListTeamInvitations200Response - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListTeamInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type EmailTeamInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Invitation - JSON202 *Invitation - JSON400 *BadRequest - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r EmailTeamInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r EmailTeamInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type AcceptTeamInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *MembershipWithTeam - JSON303 *MembershipWithTeam - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r AcceptTeamInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r AcceptTeamInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CancelTeamInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CancelTeamInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CancelTeamInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListInvoicesByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListInvoicesByTeam200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListInvoicesByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListInvoicesByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetManagedDatabasesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetManagedDatabases200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetManagedDatabasesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetManagedDatabasesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateManagedDatabaseResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ManagedDatabase - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON409 *Conflict - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateManagedDatabaseResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateManagedDatabaseResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteManagedDatabaseResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteManagedDatabaseResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteManagedDatabaseResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetManagedDatabaseResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ManagedDatabase - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetManagedDatabaseResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetManagedDatabaseResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type RemoveTeamMembershipResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r RemoveTeamMembershipResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RemoveTeamMembershipResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTeamMembershipsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetTeamMemberships200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTeamMembershipsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamMembershipsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteTeamMembershipResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteTeamMembershipResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamMembershipResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeletePluginsByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeletePluginsByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginsByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListPluginsByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListPluginsByTeam200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListPluginsByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginsByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DownloadPluginAssetByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginAsset - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DownloadPluginAssetByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DownloadPluginAssetByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSettingsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Settings - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSettingsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSettingsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSettingsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Settings - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSettingsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSettingsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTeamSpendResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SpendSummary - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTeamSpendResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamSpendResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SpendingLimit - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *SpendingLimit - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SpendingLimit - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSubscriptionOrdersByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListSubscriptionOrdersByTeam200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListSubscriptionOrdersByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSubscriptionOrdersByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSubscriptionOrderForTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *TeamSubscriptionOrder - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSubscriptionOrderForTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSubscriptionOrderForTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSubscriptionOrderByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *TeamSubscriptionOrder - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSubscriptionOrderByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSyncDestinationTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *SyncDestinationTestConnection - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSyncDestinationTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncDestinationTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncDestinationTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncDestinationTestConnection - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncDestinationTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncDestinationTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSyncTestConnectionForSyncDestinationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncDestinationTestConnection - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncTestConnectionForSyncDestinationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncTestConnectionForSyncDestinationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PromoteSyncDestinationTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncDestination - JSON201 *SyncDestination - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r PromoteSyncDestinationTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PromoteSyncDestinationTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSyncDestinationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListSyncDestinations200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListSyncDestinationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSyncDestinationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSyncDestinationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteSyncDestinationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncDestinationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncDestinationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncDestination - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncDestinationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncDestinationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSyncDestinationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncDestination - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncDestinationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncDestinationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSyncDestinationSyncsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListSyncSourceSyncs200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListSyncDestinationSyncsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSyncDestinationSyncsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTestConnectionForSyncDestinationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncTestConnection - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTestConnectionForSyncDestinationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionForSyncDestinationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSyncSourceTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *SyncSourceTestConnection - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSyncSourceTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncSourceTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncSourceTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncSourceTestConnection - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncSourceTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncSourceTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSyncTestConnectionForSyncSourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncSourceTestConnection - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncTestConnectionForSyncSourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncTestConnectionForSyncSourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PromoteSyncSourceTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncSource - JSON201 *SyncSource - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r PromoteSyncSourceTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PromoteSyncSourceTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSyncSourcesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListSyncSources200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListSyncSourcesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSyncSourcesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSyncSourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteSyncSourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncSourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncSourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncSource - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncSourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncSourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSyncSourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncSource - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncSourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncSourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSyncSourceSyncsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListSyncSourceSyncs200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListSyncSourceSyncsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSyncSourceSyncsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTestConnectionForSyncSourceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncTestConnection - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTestConnectionForSyncSourceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionForSyncSourceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSyncsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListSyncSourceSyncs200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListSyncsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSyncsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSyncResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Sync - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSyncResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTestConnectionConnectorCredentialsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorCredentials200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTestConnectionConnectorCredentialsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionConnectorCredentialsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTestConnectionConnectorIdentityResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorIdentity200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTestConnectionConnectorIdentityResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTestConnectionConnectorIdentityResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSyncResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteSyncResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSyncResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Sync - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSyncResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Sync - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListSyncRunsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListSyncRuns200Response - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListSyncRunsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListSyncRunsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSyncRunResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *SyncRun - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSyncRunResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncRunResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncRunResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncRunDetails - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncRunResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSyncRunResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncRun - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncRunResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncRunResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncRunConnectorCredentialsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorCredentials200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncRunConnectorCredentialsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunConnectorCredentialsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncRunConnectorIdentityResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetSyncRunConnectorIdentity200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncRunConnectorIdentityResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunConnectorIdentityResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSyncRunLogsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncRunLogs - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSyncRunLogsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSyncRunLogsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSyncRunProgressResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSyncRunProgressResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSyncRunProgressResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListTeamPluginUsage200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type IncreaseTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError - JSON503 *ServiceUnavailable -} - -// Status returns HTTPResponse.Status -func (r IncreaseTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r IncreaseTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTeamUsageSummaryResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageSummary - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTeamUsageSummaryResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamUsageSummaryResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetGroupedTeamUsageSummaryResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageSummary - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetGroupedTeamUsageSummaryResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetGroupedTeamUsageSummaryResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTeamPluginUsageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UsageCurrent - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTeamPluginUsageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamPluginUsageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListUsersByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListUsersByTeam200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListUsersByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListUsersByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UploadImageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ImageURL - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UploadImageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UploadImageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON405 *MethodNotAllowed - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type SendAnonymousEventResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r SendAnonymousEventResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SendAnonymousEventResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CheckUserAuthStatusResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *CheckUserAuthStatus200Response - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CheckUserAuthStatusResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CheckUserAuthStatusResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateCustomerResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateCustomerResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateCustomerResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type SendUserEventResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r SendUserEventResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r SendUserEventResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ListCurrentUserInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ListCurrentUserInvitations200Response - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ListCurrentUserInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ListCurrentUserInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type LogoutUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r LogoutUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r LogoutUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type LoginUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r LoginUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r LoginUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCurrentUserMembershipsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *GetCurrentUserMemberships200Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetCurrentUserMembershipsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserMembershipsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type RegisterUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *RegisterUser201Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r RegisterUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r RegisterUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ResetUserPasswordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r ResetUserPasswordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ResetUserPasswordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeterminePlatformTenantByEmailResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DeterminePlatformTenantByEmail200Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeterminePlatformTenantByEmailResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeterminePlatformTenantByEmailResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateUserTokenResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *CreateUserToken201Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateUserTokenResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateUserTokenResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UserTOTPDeleteResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UserTOTPDeleteResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UserTOTPDeleteResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UserTOTPSetupResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UserTOTPSetup200Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UserTOTPSetupResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UserTOTPSetupResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UserTOTPVerifyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *UserTOTPVerify201Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON405 *MethodNotAllowed - JSON422 *UnprocessableEntity - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UserTOTPVerifyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UserTOTPVerifyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type VerifyUserEmailResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON404 *NotFound - JSON429 *TooManyRequests - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r VerifyUserEmailResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r VerifyUserEmailResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// HealthCheckWithResponse request returning *HealthCheckResponse -func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { - rsp, err := c.HealthCheck(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseHealthCheckResponse(rsp) -} - -// ListAddonsWithResponse request returning *ListAddonsResponse -func (c *ClientWithResponses) ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) { - rsp, err := c.ListAddons(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListAddonsResponse(rsp) -} - -// CreateAddonWithBodyWithResponse request with arbitrary body returning *CreateAddonResponse -func (c *ClientWithResponses) CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { - rsp, err := c.CreateAddonWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonResponse(rsp) -} - -func (c *ClientWithResponses) CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { - rsp, err := c.CreateAddon(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonResponse(rsp) -} - -// DeleteAddonByTeamAndNameWithResponse request returning *DeleteAddonByTeamAndNameResponse -func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { - rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonType, addonName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteAddonByTeamAndNameResponse(rsp) -} - -// GetAddonWithResponse request returning *GetAddonResponse -func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { - rsp, err := c.GetAddon(ctx, teamName, addonType, addonName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetAddonResponse(rsp) -} - -// UpdateAddonWithBodyWithResponse request with arbitrary body returning *UpdateAddonResponse -func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { - rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonType, addonName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonResponse(rsp) -} - -func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { - rsp, err := c.UpdateAddon(ctx, teamName, addonType, addonName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonResponse(rsp) -} - -// ListAddonVersionsWithResponse request returning *ListAddonVersionsResponse -func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { - rsp, err := c.ListAddonVersions(ctx, teamName, addonType, addonName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListAddonVersionsResponse(rsp) -} - -// GetAddonVersionWithResponse request returning *GetAddonVersionResponse -func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { - rsp, err := c.GetAddonVersion(ctx, teamName, addonType, addonName, versionName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetAddonVersionResponse(rsp) -} - -// UpdateAddonVersionWithBodyWithResponse request with arbitrary body returning *UpdateAddonVersionResponse -func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { - rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonVersionResponse(rsp) -} - -func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { - rsp, err := c.UpdateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateAddonVersionResponse(rsp) -} - -// CreateAddonVersionWithBodyWithResponse request with arbitrary body returning *CreateAddonVersionResponse -func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { - rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonVersionResponse(rsp) -} - -func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { - rsp, err := c.CreateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonVersionResponse(rsp) -} - -// DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse -func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { - rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDownloadAddonAssetResponse(rsp) -} - -// UploadAddonAssetWithResponse request returning *UploadAddonAssetResponse -func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { - rsp, err := c.UploadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadAddonAssetResponse(rsp) -} - -// CQHealthCheckWithResponse request returning *CQHealthCheckResponse -func (c *ClientWithResponses) CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) { - rsp, err := c.CQHealthCheck(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseCQHealthCheckResponse(rsp) -} - -// GetOpenAPIJSONWithResponse request returning *GetOpenAPIJSONResponse -func (c *ClientWithResponses) GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) { - rsp, err := c.GetOpenAPIJSON(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOpenAPIJSONResponse(rsp) -} - -// ActivatePlatformWithBodyWithResponse request with arbitrary body returning *ActivatePlatformResponse -func (c *ClientWithResponses) ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { - rsp, err := c.ActivatePlatformWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseActivatePlatformResponse(rsp) -} - -func (c *ClientWithResponses) ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { - rsp, err := c.ActivatePlatform(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseActivatePlatformResponse(rsp) -} - -// RenewPlatformActivationWithBodyWithResponse request with arbitrary body returning *RenewPlatformActivationResponse -func (c *ClientWithResponses) RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { - rsp, err := c.RenewPlatformActivationWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRenewPlatformActivationResponse(rsp) -} - -func (c *ClientWithResponses) RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { - rsp, err := c.RenewPlatformActivation(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRenewPlatformActivationResponse(rsp) -} - -// ReportPlatformDataWithBodyWithResponse request with arbitrary body returning *ReportPlatformDataResponse -func (c *ClientWithResponses) ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { - rsp, err := c.ReportPlatformDataWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseReportPlatformDataResponse(rsp) -} - -func (c *ClientWithResponses) ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { - rsp, err := c.ReportPlatformData(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseReportPlatformDataResponse(rsp) -} - -// ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse -func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { - rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginNotificationRequestsResponse(rsp) -} - -// CreatePluginNotificationRequestWithBodyWithResponse request with arbitrary body returning *CreatePluginNotificationRequestResponse -func (c *ClientWithResponses) CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { - rsp, err := c.CreatePluginNotificationRequestWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginNotificationRequestResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { - rsp, err := c.CreatePluginNotificationRequest(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginNotificationRequestResponse(rsp) -} - -// DeletePluginNotificationRequestWithResponse request returning *DeletePluginNotificationRequestResponse -func (c *ClientWithResponses) DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) { - rsp, err := c.DeletePluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginNotificationRequestResponse(rsp) -} - -// GetPluginNotificationRequestWithResponse request returning *GetPluginNotificationRequestResponse -func (c *ClientWithResponses) GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) { - rsp, err := c.GetPluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginNotificationRequestResponse(rsp) -} - -// ListPluginsWithResponse request returning *ListPluginsResponse -func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { - rsp, err := c.ListPlugins(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginsResponse(rsp) -} - -// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse -func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePlugin(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginResponse(rsp) -} - -// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse -func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { - rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginByTeamAndPluginNameResponse(rsp) -} - -// GetPluginWithResponse request returning *GetPluginResponse -func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { - rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginResponse(rsp) -} - -// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse -func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginResponse(rsp) -} - -func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginResponse(rsp) -} - -// DeletePluginUpcomingPriceChangesWithResponse request returning *DeletePluginUpcomingPriceChangesResponse -func (c *ClientWithResponses) DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) { - rsp, err := c.DeletePluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginUpcomingPriceChangesResponse(rsp) -} - -// ListPluginUpcomingPriceChangesWithResponse request returning *ListPluginUpcomingPriceChangesResponse -func (c *ClientWithResponses) ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) { - rsp, err := c.ListPluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginUpcomingPriceChangesResponse(rsp) -} - -// CreatePluginUpcomingPriceChangeWithBodyWithResponse request with arbitrary body returning *CreatePluginUpcomingPriceChangeResponse -func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { - rsp, err := c.CreatePluginUpcomingPriceChangeWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginUpcomingPriceChangeResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { - rsp, err := c.CreatePluginUpcomingPriceChange(ctx, teamName, pluginKind, pluginName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginUpcomingPriceChangeResponse(rsp) -} - -// ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse -func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { - rsp, err := c.ListPluginVersions(ctx, teamName, pluginKind, pluginName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginVersionsResponse(rsp) -} - -// GetPluginVersionWithResponse request returning *GetPluginVersionResponse -func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { - rsp, err := c.GetPluginVersion(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginVersionResponse(rsp) -} - -// UpdatePluginVersionWithBodyWithResponse request with arbitrary body returning *UpdatePluginVersionResponse -func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginVersionResponse(rsp) -} - -func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginVersionResponse(rsp) -} - -// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse -func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionResponse(rsp) -} - -// DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse -func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { - rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDownloadPluginAssetResponse(rsp) -} - -// UploadPluginAssetWithResponse request returning *UploadPluginAssetResponse -func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { - rsp, err := c.UploadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadPluginAssetResponse(rsp) -} - -// DeletePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionDocsResponse -func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginVersionDocsResponse(rsp) -} - -func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginVersionDocsResponse(rsp) -} - -// ListPluginVersionDocsWithResponse request returning *ListPluginVersionDocsResponse -func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { - rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginVersionDocsResponse(rsp) -} - -// ReplacePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *ReplacePluginVersionDocsResponse -func (c *ClientWithResponses) ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { - rsp, err := c.ReplacePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseReplacePluginVersionDocsResponse(rsp) -} - -func (c *ClientWithResponses) ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { - rsp, err := c.ReplacePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseReplacePluginVersionDocsResponse(rsp) -} - -// CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse -func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionDocsResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionDocsResponse(rsp) -} - -// DeletePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionTablesResponse -func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginVersionTablesResponse(rsp) -} - -func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginVersionTablesResponse(rsp) -} - -// ListPluginVersionTablesWithResponse request returning *ListPluginVersionTablesResponse -func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { - rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginVersionTablesResponse(rsp) -} - -// CreatePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionTablesResponse -func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionTablesResponse(rsp) -} - -func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionTablesResponse(rsp) -} - -// GetPluginVersionTableWithResponse request returning *GetPluginVersionTableResponse -func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { - rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginKind, pluginName, versionName, tableName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginVersionTableResponse(rsp) -} - -// RemovePluginUIAssetsWithResponse request returning *RemovePluginUIAssetsResponse -func (c *ClientWithResponses) RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) { - rsp, err := c.RemovePluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) - if err != nil { - return nil, err - } - return ParseRemovePluginUIAssetsResponse(rsp) -} - -// UploadPluginUIAssetsWithBodyWithResponse request with arbitrary body returning *UploadPluginUIAssetsResponse -func (c *ClientWithResponses) UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { - rsp, err := c.UploadPluginUIAssetsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadPluginUIAssetsResponse(rsp) -} - -func (c *ClientWithResponses) UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { - rsp, err := c.UploadPluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadPluginUIAssetsResponse(rsp) -} - -// FinalizePluginUIAssetUploadWithBodyWithResponse request with arbitrary body returning *FinalizePluginUIAssetUploadResponse -func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { - rsp, err := c.FinalizePluginUIAssetUploadWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseFinalizePluginUIAssetUploadResponse(rsp) -} - -func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { - rsp, err := c.FinalizePluginUIAssetUpload(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseFinalizePluginUIAssetUploadResponse(rsp) -} - -// AuthRegistryRequestWithResponse request returning *AuthRegistryRequestResponse -func (c *ClientWithResponses) AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) { - rsp, err := c.AuthRegistryRequest(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthRegistryRequestResponse(rsp) -} - -// ListTeamsWithResponse request returning *ListTeamsResponse -func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { - rsp, err := c.ListTeams(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamsResponse(rsp) -} - -// CreateTeamWithBodyWithResponse request with arbitrary body returning *CreateTeamResponse -func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { - rsp, err := c.CreateTeamWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamResponse(rsp) -} - -func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { - rsp, err := c.CreateTeam(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamResponse(rsp) -} - -// DeleteTeamWithResponse request returning *DeleteTeamResponse -func (c *ClientWithResponses) DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) { - rsp, err := c.DeleteTeam(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTeamResponse(rsp) -} - -// GetTeamByNameWithResponse request returning *GetTeamByNameResponse -func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) { - rsp, err := c.GetTeamByName(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTeamByNameResponse(rsp) -} - -// UpdateTeamWithBodyWithResponse request with arbitrary body returning *UpdateTeamResponse -func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { - rsp, err := c.UpdateTeamWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateTeamResponse(rsp) -} - -func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { - rsp, err := c.UpdateTeam(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateTeamResponse(rsp) -} - -// ListAddonOrdersByTeamWithResponse request returning *ListAddonOrdersByTeamResponse -func (c *ClientWithResponses) ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) { - rsp, err := c.ListAddonOrdersByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListAddonOrdersByTeamResponse(rsp) -} - -// CreateAddonOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateAddonOrderForTeamResponse -func (c *ClientWithResponses) CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { - rsp, err := c.CreateAddonOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonOrderForTeamResponse(rsp) -} - -func (c *ClientWithResponses) CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { - rsp, err := c.CreateAddonOrderForTeam(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateAddonOrderForTeamResponse(rsp) -} - -// GetAddonOrderByTeamWithResponse request returning *GetAddonOrderByTeamResponse -func (c *ClientWithResponses) GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) { - rsp, err := c.GetAddonOrderByTeam(ctx, teamName, addonOrderID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetAddonOrderByTeamResponse(rsp) -} - -// DeleteAddonsByTeamWithResponse request returning *DeleteAddonsByTeamResponse -func (c *ClientWithResponses) DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) { - rsp, err := c.DeleteAddonsByTeam(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteAddonsByTeamResponse(rsp) -} - -// ListAddonsByTeamWithResponse request returning *ListAddonsByTeamResponse -func (c *ClientWithResponses) ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) { - rsp, err := c.ListAddonsByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListAddonsByTeamResponse(rsp) -} - -// DownloadAddonAssetByTeamWithResponse request returning *DownloadAddonAssetByTeamResponse -func (c *ClientWithResponses) DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) { - rsp, err := c.DownloadAddonAssetByTeam(ctx, teamName, addonTeam, addonType, addonName, versionName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDownloadAddonAssetByTeamResponse(rsp) -} - -// AIOnboardingChatWithBodyWithResponse request with arbitrary body returning *AIOnboardingChatResponse -func (c *ClientWithResponses) AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { - rsp, err := c.AIOnboardingChatWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAIOnboardingChatResponse(rsp) -} - -func (c *ClientWithResponses) AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { - rsp, err := c.AIOnboardingChat(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAIOnboardingChatResponse(rsp) -} - -// AIOnboardingEndConversationWithResponse request returning *AIOnboardingEndConversationResponse -func (c *ClientWithResponses) AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) { - rsp, err := c.AIOnboardingEndConversation(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseAIOnboardingEndConversationResponse(rsp) -} - -// AIOnboardingNewConversationWithBodyWithResponse request with arbitrary body returning *AIOnboardingNewConversationResponse -func (c *ClientWithResponses) AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { - rsp, err := c.AIOnboardingNewConversationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAIOnboardingNewConversationResponse(rsp) -} - -func (c *ClientWithResponses) AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { - rsp, err := c.AIOnboardingNewConversation(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAIOnboardingNewConversationResponse(rsp) -} - -// ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse -func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { - rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamAPIKeysResponse(rsp) -} - -// CreateTeamAPIKeyWithBodyWithResponse request with arbitrary body returning *CreateTeamAPIKeyResponse -func (c *ClientWithResponses) CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { - rsp, err := c.CreateTeamAPIKeyWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamAPIKeyResponse(rsp) -} - -func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { - rsp, err := c.CreateTeamAPIKey(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamAPIKeyResponse(rsp) -} - -// DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse -func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { - rsp, err := c.DeleteTeamAPIKey(ctx, teamName, apiKeyID, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTeamAPIKeyResponse(rsp) -} - -// ListConnectorsWithResponse request returning *ListConnectorsResponse -func (c *ClientWithResponses) ListConnectorsWithResponse(ctx context.Context, teamName TeamName, params *ListConnectorsParams, reqEditors ...RequestEditorFn) (*ListConnectorsResponse, error) { - rsp, err := c.ListConnectors(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListConnectorsResponse(rsp) -} - -// CreateConnectorWithBodyWithResponse request with arbitrary body returning *CreateConnectorResponse -func (c *ClientWithResponses) CreateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) { - rsp, err := c.CreateConnectorWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateConnectorResponse(rsp) -} - -func (c *ClientWithResponses) CreateConnectorWithResponse(ctx context.Context, teamName TeamName, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) { - rsp, err := c.CreateConnector(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateConnectorResponse(rsp) -} - -// GetConnectorWithResponse request returning *GetConnectorResponse -func (c *ClientWithResponses) GetConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorResponse, error) { - rsp, err := c.GetConnector(ctx, teamName, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetConnectorResponse(rsp) -} - -// UpdateConnectorWithBodyWithResponse request with arbitrary body returning *UpdateConnectorResponse -func (c *ClientWithResponses) UpdateConnectorWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) { - rsp, err := c.UpdateConnectorWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateConnectorResponse(rsp) -} - -func (c *ClientWithResponses) UpdateConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) { - rsp, err := c.UpdateConnector(ctx, teamName, connectorID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateConnectorResponse(rsp) -} - -// RevokeConnectorWithResponse request returning *RevokeConnectorResponse -func (c *ClientWithResponses) RevokeConnectorWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*RevokeConnectorResponse, error) { - rsp, err := c.RevokeConnector(ctx, teamName, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseRevokeConnectorResponse(rsp) -} - -// GetConnectorAuthStatusAWSWithResponse request returning *GetConnectorAuthStatusAWSResponse -func (c *ClientWithResponses) GetConnectorAuthStatusAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusAWSResponse, error) { - rsp, err := c.GetConnectorAuthStatusAWS(ctx, teamName, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetConnectorAuthStatusAWSResponse(rsp) -} - -// AuthenticateConnectorFinishAWSWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishAWSResponse -func (c *ClientWithResponses) AuthenticateConnectorFinishAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) { - rsp, err := c.AuthenticateConnectorFinishAWSWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorFinishAWSResponse(rsp) -} - -func (c *ClientWithResponses) AuthenticateConnectorFinishAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishAWSResponse, error) { - rsp, err := c.AuthenticateConnectorFinishAWS(ctx, teamName, connectorID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorFinishAWSResponse(rsp) -} - -// AuthenticateConnectorAWSWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorAWSResponse -func (c *ClientWithResponses) AuthenticateConnectorAWSWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) { - rsp, err := c.AuthenticateConnectorAWSWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorAWSResponse(rsp) -} - -func (c *ClientWithResponses) AuthenticateConnectorAWSWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorAWSJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorAWSResponse, error) { - rsp, err := c.AuthenticateConnectorAWS(ctx, teamName, connectorID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorAWSResponse(rsp) -} - -// GetConnectorAuthStatusGCPWithResponse request returning *GetConnectorAuthStatusGCPResponse -func (c *ClientWithResponses) GetConnectorAuthStatusGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetConnectorAuthStatusGCPResponse, error) { - rsp, err := c.GetConnectorAuthStatusGCP(ctx, teamName, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetConnectorAuthStatusGCPResponse(rsp) -} - -// AuthenticateConnectorGCPWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorGCPResponse -func (c *ClientWithResponses) AuthenticateConnectorGCPWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) { - rsp, err := c.AuthenticateConnectorGCPWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorGCPResponse(rsp) -} - -func (c *ClientWithResponses) AuthenticateConnectorGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorGCPJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorGCPResponse, error) { - rsp, err := c.AuthenticateConnectorGCP(ctx, teamName, connectorID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorGCPResponse(rsp) -} - -// AuthenticateConnectorFinishGCPWithResponse request returning *AuthenticateConnectorFinishGCPResponse -func (c *ClientWithResponses) AuthenticateConnectorFinishGCPWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishGCPResponse, error) { - rsp, err := c.AuthenticateConnectorFinishGCP(ctx, teamName, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorFinishGCPResponse(rsp) -} - -// AuthenticateConnectorFinishOAuthWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorFinishOAuthResponse -func (c *ClientWithResponses) AuthenticateConnectorFinishOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) { - rsp, err := c.AuthenticateConnectorFinishOAuthWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorFinishOAuthResponse(rsp) -} - -func (c *ClientWithResponses) AuthenticateConnectorFinishOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorFinishOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorFinishOAuthResponse, error) { - rsp, err := c.AuthenticateConnectorFinishOAuth(ctx, teamName, connectorID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorFinishOAuthResponse(rsp) -} - -// AuthenticateConnectorOAuthWithBodyWithResponse request with arbitrary body returning *AuthenticateConnectorOAuthResponse -func (c *ClientWithResponses) AuthenticateConnectorOAuthWithBodyWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) { - rsp, err := c.AuthenticateConnectorOAuthWithBody(ctx, teamName, connectorID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorOAuthResponse(rsp) -} - -func (c *ClientWithResponses) AuthenticateConnectorOAuthWithResponse(ctx context.Context, teamName TeamName, connectorID ConnectorID, body AuthenticateConnectorOAuthJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateConnectorOAuthResponse, error) { - rsp, err := c.AuthenticateConnectorOAuth(ctx, teamName, connectorID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAuthenticateConnectorOAuthResponse(rsp) -} - -// CreateTeamImagesWithBodyWithResponse request with arbitrary body returning *CreateTeamImagesResponse -func (c *ClientWithResponses) CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { - rsp, err := c.CreateTeamImagesWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamImagesResponse(rsp) -} - -func (c *ClientWithResponses) CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { - rsp, err := c.CreateTeamImages(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamImagesResponse(rsp) -} - -// DeleteTeamInvitationWithBodyWithResponse request with arbitrary body returning *DeleteTeamInvitationResponse -func (c *ClientWithResponses) DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { - rsp, err := c.DeleteTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTeamInvitationResponse(rsp) -} - -func (c *ClientWithResponses) DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { - rsp, err := c.DeleteTeamInvitation(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTeamInvitationResponse(rsp) -} - -// ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse -func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { - rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamInvitationsResponse(rsp) -} - -// EmailTeamInvitationWithBodyWithResponse request with arbitrary body returning *EmailTeamInvitationResponse -func (c *ClientWithResponses) EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { - rsp, err := c.EmailTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseEmailTeamInvitationResponse(rsp) -} - -func (c *ClientWithResponses) EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { - rsp, err := c.EmailTeamInvitation(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseEmailTeamInvitationResponse(rsp) -} - -// AcceptTeamInvitationWithBodyWithResponse request with arbitrary body returning *AcceptTeamInvitationResponse -func (c *ClientWithResponses) AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { - rsp, err := c.AcceptTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAcceptTeamInvitationResponse(rsp) -} - -func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { - rsp, err := c.AcceptTeamInvitation(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAcceptTeamInvitationResponse(rsp) -} - -// CancelTeamInvitationWithResponse request returning *CancelTeamInvitationResponse -func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { - rsp, err := c.CancelTeamInvitation(ctx, teamName, email, reqEditors...) - if err != nil { - return nil, err - } - return ParseCancelTeamInvitationResponse(rsp) -} - -// ListInvoicesByTeamWithResponse request returning *ListInvoicesByTeamResponse -func (c *ClientWithResponses) ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) { - rsp, err := c.ListInvoicesByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListInvoicesByTeamResponse(rsp) -} - -// GetManagedDatabasesWithResponse request returning *GetManagedDatabasesResponse -func (c *ClientWithResponses) GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) { - rsp, err := c.GetManagedDatabases(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetManagedDatabasesResponse(rsp) -} - -// CreateManagedDatabaseWithBodyWithResponse request with arbitrary body returning *CreateManagedDatabaseResponse -func (c *ClientWithResponses) CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { - rsp, err := c.CreateManagedDatabaseWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateManagedDatabaseResponse(rsp) -} - -func (c *ClientWithResponses) CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { - rsp, err := c.CreateManagedDatabase(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateManagedDatabaseResponse(rsp) -} - -// DeleteManagedDatabaseWithResponse request returning *DeleteManagedDatabaseResponse -func (c *ClientWithResponses) DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) { - rsp, err := c.DeleteManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteManagedDatabaseResponse(rsp) -} - -// GetManagedDatabaseWithResponse request returning *GetManagedDatabaseResponse -func (c *ClientWithResponses) GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) { - rsp, err := c.GetManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetManagedDatabaseResponse(rsp) -} - -// RemoveTeamMembershipWithBodyWithResponse request with arbitrary body returning *RemoveTeamMembershipResponse -func (c *ClientWithResponses) RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { - rsp, err := c.RemoveTeamMembershipWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRemoveTeamMembershipResponse(rsp) -} - -func (c *ClientWithResponses) RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { - rsp, err := c.RemoveTeamMembership(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRemoveTeamMembershipResponse(rsp) -} - -// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse -func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { - rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTeamMembershipsResponse(rsp) -} - -// DeleteTeamMembershipWithResponse request returning *DeleteTeamMembershipResponse -func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { - rsp, err := c.DeleteTeamMembership(ctx, teamName, email, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTeamMembershipResponse(rsp) -} - -// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse -func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { - rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginsByTeamResponse(rsp) -} - -// ListPluginsByTeamWithResponse request returning *ListPluginsByTeamResponse -func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) { - rsp, err := c.ListPluginsByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginsByTeamResponse(rsp) -} - -// DownloadPluginAssetByTeamWithResponse request returning *DownloadPluginAssetByTeamResponse -func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) { - rsp, err := c.DownloadPluginAssetByTeam(ctx, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDownloadPluginAssetByTeamResponse(rsp) -} - -// GetSettingsWithResponse request returning *GetSettingsResponse -func (c *ClientWithResponses) GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) { - rsp, err := c.GetSettings(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSettingsResponse(rsp) -} - -// UpdateSettingsWithBodyWithResponse request with arbitrary body returning *UpdateSettingsResponse -func (c *ClientWithResponses) UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { - rsp, err := c.UpdateSettingsWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSettingsResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { - rsp, err := c.UpdateSettings(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSettingsResponse(rsp) -} - -// GetTeamSpendWithResponse request returning *GetTeamSpendResponse -func (c *ClientWithResponses) GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) { - rsp, err := c.GetTeamSpend(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTeamSpendResponse(rsp) -} - -// DeleteSpendingLimitWithResponse request returning *DeleteSpendingLimitResponse -func (c *ClientWithResponses) DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) { - rsp, err := c.DeleteSpendingLimit(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSpendingLimitResponse(rsp) -} - -// GetSpendingLimitWithResponse request returning *GetSpendingLimitResponse -func (c *ClientWithResponses) GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) { - rsp, err := c.GetSpendingLimit(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSpendingLimitResponse(rsp) -} - -// CreateSpendingLimitWithBodyWithResponse request with arbitrary body returning *CreateSpendingLimitResponse -func (c *ClientWithResponses) CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { - rsp, err := c.CreateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSpendingLimitResponse(rsp) -} - -func (c *ClientWithResponses) CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { - rsp, err := c.CreateSpendingLimit(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSpendingLimitResponse(rsp) -} - -// UpdateSpendingLimitWithBodyWithResponse request with arbitrary body returning *UpdateSpendingLimitResponse -func (c *ClientWithResponses) UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { - rsp, err := c.UpdateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSpendingLimitResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { - rsp, err := c.UpdateSpendingLimit(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSpendingLimitResponse(rsp) -} - -// ListSubscriptionOrdersByTeamWithResponse request returning *ListSubscriptionOrdersByTeamResponse -func (c *ClientWithResponses) ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) { - rsp, err := c.ListSubscriptionOrdersByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSubscriptionOrdersByTeamResponse(rsp) -} - -// CreateSubscriptionOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateSubscriptionOrderForTeamResponse -func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { - rsp, err := c.CreateSubscriptionOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSubscriptionOrderForTeamResponse(rsp) -} - -func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { - rsp, err := c.CreateSubscriptionOrderForTeam(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSubscriptionOrderForTeamResponse(rsp) -} - -// GetSubscriptionOrderByTeamWithResponse request returning *GetSubscriptionOrderByTeamResponse -func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) { - rsp, err := c.GetSubscriptionOrderByTeam(ctx, teamName, teamSubscriptionOrderID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSubscriptionOrderByTeamResponse(rsp) -} - -// CreateSyncDestinationTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncDestinationTestConnectionResponse -func (c *ClientWithResponses) CreateSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) { - rsp, err := c.CreateSyncDestinationTestConnectionWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncDestinationTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncDestinationTestConnectionResponse, error) { - rsp, err := c.CreateSyncDestinationTestConnection(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncDestinationTestConnectionResponse(rsp) -} - -// GetSyncDestinationTestConnectionWithResponse request returning *GetSyncDestinationTestConnectionResponse -func (c *ClientWithResponses) GetSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncDestinationTestConnectionResponse, error) { - rsp, err := c.GetSyncDestinationTestConnection(ctx, teamName, syncDestinationTestConnectionID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncDestinationTestConnectionResponse(rsp) -} - -// UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionForSyncDestinationResponse -func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) { - rsp, err := c.UpdateSyncTestConnectionForSyncDestinationWithBody(ctx, teamName, syncDestinationTestConnectionID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body UpdateSyncTestConnectionForSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) { - rsp, err := c.UpdateSyncTestConnectionForSyncDestination(ctx, teamName, syncDestinationTestConnectionID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp) -} - -// PromoteSyncDestinationTestConnectionWithBodyWithResponse request with arbitrary body returning *PromoteSyncDestinationTestConnectionResponse -func (c *ClientWithResponses) PromoteSyncDestinationTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) { - rsp, err := c.PromoteSyncDestinationTestConnectionWithBody(ctx, teamName, syncDestinationTestConnectionID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePromoteSyncDestinationTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) PromoteSyncDestinationTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncDestinationTestConnectionID SyncDestinationTestConnectionID, body PromoteSyncDestinationTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncDestinationTestConnectionResponse, error) { - rsp, err := c.PromoteSyncDestinationTestConnection(ctx, teamName, syncDestinationTestConnectionID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePromoteSyncDestinationTestConnectionResponse(rsp) -} - -// ListSyncDestinationsWithResponse request returning *ListSyncDestinationsResponse -func (c *ClientWithResponses) ListSyncDestinationsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncDestinationsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationsResponse, error) { - rsp, err := c.ListSyncDestinations(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSyncDestinationsResponse(rsp) -} - -// DeleteSyncDestinationWithResponse request returning *DeleteSyncDestinationResponse -func (c *ClientWithResponses) DeleteSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*DeleteSyncDestinationResponse, error) { - rsp, err := c.DeleteSyncDestination(ctx, teamName, syncDestinationName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSyncDestinationResponse(rsp) -} - -// GetSyncDestinationWithResponse request returning *GetSyncDestinationResponse -func (c *ClientWithResponses) GetSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, reqEditors ...RequestEditorFn) (*GetSyncDestinationResponse, error) { - rsp, err := c.GetSyncDestination(ctx, teamName, syncDestinationName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncDestinationResponse(rsp) -} - -// UpdateSyncDestinationWithBodyWithResponse request with arbitrary body returning *UpdateSyncDestinationResponse -func (c *ClientWithResponses) UpdateSyncDestinationWithBodyWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) { - rsp, err := c.UpdateSyncDestinationWithBody(ctx, teamName, syncDestinationName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncDestinationResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, body UpdateSyncDestinationJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncDestinationResponse, error) { - rsp, err := c.UpdateSyncDestination(ctx, teamName, syncDestinationName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncDestinationResponse(rsp) -} - -// ListSyncDestinationSyncsWithResponse request returning *ListSyncDestinationSyncsResponse -func (c *ClientWithResponses) ListSyncDestinationSyncsWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, params *ListSyncDestinationSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncDestinationSyncsResponse, error) { - rsp, err := c.ListSyncDestinationSyncs(ctx, teamName, syncDestinationName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSyncDestinationSyncsResponse(rsp) -} - -// GetTestConnectionForSyncDestinationWithResponse request returning *GetTestConnectionForSyncDestinationResponse -func (c *ClientWithResponses) GetTestConnectionForSyncDestinationWithResponse(ctx context.Context, teamName TeamName, syncDestinationName SyncDestinationName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncDestinationResponse, error) { - rsp, err := c.GetTestConnectionForSyncDestination(ctx, teamName, syncDestinationName, syncTestConnectionId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTestConnectionForSyncDestinationResponse(rsp) -} - -// CreateSyncSourceTestConnectionWithBodyWithResponse request with arbitrary body returning *CreateSyncSourceTestConnectionResponse -func (c *ClientWithResponses) CreateSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) { - rsp, err := c.CreateSyncSourceTestConnectionWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncSourceTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, body CreateSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncSourceTestConnectionResponse, error) { - rsp, err := c.CreateSyncSourceTestConnection(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncSourceTestConnectionResponse(rsp) -} - -// GetSyncSourceTestConnectionWithResponse request returning *GetSyncSourceTestConnectionResponse -func (c *ClientWithResponses) GetSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, reqEditors ...RequestEditorFn) (*GetSyncSourceTestConnectionResponse, error) { - rsp, err := c.GetSyncSourceTestConnection(ctx, teamName, syncSourceTestConnectionID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncSourceTestConnectionResponse(rsp) -} - -// UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionForSyncSourceResponse -func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) { - rsp, err := c.UpdateSyncTestConnectionForSyncSourceWithBody(ctx, teamName, syncSourceTestConnectionID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body UpdateSyncTestConnectionForSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionForSyncSourceResponse, error) { - rsp, err := c.UpdateSyncTestConnectionForSyncSource(ctx, teamName, syncSourceTestConnectionID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp) -} - -// PromoteSyncSourceTestConnectionWithBodyWithResponse request with arbitrary body returning *PromoteSyncSourceTestConnectionResponse -func (c *ClientWithResponses) PromoteSyncSourceTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) { - rsp, err := c.PromoteSyncSourceTestConnectionWithBody(ctx, teamName, syncSourceTestConnectionID, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePromoteSyncSourceTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) PromoteSyncSourceTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncSourceTestConnectionID SyncSourceTestConnectionID, body PromoteSyncSourceTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*PromoteSyncSourceTestConnectionResponse, error) { - rsp, err := c.PromoteSyncSourceTestConnection(ctx, teamName, syncSourceTestConnectionID, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePromoteSyncSourceTestConnectionResponse(rsp) -} - -// ListSyncSourcesWithResponse request returning *ListSyncSourcesResponse -func (c *ClientWithResponses) ListSyncSourcesWithResponse(ctx context.Context, teamName TeamName, params *ListSyncSourcesParams, reqEditors ...RequestEditorFn) (*ListSyncSourcesResponse, error) { - rsp, err := c.ListSyncSources(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSyncSourcesResponse(rsp) -} - -// DeleteSyncSourceWithResponse request returning *DeleteSyncSourceResponse -func (c *ClientWithResponses) DeleteSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*DeleteSyncSourceResponse, error) { - rsp, err := c.DeleteSyncSource(ctx, teamName, syncSourceName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSyncSourceResponse(rsp) -} - -// GetSyncSourceWithResponse request returning *GetSyncSourceResponse -func (c *ClientWithResponses) GetSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, reqEditors ...RequestEditorFn) (*GetSyncSourceResponse, error) { - rsp, err := c.GetSyncSource(ctx, teamName, syncSourceName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncSourceResponse(rsp) -} - -// UpdateSyncSourceWithBodyWithResponse request with arbitrary body returning *UpdateSyncSourceResponse -func (c *ClientWithResponses) UpdateSyncSourceWithBodyWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) { - rsp, err := c.UpdateSyncSourceWithBody(ctx, teamName, syncSourceName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncSourceResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, body UpdateSyncSourceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncSourceResponse, error) { - rsp, err := c.UpdateSyncSource(ctx, teamName, syncSourceName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncSourceResponse(rsp) -} - -// ListSyncSourceSyncsWithResponse request returning *ListSyncSourceSyncsResponse -func (c *ClientWithResponses) ListSyncSourceSyncsWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, params *ListSyncSourceSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncSourceSyncsResponse, error) { - rsp, err := c.ListSyncSourceSyncs(ctx, teamName, syncSourceName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSyncSourceSyncsResponse(rsp) -} - -// GetTestConnectionForSyncSourceWithResponse request returning *GetTestConnectionForSyncSourceResponse -func (c *ClientWithResponses) GetTestConnectionForSyncSourceWithResponse(ctx context.Context, teamName TeamName, syncSourceName SyncSourceName, syncTestConnectionId SyncTestConnectionId, reqEditors ...RequestEditorFn) (*GetTestConnectionForSyncSourceResponse, error) { - rsp, err := c.GetTestConnectionForSyncSource(ctx, teamName, syncSourceName, syncTestConnectionId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTestConnectionForSyncSourceResponse(rsp) -} - -// ListSyncsWithResponse request returning *ListSyncsResponse -func (c *ClientWithResponses) ListSyncsWithResponse(ctx context.Context, teamName TeamName, params *ListSyncsParams, reqEditors ...RequestEditorFn) (*ListSyncsResponse, error) { - rsp, err := c.ListSyncs(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSyncsResponse(rsp) -} - -// CreateSyncWithBodyWithResponse request with arbitrary body returning *CreateSyncResponse -func (c *ClientWithResponses) CreateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { - rsp, err := c.CreateSyncWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) { - rsp, err := c.CreateSync(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncResponse(rsp) -} - -// GetTestConnectionConnectorCredentialsWithResponse request returning *GetTestConnectionConnectorCredentialsResponse -func (c *ClientWithResponses) GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) { - rsp, err := c.GetTestConnectionConnectorCredentials(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTestConnectionConnectorCredentialsResponse(rsp) -} - -// GetTestConnectionConnectorIdentityWithResponse request returning *GetTestConnectionConnectorIdentityResponse -func (c *ClientWithResponses) GetTestConnectionConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorIdentityResponse, error) { - rsp, err := c.GetTestConnectionConnectorIdentity(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTestConnectionConnectorIdentityResponse(rsp) -} - -// DeleteSyncWithResponse request returning *DeleteSyncResponse -func (c *ClientWithResponses) DeleteSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*DeleteSyncResponse, error) { - rsp, err := c.DeleteSync(ctx, teamName, syncName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSyncResponse(rsp) -} - -// GetSyncWithResponse request returning *GetSyncResponse -func (c *ClientWithResponses) GetSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*GetSyncResponse, error) { - rsp, err := c.GetSync(ctx, teamName, syncName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncResponse(rsp) -} - -// UpdateSyncWithBodyWithResponse request with arbitrary body returning *UpdateSyncResponse -func (c *ClientWithResponses) UpdateSyncWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { - rsp, err := c.UpdateSyncWithBody(ctx, teamName, syncName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, body UpdateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncResponse, error) { - rsp, err := c.UpdateSync(ctx, teamName, syncName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncResponse(rsp) -} - -// ListSyncRunsWithResponse request returning *ListSyncRunsResponse -func (c *ClientWithResponses) ListSyncRunsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, params *ListSyncRunsParams, reqEditors ...RequestEditorFn) (*ListSyncRunsResponse, error) { - rsp, err := c.ListSyncRuns(ctx, teamName, syncName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSyncRunsResponse(rsp) -} - -// CreateSyncRunWithResponse request returning *CreateSyncRunResponse -func (c *ClientWithResponses) CreateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, reqEditors ...RequestEditorFn) (*CreateSyncRunResponse, error) { - rsp, err := c.CreateSyncRun(ctx, teamName, syncName, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncRunResponse(rsp) -} - -// GetSyncRunWithResponse request returning *GetSyncRunResponse -func (c *ClientWithResponses) GetSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, reqEditors ...RequestEditorFn) (*GetSyncRunResponse, error) { - rsp, err := c.GetSyncRun(ctx, teamName, syncName, syncRunId, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncRunResponse(rsp) -} - -// UpdateSyncRunWithBodyWithResponse request with arbitrary body returning *UpdateSyncRunResponse -func (c *ClientWithResponses) UpdateSyncRunWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) { - rsp, err := c.UpdateSyncRunWithBody(ctx, teamName, syncName, syncRunId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncRunResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncRunWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body UpdateSyncRunJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncRunResponse, error) { - rsp, err := c.UpdateSyncRun(ctx, teamName, syncName, syncRunId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncRunResponse(rsp) -} - -// GetSyncRunConnectorCredentialsWithResponse request returning *GetSyncRunConnectorCredentialsResponse -func (c *ClientWithResponses) GetSyncRunConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorCredentialsResponse, error) { - rsp, err := c.GetSyncRunConnectorCredentials(ctx, teamName, syncName, syncRunId, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncRunConnectorCredentialsResponse(rsp) -} - -// GetSyncRunConnectorIdentityWithResponse request returning *GetSyncRunConnectorIdentityResponse -func (c *ClientWithResponses) GetSyncRunConnectorIdentityWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetSyncRunConnectorIdentityResponse, error) { - rsp, err := c.GetSyncRunConnectorIdentity(ctx, teamName, syncName, syncRunId, connectorID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncRunConnectorIdentityResponse(rsp) -} - -// GetSyncRunLogsWithResponse request returning *GetSyncRunLogsResponse -func (c *ClientWithResponses) GetSyncRunLogsWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, params *GetSyncRunLogsParams, reqEditors ...RequestEditorFn) (*GetSyncRunLogsResponse, error) { - rsp, err := c.GetSyncRunLogs(ctx, teamName, syncName, syncRunId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSyncRunLogsResponse(rsp) -} - -// CreateSyncRunProgressWithBodyWithResponse request with arbitrary body returning *CreateSyncRunProgressResponse -func (c *ClientWithResponses) CreateSyncRunProgressWithBodyWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) { - rsp, err := c.CreateSyncRunProgressWithBody(ctx, teamName, syncName, syncRunId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncRunProgressResponse(rsp) -} - -func (c *ClientWithResponses) CreateSyncRunProgressWithResponse(ctx context.Context, teamName TeamName, syncName SyncName, syncRunId SyncRunId, body CreateSyncRunProgressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncRunProgressResponse, error) { - rsp, err := c.CreateSyncRunProgress(ctx, teamName, syncName, syncRunId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSyncRunProgressResponse(rsp) -} - -// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse -func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { - rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamPluginUsageResponse(rsp) -} - -// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseIncreaseTeamPluginUsageResponse(rsp) -} - -func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { - rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseIncreaseTeamPluginUsageResponse(rsp) -} - -// GetTeamUsageSummaryWithResponse request returning *GetTeamUsageSummaryResponse -func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { - rsp, err := c.GetTeamUsageSummary(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTeamUsageSummaryResponse(rsp) -} - -// GetGroupedTeamUsageSummaryWithResponse request returning *GetGroupedTeamUsageSummaryResponse -func (c *ClientWithResponses) GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) { - rsp, err := c.GetGroupedTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetGroupedTeamUsageSummaryResponse(rsp) -} - -// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse -func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { - rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTeamPluginUsageResponse(rsp) -} - -// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse -func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { - rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListUsersByTeamResponse(rsp) -} - -// UploadImageWithBodyWithResponse request with arbitrary body returning *UploadImageResponse -func (c *ClientWithResponses) UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { - rsp, err := c.UploadImageWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadImageResponse(rsp) -} - -func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { - rsp, err := c.UploadImage(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadImageResponse(rsp) -} - -// GetCurrentUserWithResponse request returning *GetCurrentUserResponse -func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { - rsp, err := c.GetCurrentUser(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrentUserResponse(rsp) -} - -// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse -func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} - -func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { - rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCurrentUserResponse(rsp) -} - -// SendAnonymousEventWithBodyWithResponse request with arbitrary body returning *SendAnonymousEventResponse -func (c *ClientWithResponses) SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { - rsp, err := c.SendAnonymousEventWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSendAnonymousEventResponse(rsp) -} - -func (c *ClientWithResponses) SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { - rsp, err := c.SendAnonymousEvent(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSendAnonymousEventResponse(rsp) -} - -// CheckUserAuthStatusWithResponse request returning *CheckUserAuthStatusResponse -func (c *ClientWithResponses) CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) { - rsp, err := c.CheckUserAuthStatus(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseCheckUserAuthStatusResponse(rsp) -} - -// UpdateCustomerWithBodyWithResponse request with arbitrary body returning *UpdateCustomerResponse -func (c *ClientWithResponses) UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { - rsp, err := c.UpdateCustomerWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCustomerResponse(rsp) -} - -func (c *ClientWithResponses) UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { - rsp, err := c.UpdateCustomer(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateCustomerResponse(rsp) -} - -// SendUserEventWithBodyWithResponse request with arbitrary body returning *SendUserEventResponse -func (c *ClientWithResponses) SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { - rsp, err := c.SendUserEventWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSendUserEventResponse(rsp) -} - -func (c *ClientWithResponses) SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { - rsp, err := c.SendUserEvent(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseSendUserEventResponse(rsp) -} - -// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse -func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { - rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListCurrentUserInvitationsResponse(rsp) -} - -// LogoutUserWithResponse request returning *LogoutUserResponse -func (c *ClientWithResponses) LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) { - rsp, err := c.LogoutUser(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseLogoutUserResponse(rsp) -} - -// LoginUserWithBodyWithResponse request with arbitrary body returning *LoginUserResponse -func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { - rsp, err := c.LoginUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseLoginUserResponse(rsp) -} - -func (c *ClientWithResponses) LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { - rsp, err := c.LoginUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseLoginUserResponse(rsp) -} - -// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse -func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { - rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrentUserMembershipsResponse(rsp) -} - -// RegisterUserWithBodyWithResponse request with arbitrary body returning *RegisterUserResponse -func (c *ClientWithResponses) RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { - rsp, err := c.RegisterUserWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRegisterUserResponse(rsp) -} - -func (c *ClientWithResponses) RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { - rsp, err := c.RegisterUser(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseRegisterUserResponse(rsp) -} - -// ResetUserPasswordWithBodyWithResponse request with arbitrary body returning *ResetUserPasswordResponse -func (c *ClientWithResponses) ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { - rsp, err := c.ResetUserPasswordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseResetUserPasswordResponse(rsp) -} - -func (c *ClientWithResponses) ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { - rsp, err := c.ResetUserPassword(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseResetUserPasswordResponse(rsp) -} - -// DeterminePlatformTenantByEmailWithResponse request returning *DeterminePlatformTenantByEmailResponse -func (c *ClientWithResponses) DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) { - rsp, err := c.DeterminePlatformTenantByEmail(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeterminePlatformTenantByEmailResponse(rsp) -} - -// CreateUserTokenWithResponse request returning *CreateUserTokenResponse -func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) { - rsp, err := c.CreateUserToken(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateUserTokenResponse(rsp) -} - -// UserTOTPDeleteWithResponse request returning *UserTOTPDeleteResponse -func (c *ClientWithResponses) UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) { - rsp, err := c.UserTOTPDelete(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseUserTOTPDeleteResponse(rsp) -} - -// UserTOTPSetupWithResponse request returning *UserTOTPSetupResponse -func (c *ClientWithResponses) UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) { - rsp, err := c.UserTOTPSetup(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseUserTOTPSetupResponse(rsp) -} - -// UserTOTPVerifyWithBodyWithResponse request with arbitrary body returning *UserTOTPVerifyResponse -func (c *ClientWithResponses) UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { - rsp, err := c.UserTOTPVerifyWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUserTOTPVerifyResponse(rsp) -} - -func (c *ClientWithResponses) UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { - rsp, err := c.UserTOTPVerify(ctx, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUserTOTPVerifyResponse(rsp) -} - -// VerifyUserEmailWithBodyWithResponse request with arbitrary body returning *VerifyUserEmailResponse -func (c *ClientWithResponses) VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { - rsp, err := c.VerifyUserEmailWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseVerifyUserEmailResponse(rsp) -} - -func (c *ClientWithResponses) VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { - rsp, err := c.VerifyUserEmail(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseVerifyUserEmailResponse(rsp) -} - -// DeleteUserWithResponse request returning *DeleteUserResponse -func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { - rsp, err := c.DeleteUser(ctx, userID, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteUserResponse(rsp) -} - -// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call -func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &HealthCheckResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - return response, nil -} - -// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call -func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListAddonsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddons200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call -func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateAddonResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Addon - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call -func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteAddonByTeamAndNameResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call -func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetAddonResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddon - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call -func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateAddonResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Addon - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call -func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListAddonVersionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonVersions200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call -func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetAddonVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call -func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateAddonVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call -func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateAddonVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// StatusCode returns HTTPResponse.StatusCode +func (r CheckUserAuthStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type UpdateCustomerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError } -// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call -func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UpdateCustomerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &DownloadAddonAssetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCustomerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +type SendUserEventResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +// Status returns HTTPResponse.Status +func (r SendUserEventResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// StatusCode returns HTTPResponse.StatusCode +func (r SendUserEventResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest +type ListCurrentUserInvitationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListCurrentUserInvitations200Response + JSON500 *InternalError +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// Status returns HTTPResponse.Status +func (r ListCurrentUserInvitationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} +// StatusCode returns HTTPResponse.StatusCode +func (r ListCurrentUserInvitationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type LogoutUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError } -// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call -func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r LogoutUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &UploadAddonAssetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r LogoutUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest +type LoginUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// Status returns HTTPResponse.Status +func (r LoginUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +// StatusCode returns HTTPResponse.StatusCode +func (r LoginUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +type GetCurrentUserMembershipsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetCurrentUserMemberships200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} +// Status returns HTTPResponse.Status +func (r GetCurrentUserMembershipsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - return response, nil +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrentUserMembershipsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call -func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +type RegisterUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *RegisterUser201Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RegisterUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &CQHealthCheckResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r RegisterUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +type ResetUserPasswordResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} +// Status returns HTTPResponse.Status +func (r ResetUserPasswordResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } - - return response, nil + return http.StatusText(0) } -// ParseGetOpenAPIJSONResponse parses an HTTP response from a GetOpenAPIJSONWithResponse call -func ParseGetOpenAPIJSONResponse(rsp *http.Response) (*GetOpenAPIJSONResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// StatusCode returns HTTPResponse.StatusCode +func (r ResetUserPasswordResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - response := &GetOpenAPIJSONResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } +type DeterminePlatformTenantByEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DeterminePlatformTenantByEmail200Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest map[string]interface{} - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest +// Status returns HTTPResponse.Status +func (r DeterminePlatformTenantByEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} +// StatusCode returns HTTPResponse.StatusCode +func (r DeterminePlatformTenantByEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type CreateUserTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateUserToken201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON500 *InternalError } -// ParseActivatePlatformResponse parses an HTTP response from a ActivatePlatformWithResponse call -func ParseActivatePlatformResponse(rsp *http.Response) (*ActivatePlatformResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r CreateUserTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &ActivatePlatformResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r CreateUserTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ActivatePlatform200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: - var dest ActivatePlatform205Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON205 = &dest +type UserTOTPDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +// Status returns HTTPResponse.Status +func (r UserTOTPDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest +type UserTOTPSetupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserTOTPSetup200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON422 *UnprocessableEntity + JSON500 *InternalError +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// Status returns HTTPResponse.Status +func (r UserTOTPSetupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPSetupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - return response, nil +type UserTOTPVerifyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *UserTOTPVerify201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests + JSON500 *InternalError } -// ParseRenewPlatformActivationResponse parses an HTTP response from a RenewPlatformActivationWithResponse call -func ParseRenewPlatformActivationResponse(rsp *http.Response) (*RenewPlatformActivationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err +// Status returns HTTPResponse.Status +func (r UserTOTPVerifyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - response := &RenewPlatformActivationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPVerifyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode } + return 0 +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RenewPlatformActivation200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: - var dest ActivatePlatform205Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON205 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +type VerifyUserEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// Status returns HTTPResponse.Status +func (r VerifyUserEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest +// StatusCode returns HTTPResponse.StatusCode +func (r VerifyUserEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +type DeleteUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} +// Status returns HTTPResponse.Status +func (r DeleteUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status } + return http.StatusText(0) +} - return response, nil +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -// ParseReportPlatformDataResponse parses an HTTP response from a ReportPlatformDataWithResponse call -func ParseReportPlatformDataResponse(rsp *http.Response) (*ReportPlatformDataResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// HealthCheckWithResponse request returning *HealthCheckResponse +func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { + rsp, err := c.HealthCheck(ctx, reqEditors...) if err != nil { return nil, err } + return ParseHealthCheckResponse(rsp) +} - response := &ReportPlatformDataResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// ListAddonsWithResponse request returning *ListAddonsResponse +func (c *ClientWithResponses) ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) { + rsp, err := c.ListAddons(ctx, params, reqEditors...) + if err != nil { + return nil, err } + return ParseListAddonsResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// CreateAddonWithBodyWithResponse request with arbitrary body returning *CreateAddonResponse +func (c *ClientWithResponses) CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddonWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseCreateAddonResponse(rsp) } -// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call -func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddon(ctx, body, reqEditors...) if err != nil { return nil, err } + return ParseCreateAddonResponse(rsp) +} - response := &ListPluginNotificationRequestsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// DeleteAddonByTeamAndNameWithResponse request returning *DeleteAddonByTeamAndNameResponse +func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { + rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonType, addonName, reqEditors...) + if err != nil { + return nil, err } + return ParseDeleteAddonByTeamAndNameResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginNotificationRequests200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// GetAddonWithResponse request returning *GetAddonResponse +func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { + rsp, err := c.GetAddon(ctx, teamName, addonType, addonName, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseGetAddonResponse(rsp) } -// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call -func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// UpdateAddonWithBodyWithResponse request with arbitrary body returning *UpdateAddonResponse +func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonType, addonName, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParseUpdateAddonResponse(rsp) +} - response := &CreatePluginNotificationRequestResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddon(ctx, teamName, addonType, addonName, body, reqEditors...) + if err != nil { + return nil, err } + return ParseUpdateAddonResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginNotificationRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// ListAddonVersionsWithResponse request returning *ListAddonVersionsResponse +func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { + rsp, err := c.ListAddonVersions(ctx, teamName, addonType, addonName, params, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseListAddonVersionsResponse(rsp) } -// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call -func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetAddonVersionWithResponse request returning *GetAddonVersionResponse +func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { + rsp, err := c.GetAddonVersion(ctx, teamName, addonType, addonName, versionName, reqEditors...) if err != nil { return nil, err } + return ParseGetAddonVersionResponse(rsp) +} - response := &DeletePluginNotificationRequestResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// UpdateAddonVersionWithBodyWithResponse request with arbitrary body returning *UpdateAddonVersionResponse +func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseUpdateAddonVersionResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseUpdateAddonVersionResponse(rsp) } -// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call -func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// CreateAddonVersionWithBodyWithResponse request with arbitrary body returning *CreateAddonVersionResponse +func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParseCreateAddonVersionResponse(rsp) +} - response := &GetPluginNotificationRequestResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreateAddonVersionResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginNotificationRequests200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse +func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { + rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, params, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseDownloadAddonAssetResponse(rsp) } -// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call -func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// UploadAddonAssetWithResponse request returning *UploadAddonAssetResponse +func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { + rsp, err := c.UploadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) if err != nil { return nil, err } + return ParseUploadAddonAssetResponse(rsp) +} - response := &ListPluginsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// CQHealthCheckWithResponse request returning *CQHealthCheckResponse +func (c *ClientWithResponses) CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) { + rsp, err := c.CQHealthCheck(ctx, reqEditors...) + if err != nil { + return nil, err } + return ParseCQHealthCheckResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPlugins200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// GetOpenAPIJSONWithResponse request returning *GetOpenAPIJSONResponse +func (c *ClientWithResponses) GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) { + rsp, err := c.GetOpenAPIJSON(ctx, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseGetOpenAPIJSONResponse(rsp) } -// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call -func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// ActivatePlatformWithBodyWithResponse request with arbitrary body returning *ActivatePlatformResponse +func (c *ClientWithResponses) ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { + rsp, err := c.ActivatePlatformWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParseActivatePlatformResponse(rsp) +} - response := &CreatePluginResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { + rsp, err := c.ActivatePlatform(ctx, body, reqEditors...) + if err != nil { + return nil, err } + return ParseActivatePlatformResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Plugin - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// RenewPlatformActivationWithBodyWithResponse request with arbitrary body returning *RenewPlatformActivationResponse +func (c *ClientWithResponses) RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { + rsp, err := c.RenewPlatformActivationWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseRenewPlatformActivationResponse(rsp) } -// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call -func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { + rsp, err := c.RenewPlatformActivation(ctx, body, reqEditors...) if err != nil { return nil, err } + return ParseRenewPlatformActivationResponse(rsp) +} - response := &DeletePluginByTeamAndPluginNameResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// ReportPlatformDataWithBodyWithResponse request with arbitrary body returning *ReportPlatformDataResponse +func (c *ClientWithResponses) ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { + rsp, err := c.ReportPlatformDataWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseReportPlatformDataResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +func (c *ClientWithResponses) ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { + rsp, err := c.ReportPlatformData(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportPlatformDataResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse +func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { + rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginNotificationRequestsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +// CreatePluginNotificationRequestWithBodyWithResponse request with arbitrary body returning *CreatePluginNotificationRequestResponse +func (c *ClientWithResponses) CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequestWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginNotificationRequestResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +func (c *ClientWithResponses) CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequest(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginNotificationRequestResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// DeletePluginNotificationRequestWithResponse request returning *DeletePluginNotificationRequestResponse +func (c *ClientWithResponses) DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) { + rsp, err := c.DeletePluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginNotificationRequestResponse(rsp) +} +// GetPluginNotificationRequestWithResponse request returning *GetPluginNotificationRequestResponse +func (c *ClientWithResponses) GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) { + rsp, err := c.GetPluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseGetPluginNotificationRequestResponse(rsp) } -// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call -func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// ListPluginsWithResponse request returning *ListPluginsResponse +func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { + rsp, err := c.ListPlugins(ctx, params, reqEditors...) if err != nil { return nil, err } + return ParseListPluginsResponse(rsp) +} - response := &GetPluginResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse +func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreatePluginResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPlugin - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePlugin(ctx, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseCreatePluginResponse(rsp) } -// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call -func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse +func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { + rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } + return ParseDeletePluginByTeamAndPluginNameResponse(rsp) +} - response := &UpdatePluginResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// GetPluginWithResponse request returning *GetPluginResponse +func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { + rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } + return ParseGetPluginResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse +func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseUpdatePluginResponse(rsp) } -// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call -func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) if err != nil { return nil, err } + return ParseUpdatePluginResponse(rsp) +} - response := &DeletePluginUpcomingPriceChangesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// DeletePluginUpcomingPriceChangesWithResponse request returning *DeletePluginUpcomingPriceChangesResponse +func (c *ClientWithResponses) DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) { + rsp, err := c.DeletePluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } + return ParseDeletePluginUpcomingPriceChangesResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// ListPluginUpcomingPriceChangesWithResponse request returning *ListPluginUpcomingPriceChangesResponse +func (c *ClientWithResponses) ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) { + rsp, err := c.ListPluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseListPluginUpcomingPriceChangesResponse(rsp) } -// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call -func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// CreatePluginUpcomingPriceChangeWithBodyWithResponse request with arbitrary body returning *CreatePluginUpcomingPriceChangeResponse +func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { + rsp, err := c.CreatePluginUpcomingPriceChangeWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParseCreatePluginUpcomingPriceChangeResponse(rsp) +} - response := &ListPluginUpcomingPriceChangesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { + rsp, err := c.CreatePluginUpcomingPriceChange(ctx, teamName, pluginKind, pluginName, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreatePluginUpcomingPriceChangeResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginUpcomingPriceChanges200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse +func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { + rsp, err := c.ListPluginVersions(ctx, teamName, pluginKind, pluginName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginVersionsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// GetPluginVersionWithResponse request returning *GetPluginVersionResponse +func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { + rsp, err := c.GetPluginVersion(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPluginVersionResponse(rsp) +} +// UpdatePluginVersionWithBodyWithResponse request with arbitrary body returning *UpdatePluginVersionResponse +func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseUpdatePluginVersionResponse(rsp) } -// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call -func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } + return ParseUpdatePluginVersionResponse(rsp) +} - response := &CreatePluginUpcomingPriceChangeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse +func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreatePluginVersionResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginPrice - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseCreatePluginVersionResponse(rsp) } -// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call -func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse +func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { + rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, params, reqEditors...) if err != nil { return nil, err } + return ParseDownloadPluginAssetResponse(rsp) +} - response := &ListPluginVersionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// UploadPluginAssetWithResponse request returning *UploadPluginAssetResponse +func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { + rsp, err := c.UploadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) + if err != nil { + return nil, err } + return ParseUploadPluginAssetResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersions200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// DeletePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionDocsResponse +func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionDocsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionDocsResponse(rsp) +} +// ListPluginVersionDocsWithResponse request returning *ListPluginVersionDocsResponse +func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { + rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) + if err != nil { + return nil, err } + return ParseListPluginVersionDocsResponse(rsp) +} - return response, nil +// ReplacePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *ReplacePluginVersionDocsResponse +func (c *ClientWithResponses) ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { + rsp, err := c.ReplacePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReplacePluginVersionDocsResponse(rsp) } -// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call -func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { + rsp, err := c.ReplacePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } + return ParseReplacePluginVersionDocsResponse(rsp) +} - response := &GetPluginVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse +func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreatePluginVersionDocsResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersionDetails - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest +func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionDocsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// DeletePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionTablesResponse +func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionTablesResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionTablesResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// ListPluginVersionTablesWithResponse request returning *ListPluginVersionTablesResponse +func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { + rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginVersionTablesResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// CreatePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionTablesResponse +func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionTablesResponse(rsp) +} +func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseCreatePluginVersionTablesResponse(rsp) } -// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call -func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetPluginVersionTableWithResponse request returning *GetPluginVersionTableResponse +func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { + rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginKind, pluginName, versionName, tableName, reqEditors...) if err != nil { return nil, err } + return ParseGetPluginVersionTableResponse(rsp) +} - response := &UpdatePluginVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// RemovePluginUIAssetsWithResponse request returning *RemovePluginUIAssetsResponse +func (c *ClientWithResponses) RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) { + rsp, err := c.RemovePluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) + if err != nil { + return nil, err } + return ParseRemovePluginUIAssetsResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// UploadPluginUIAssetsWithBodyWithResponse request with arbitrary body returning *UploadPluginUIAssetsResponse +func (c *ClientWithResponses) UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { + rsp, err := c.UploadPluginUIAssetsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseUploadPluginUIAssetsResponse(rsp) } -// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call -func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { + rsp, err := c.UploadPluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) if err != nil { return nil, err } + return ParseUploadPluginUIAssetsResponse(rsp) +} - response := &CreatePluginVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// FinalizePluginUIAssetUploadWithBodyWithResponse request with arbitrary body returning *FinalizePluginUIAssetUploadResponse +func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { + rsp, err := c.FinalizePluginUIAssetUploadWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseFinalizePluginUIAssetUploadResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginVersion - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { + rsp, err := c.FinalizePluginUIAssetUpload(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseFinalizePluginUIAssetUploadResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// AuthRegistryRequestWithResponse request returning *AuthRegistryRequestResponse +func (c *ClientWithResponses) AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) { + rsp, err := c.AuthRegistryRequest(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthRegistryRequestResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +// ListTeamsWithResponse request returning *ListTeamsResponse +func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { + rsp, err := c.ListTeams(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// CreateTeamWithBodyWithResponse request with arbitrary body returning *CreateTeamResponse +func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { + rsp, err := c.CreateTeamWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamResponse(rsp) +} +func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { + rsp, err := c.CreateTeam(ctx, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreateTeamResponse(rsp) +} - return response, nil +// DeleteTeamWithResponse request returning *DeleteTeamResponse +func (c *ClientWithResponses) DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) { + rsp, err := c.DeleteTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamResponse(rsp) } -// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call -func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetTeamByNameWithResponse request returning *GetTeamByNameResponse +func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) { + rsp, err := c.GetTeamByName(ctx, teamName, reqEditors...) if err != nil { return nil, err } + return ParseGetTeamByNameResponse(rsp) +} - response := &DownloadPluginAssetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// UpdateTeamWithBodyWithResponse request with arbitrary body returning *UpdateTeamResponse +func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseUpdateTeamResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest +func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateTeamResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// ListAddonOrdersByTeamWithResponse request returning *ListAddonOrdersByTeamResponse +func (c *ClientWithResponses) ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) { + rsp, err := c.ListAddonOrdersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonOrdersByTeamResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// CreateAddonOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateAddonOrderForTeamResponse +func (c *ClientWithResponses) CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { + rsp, err := c.CreateAddonOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonOrderForTeamResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest +func (c *ClientWithResponses) CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { + rsp, err := c.CreateAddonOrderForTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonOrderForTeamResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// GetAddonOrderByTeamWithResponse request returning *GetAddonOrderByTeamResponse +func (c *ClientWithResponses) GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) { + rsp, err := c.GetAddonOrderByTeam(ctx, teamName, addonOrderID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonOrderByTeamResponse(rsp) +} +// DeleteAddonsByTeamWithResponse request returning *DeleteAddonsByTeamResponse +func (c *ClientWithResponses) DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) { + rsp, err := c.DeleteAddonsByTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseDeleteAddonsByTeamResponse(rsp) } -// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call -func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// ListAddonsByTeamWithResponse request returning *ListAddonsByTeamResponse +func (c *ClientWithResponses) ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) { + rsp, err := c.ListAddonsByTeam(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } + return ParseListAddonsByTeamResponse(rsp) +} - response := &UploadPluginAssetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// DownloadAddonAssetByTeamWithResponse request returning *DownloadAddonAssetByTeamResponse +func (c *ClientWithResponses) DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) { + rsp, err := c.DownloadAddonAssetByTeam(ctx, teamName, addonTeam, addonType, addonName, versionName, params, reqEditors...) + if err != nil { + return nil, err } + return ParseDownloadAddonAssetByTeamResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// AIOnboardingChatWithBodyWithResponse request with arbitrary body returning *AIOnboardingChatResponse +func (c *ClientWithResponses) AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { + rsp, err := c.AIOnboardingChatWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseAIOnboardingChatResponse(rsp) } -// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call -func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { + rsp, err := c.AIOnboardingChat(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } + return ParseAIOnboardingChatResponse(rsp) +} - response := &DeletePluginVersionDocsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// AIOnboardingEndConversationWithResponse request returning *AIOnboardingEndConversationResponse +func (c *ClientWithResponses) AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) { + rsp, err := c.AIOnboardingEndConversation(ctx, teamName, reqEditors...) + if err != nil { + return nil, err } + return ParseAIOnboardingEndConversationResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// AIOnboardingNewConversationWithBodyWithResponse request with arbitrary body returning *AIOnboardingNewConversationResponse +func (c *ClientWithResponses) AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { + rsp, err := c.AIOnboardingNewConversationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseAIOnboardingNewConversationResponse(rsp) } -// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call -func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { + rsp, err := c.AIOnboardingNewConversation(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } + return ParseAIOnboardingNewConversationResponse(rsp) +} - response := &ListPluginVersionDocsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse +func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { + rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err } + return ParseListTeamAPIKeysResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersionDocs200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// CreateTeamAPIKeyWithBodyWithResponse request with arbitrary body returning *CreateTeamAPIKeyResponse +func (c *ClientWithResponses) CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKeyWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseCreateTeamAPIKeyResponse(rsp) } -// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call -func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKey(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } + return ParseCreateTeamAPIKeyResponse(rsp) +} - response := &ReplacePluginVersionDocsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse +func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { + rsp, err := c.DeleteTeamAPIKey(ctx, teamName, apiKeyID, reqEditors...) + if err != nil { + return nil, err } + return ParseDeleteTeamAPIKeyResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionDocs201Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// CreateTeamImagesWithBodyWithResponse request with arbitrary body returning *CreateTeamImagesResponse +func (c *ClientWithResponses) CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { + rsp, err := c.CreateTeamImagesWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseCreateTeamImagesResponse(rsp) +} - return response, nil +func (c *ClientWithResponses) CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { + rsp, err := c.CreateTeamImages(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamImagesResponse(rsp) } -// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call -func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// DeleteTeamInvitationWithBodyWithResponse request with arbitrary body returning *DeleteTeamInvitationResponse +func (c *ClientWithResponses) DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { + rsp, err := c.DeleteTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParseDeleteTeamInvitationResponse(rsp) +} - response := &CreatePluginVersionDocsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { + rsp, err := c.DeleteTeamInvitation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err } + return ParseDeleteTeamInvitationResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionDocs201Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest +// ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse +func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { + rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamInvitationsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +// EmailTeamInvitationWithBodyWithResponse request with arbitrary body returning *EmailTeamInvitationResponse +func (c *ClientWithResponses) EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { + rsp, err := c.EmailTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTeamInvitationResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +func (c *ClientWithResponses) EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { + rsp, err := c.EmailTeamInvitation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTeamInvitationResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +// AcceptTeamInvitationWithBodyWithResponse request with arbitrary body returning *AcceptTeamInvitationResponse +func (c *ClientWithResponses) AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAcceptTeamInvitationResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAcceptTeamInvitationResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest +// CancelTeamInvitationWithResponse request returning *CancelTeamInvitationResponse +func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { + rsp, err := c.CancelTeamInvitation(ctx, teamName, email, reqEditors...) + if err != nil { + return nil, err + } + return ParseCancelTeamInvitationResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// ListInvoicesByTeamWithResponse request returning *ListInvoicesByTeamResponse +func (c *ClientWithResponses) ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) { + rsp, err := c.ListInvoicesByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListInvoicesByTeamResponse(rsp) +} +// GetManagedDatabasesWithResponse request returning *GetManagedDatabasesResponse +func (c *ClientWithResponses) GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) { + rsp, err := c.GetManagedDatabases(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err } + return ParseGetManagedDatabasesResponse(rsp) +} - return response, nil +// CreateManagedDatabaseWithBodyWithResponse request with arbitrary body returning *CreateManagedDatabaseResponse +func (c *ClientWithResponses) CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { + rsp, err := c.CreateManagedDatabaseWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateManagedDatabaseResponse(rsp) } -// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call -func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { + rsp, err := c.CreateManagedDatabase(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } + return ParseCreateManagedDatabaseResponse(rsp) +} - response := &DeletePluginVersionTablesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// DeleteManagedDatabaseWithResponse request returning *DeleteManagedDatabaseResponse +func (c *ClientWithResponses) DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) { + rsp, err := c.DeleteManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) + if err != nil { + return nil, err } + return ParseDeleteManagedDatabaseResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +// GetManagedDatabaseWithResponse request returning *GetManagedDatabaseResponse +func (c *ClientWithResponses) GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) { + rsp, err := c.GetManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetManagedDatabaseResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// RemoveTeamMembershipWithBodyWithResponse request with arbitrary body returning *RemoveTeamMembershipResponse +func (c *ClientWithResponses) RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { + rsp, err := c.RemoveTeamMembershipWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemoveTeamMembershipResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +func (c *ClientWithResponses) RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { + rsp, err := c.RemoveTeamMembership(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemoveTeamMembershipResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse +func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { + rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamMembershipsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest +// DeleteTeamMembershipWithResponse request returning *DeleteTeamMembershipResponse +func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { + rsp, err := c.DeleteTeamMembership(ctx, teamName, email, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamMembershipResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse +func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { + rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginsByTeamResponse(rsp) +} + +// ListPluginsByTeamWithResponse request returning *ListPluginsByTeamResponse +func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) { + rsp, err := c.ListPluginsByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginsByTeamResponse(rsp) +} +// DownloadPluginAssetByTeamWithResponse request returning *DownloadPluginAssetByTeamResponse +func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) { + rsp, err := c.DownloadPluginAssetByTeam(ctx, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseDownloadPluginAssetByTeamResponse(rsp) } -// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call -func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetSettingsWithResponse request returning *GetSettingsResponse +func (c *ClientWithResponses) GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) { + rsp, err := c.GetSettings(ctx, teamName, reqEditors...) if err != nil { return nil, err } + return ParseGetSettingsResponse(rsp) +} - response := &ListPluginVersionTablesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// UpdateSettingsWithBodyWithResponse request with arbitrary body returning *UpdateSettingsResponse +func (c *ClientWithResponses) UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { + rsp, err := c.UpdateSettingsWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseUpdateSettingsResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginVersionTables200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +func (c *ClientWithResponses) UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { + rsp, err := c.UpdateSettings(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseUpdateSettingsResponse(rsp) } -// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call -func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetTeamSpendWithResponse request returning *GetTeamSpendResponse +func (c *ClientWithResponses) GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) { + rsp, err := c.GetTeamSpend(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } + return ParseGetTeamSpendResponse(rsp) +} - response := &CreatePluginVersionTablesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// DeleteSpendingLimitWithResponse request returning *DeleteSpendingLimitResponse +func (c *ClientWithResponses) DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) { + rsp, err := c.DeleteSpendingLimit(ctx, teamName, reqEditors...) + if err != nil { + return nil, err } + return ParseDeleteSpendingLimitResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreatePluginVersionTables201Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// GetSpendingLimitWithResponse request returning *GetSpendingLimitResponse +func (c *ClientWithResponses) GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) { + rsp, err := c.GetSpendingLimit(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSpendingLimitResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +// CreateSpendingLimitWithBodyWithResponse request with arbitrary body returning *CreateSpendingLimitResponse +func (c *ClientWithResponses) CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { + rsp, err := c.CreateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSpendingLimitResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +func (c *ClientWithResponses) CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { + rsp, err := c.CreateSpendingLimit(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSpendingLimitResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest +// UpdateSpendingLimitWithBodyWithResponse request with arbitrary body returning *UpdateSpendingLimitResponse +func (c *ClientWithResponses) UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { + rsp, err := c.UpdateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSpendingLimitResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +func (c *ClientWithResponses) UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { + rsp, err := c.UpdateSpendingLimit(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSpendingLimitResponse(rsp) +} +// ListSubscriptionOrdersByTeamWithResponse request returning *ListSubscriptionOrdersByTeamResponse +func (c *ClientWithResponses) ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) { + rsp, err := c.ListSubscriptionOrdersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err } + return ParseListSubscriptionOrdersByTeamResponse(rsp) +} - return response, nil +// CreateSubscriptionOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateSubscriptionOrderForTeamResponse +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSubscriptionOrderForTeamResponse(rsp) } -// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call -func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeam(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } + return ParseCreateSubscriptionOrderForTeamResponse(rsp) +} - response := &GetPluginVersionTableResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// GetSubscriptionOrderByTeamWithResponse request returning *GetSubscriptionOrderByTeamResponse +func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) { + rsp, err := c.GetSubscriptionOrderByTeam(ctx, teamName, teamSubscriptionOrderID, reqEditors...) + if err != nil { + return nil, err } + return ParseGetSubscriptionOrderByTeamResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginTableDetails - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest +// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse +func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { + rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamPluginUsageResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// GetTeamUsageSummaryWithResponse request returning *GetTeamUsageSummaryResponse +func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { + rsp, err := c.GetTeamUsageSummary(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamUsageSummaryResponse(rsp) +} +// GetGroupedTeamUsageSummaryWithResponse request returning *GetGroupedTeamUsageSummaryResponse +func (c *ClientWithResponses) GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) { + rsp, err := c.GetGroupedTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseGetGroupedTeamUsageSummaryResponse(rsp) } -// ParseRemovePluginUIAssetsResponse parses an HTTP response from a RemovePluginUIAssetsWithResponse call -func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAssetsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse +func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { + rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) if err != nil { return nil, err } + return ParseGetTeamPluginUsageResponse(rsp) +} - response := &RemovePluginUIAssetsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse +func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { + rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err } + return ParseListUsersByTeamResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// UploadImageWithBodyWithResponse request with arbitrary body returning *UploadImageResponse +func (c *ClientWithResponses) UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImageWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseUploadImageResponse(rsp) } -// ParseUploadPluginUIAssetsResponse parses an HTTP response from a UploadPluginUIAssetsWithResponse call -func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAssetsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImage(ctx, body, reqEditors...) if err != nil { return nil, err } + return ParseUploadImageResponse(rsp) +} - response := &UploadPluginUIAssetsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// GetCurrentUserWithResponse request returning *GetCurrentUserResponse +func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { + rsp, err := c.GetCurrentUser(ctx, reqEditors...) + if err != nil { + return nil, err } + return ParseGetCurrentUserResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest UploadPluginUIAssets201Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse +func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseUpdateCurrentUserResponse(rsp) } -// ParseFinalizePluginUIAssetUploadResponse parses an HTTP response from a FinalizePluginUIAssetUploadWithResponse call -func ParseFinalizePluginUIAssetUploadResponse(rsp *http.Response) (*FinalizePluginUIAssetUploadResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) if err != nil { return nil, err } + return ParseUpdateCurrentUserResponse(rsp) +} - response := &FinalizePluginUIAssetUploadResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// SendAnonymousEventWithBodyWithResponse request with arbitrary body returning *SendAnonymousEventResponse +func (c *ClientWithResponses) SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { + rsp, err := c.SendAnonymousEventWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseSendAnonymousEventResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +func (c *ClientWithResponses) SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { + rsp, err := c.SendAnonymousEvent(ctx, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseSendAnonymousEventResponse(rsp) } -// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call -func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// CheckUserAuthStatusWithResponse request returning *CheckUserAuthStatusResponse +func (c *ClientWithResponses) CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) { + rsp, err := c.CheckUserAuthStatus(ctx, reqEditors...) if err != nil { return nil, err } + return ParseCheckUserAuthStatusResponse(rsp) +} - response := &AuthRegistryRequestResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// UpdateCustomerWithBodyWithResponse request with arbitrary body returning *UpdateCustomerResponse +func (c *ClientWithResponses) UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { + rsp, err := c.UpdateCustomerWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } + return ParseUpdateCustomerResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest RegistryAuthToken - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest DockerError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +func (c *ClientWithResponses) UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { + rsp, err := c.UpdateCustomer(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCustomerResponse(rsp) +} +// SendUserEventWithBodyWithResponse request with arbitrary body returning *SendUserEventResponse +func (c *ClientWithResponses) SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { + rsp, err := c.SendUserEventWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseSendUserEventResponse(rsp) } -// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call -func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func (c *ClientWithResponses) SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { + rsp, err := c.SendUserEvent(ctx, body, reqEditors...) if err != nil { return nil, err } + return ParseSendUserEventResponse(rsp) +} - response := &ListTeamsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse +func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { + rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) + if err != nil { + return nil, err } + return ParseListCurrentUserInvitationsResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeams200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - +// LogoutUserWithResponse request returning *LogoutUserResponse +func (c *ClientWithResponses) LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) { + rsp, err := c.LogoutUser(ctx, reqEditors...) + if err != nil { + return nil, err } - - return response, nil + return ParseLogoutUserResponse(rsp) } -// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call -func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// LoginUserWithBodyWithResponse request with arbitrary body returning *LoginUserResponse +func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { + rsp, err := c.LoginUserWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } + return ParseLoginUserResponse(rsp) +} - response := &CreateTeamResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +func (c *ClientWithResponses) LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { + rsp, err := c.LoginUser(ctx, body, reqEditors...) + if err != nil { + return nil, err } + return ParseLoginUserResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Team - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse +func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { + rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserMembershipsResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +// RegisterUserWithBodyWithResponse request with arbitrary body returning *RegisterUserResponse +func (c *ClientWithResponses) RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { + rsp, err := c.RegisterUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRegisterUserResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +func (c *ClientWithResponses) RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { + rsp, err := c.RegisterUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRegisterUserResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest +// ResetUserPasswordWithBodyWithResponse request with arbitrary body returning *ResetUserPasswordResponse +func (c *ClientWithResponses) ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { + rsp, err := c.ResetUserPasswordWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseResetUserPasswordResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +func (c *ClientWithResponses) ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { + rsp, err := c.ResetUserPassword(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseResetUserPasswordResponse(rsp) +} +// DeterminePlatformTenantByEmailWithResponse request returning *DeterminePlatformTenantByEmailResponse +func (c *ClientWithResponses) DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) { + rsp, err := c.DeterminePlatformTenantByEmail(ctx, params, reqEditors...) + if err != nil { + return nil, err } + return ParseDeterminePlatformTenantByEmailResponse(rsp) +} - return response, nil +// CreateUserTokenWithResponse request returning *CreateUserTokenResponse +func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) { + rsp, err := c.CreateUserToken(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateUserTokenResponse(rsp) } -// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call -func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +// UserTOTPDeleteWithResponse request returning *UserTOTPDeleteResponse +func (c *ClientWithResponses) UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) { + rsp, err := c.UserTOTPDelete(ctx, reqEditors...) if err != nil { return nil, err } + return ParseUserTOTPDeleteResponse(rsp) +} - response := &DeleteTeamResponse{ - Body: bodyBytes, - HTTPResponse: rsp, +// UserTOTPSetupWithResponse request returning *UserTOTPSetupResponse +func (c *ClientWithResponses) UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) { + rsp, err := c.UserTOTPSetup(ctx, reqEditors...) + if err != nil { + return nil, err } + return ParseUserTOTPSetupResponse(rsp) +} - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest +// UserTOTPVerifyWithBodyWithResponse request with arbitrary body returning *UserTOTPVerifyResponse +func (c *ClientWithResponses) UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { + rsp, err := c.UserTOTPVerifyWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPVerifyResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest +func (c *ClientWithResponses) UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { + rsp, err := c.UserTOTPVerify(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPVerifyResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest +// VerifyUserEmailWithBodyWithResponse request with arbitrary body returning *VerifyUserEmailResponse +func (c *ClientWithResponses) VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { + rsp, err := c.VerifyUserEmailWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVerifyUserEmailResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest +func (c *ClientWithResponses) VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { + rsp, err := c.VerifyUserEmail(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVerifyUserEmailResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest +// DeleteUserWithResponse request returning *DeleteUserResponse +func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { + rsp, err := c.DeleteUser(ctx, userID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteUserResponse(rsp) +} - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest +// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call +func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + response := &HealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } return response, nil } -// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call -func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { +// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call +func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamByNameResponse{ + response := &ListAddonsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + var dest ListAddons200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22220,20 +14017,6 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22246,26 +14029,26 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } -// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call -func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { +// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call +func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateTeamResponse{ + response := &CreateAddonResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Addon if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -22274,13 +14057,6 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22288,12 +14064,12 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22307,26 +14083,26 @@ func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { return response, nil } -// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call -func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { +// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call +func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonOrdersByTeamResponse{ + response := &DeleteAddonByTeamAndNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonOrdersByTeam200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22361,33 +14137,26 @@ func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByT return response, nil } -// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call -func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { +// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call +func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAddonOrderForTeamResponse{ + response := &GetAddonResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest AddonOrder - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddon if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22415,33 +14184,33 @@ func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrder return response, nil } -// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call -func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { +// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call +func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAddonOrderByTeamResponse{ + response := &UpdateAddonResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonOrder + var dest Addon if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -22457,6 +14226,13 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22469,26 +14245,26 @@ func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamR return response, nil } -// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call -func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { +// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call +func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAddonsByTeamResponse{ + response := &ListAddonVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonVersions200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22523,22 +14299,22 @@ func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamRes return response, nil } -// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call -func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { +// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call +func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAddonsByTeamResponse{ + response := &GetAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListAddonsByTeam200Response + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -22577,27 +14353,34 @@ func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamRespons return response, nil } -// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call -func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { +// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call +func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadAddonAssetByTeamResponse{ + response := &UpdateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AddonAsset + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22619,13 +14402,6 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22638,27 +14414,34 @@ func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAs return response, nil } -// ParseAIOnboardingChatResponse parses an HTTP response from a AIOnboardingChatWithResponse call -func ParseAIOnboardingChatResponse(rsp *http.Response) (*AIOnboardingChatResponse, error) { +// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call +func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AIOnboardingChatResponse{ + response := &CreateAddonVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AIOnboardingChat200Response + var dest AddonVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22687,13 +14470,6 @@ func ParseAIOnboardingChatResponse(rsp *http.Response) (*AIOnboardingChatRespons } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: - var dest MethodNotAllowed - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON405 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22706,34 +14482,27 @@ func ParseAIOnboardingChatResponse(rsp *http.Response) (*AIOnboardingChatRespons return response, nil } -// ParseAIOnboardingEndConversationResponse parses an HTTP response from a AIOnboardingEndConversationWithResponse call -func ParseAIOnboardingEndConversationResponse(rsp *http.Response) (*AIOnboardingEndConversationResponse, error) { +// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call +func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AIOnboardingEndConversationResponse{ + response := &DownloadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AIOnboardingEndConversation200Response + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22755,12 +14524,12 @@ func ParseAIOnboardingEndConversationResponse(rsp *http.Response) (*AIOnboarding } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: - var dest MethodNotAllowed + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON405 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22774,33 +14543,26 @@ func ParseAIOnboardingEndConversationResponse(rsp *http.Response) (*AIOnboarding return response, nil } -// ParseAIOnboardingNewConversationResponse parses an HTTP response from a AIOnboardingNewConversationWithResponse call -func ParseAIOnboardingNewConversationResponse(rsp *http.Response) (*AIOnboardingNewConversationResponse, error) { +// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call +func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AIOnboardingNewConversationResponse{ + response := &UploadAddonAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AIOnboardingNewConversation200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -22816,59 +14578,104 @@ func ParseAIOnboardingNewConversationResponse(rsp *http.Response) (*AIOnboarding } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call +func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CQHealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON500 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: - var dest MethodNotAllowed - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON405 = &dest + } - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + return response, nil +} + +// ParseGetOpenAPIJSONResponse parses an HTTP response from a GetOpenAPIJSONWithResponse call +func ParseGetOpenAPIJSONResponse(rsp *http.Response) (*GetOpenAPIJSONResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOpenAPIJSONResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]interface{} if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON500 = &dest + response.JSON200 = &dest } return response, nil } -// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call -func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { +// ParseActivatePlatformResponse parses an HTTP response from a ActivatePlatformWithResponse call +func ParseActivatePlatformResponse(rsp *http.Response) (*ActivatePlatformResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamAPIKeysResponse{ + response := &ActivatePlatformResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeamAPIKeys200Response + var dest ActivatePlatform200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: + var dest ActivatePlatform205Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON205 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -22877,6 +14684,13 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -22889,54 +14703,54 @@ func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, return response, nil } -// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call -func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { +// ParseRenewPlatformActivationResponse parses an HTTP response from a RenewPlatformActivationWithResponse call +func ParseRenewPlatformActivationResponse(rsp *http.Response) (*RenewPlatformActivationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamAPIKeyResponse{ + response := &RenewPlatformActivationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest APIKey + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RenewPlatformActivation200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: + var dest ActivatePlatform205Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON205 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -22950,15 +14764,15 @@ func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyRespons return response, nil } -// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call -func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { +// ParseReportPlatformDataResponse parses an HTTP response from a ReportPlatformDataWithResponse call +func ParseReportPlatformDataResponse(rsp *http.Response) (*ReportPlatformDataResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamAPIKeyResponse{ + response := &ReportPlatformDataResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -22971,26 +14785,19 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23004,34 +14811,27 @@ func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyRespons return response, nil } -// ParseListConnectorsResponse parses an HTTP response from a ListConnectorsWithResponse call -func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, error) { +// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call +func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListConnectorsResponse{ + response := &ListPluginNotificationRequestsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListConnectors200Response + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23039,13 +14839,6 @@ func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, e } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23058,22 +14851,22 @@ func ParseListConnectorsResponse(rsp *http.Response) (*ListConnectorsResponse, e return response, nil } -// ParseCreateConnectorResponse parses an HTTP response from a CreateConnectorWithResponse call -func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, error) { +// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call +func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateConnectorResponse{ + response := &CreatePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Connector + var dest PluginNotificationRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23093,6 +14886,20 @@ func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23112,27 +14919,20 @@ func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, return response, nil } -// ParseGetConnectorResponse parses an HTTP response from a GetConnectorWithResponse call -func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error) { +// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call +func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetConnectorResponse{ + response := &DeletePluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Connector - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23159,34 +14959,27 @@ func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error return response, nil } -// ParseUpdateConnectorResponse parses an HTTP response from a UpdateConnectorWithResponse call -func ParseUpdateConnectorResponse(rsp *http.Response) (*UpdateConnectorResponse, error) { +// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call +func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateConnectorResponse{ + response := &GetPluginNotificationRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Connector + var dest ListPluginNotificationRequests200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23213,40 +15006,33 @@ func ParseUpdateConnectorResponse(rsp *http.Response) (*UpdateConnectorResponse, return response, nil } -// ParseRevokeConnectorResponse parses an HTTP response from a RevokeConnectorWithResponse call -func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, error) { +// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call +func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &RevokeConnectorResponse{ + response := &ListPluginsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPlugins200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23260,26 +15046,26 @@ func ParseRevokeConnectorResponse(rsp *http.Response) (*RevokeConnectorResponse, return response, nil } -// ParseGetConnectorAuthStatusAWSResponse parses an HTTP response from a GetConnectorAuthStatusAWSWithResponse call -func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAuthStatusAWSResponse, error) { +// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call +func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetConnectorAuthStatusAWSResponse{ + response := &CreatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetConnectorAuthStatusAWS200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -23288,19 +15074,12 @@ func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAu } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -23321,15 +15100,15 @@ func ParseGetConnectorAuthStatusAWSResponse(rsp *http.Response) (*GetConnectorAu return response, nil } -// ParseAuthenticateConnectorFinishAWSResponse parses an HTTP response from a AuthenticateConnectorFinishAWSWithResponse call -func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*AuthenticateConnectorFinishAWSResponse, error) { +// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call +func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorFinishAWSResponse{ + response := &DeletePluginByTeamAndPluginNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -23363,13 +15142,6 @@ func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*Authentic } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23382,34 +15154,27 @@ func ParseAuthenticateConnectorFinishAWSResponse(rsp *http.Response) (*Authentic return response, nil } -// ParseAuthenticateConnectorAWSResponse parses an HTTP response from a AuthenticateConnectorAWSWithResponse call -func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateConnectorAWSResponse, error) { +// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call +func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorAWSResponse{ + response := &GetPluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ConnectorAuthResponseAWS + var dest ListPlugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23424,13 +15189,6 @@ func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateCon } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23443,22 +15201,22 @@ func ParseAuthenticateConnectorAWSResponse(rsp *http.Response) (*AuthenticateCon return response, nil } -// ParseGetConnectorAuthStatusGCPResponse parses an HTTP response from a GetConnectorAuthStatusGCPWithResponse call -func ParseGetConnectorAuthStatusGCPResponse(rsp *http.Response) (*GetConnectorAuthStatusGCPResponse, error) { +// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call +func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetConnectorAuthStatusGCPResponse{ + response := &UpdatePluginResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetConnectorAuthStatusGCP200Response + var dest Plugin if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23471,12 +15229,12 @@ func ParseGetConnectorAuthStatusGCPResponse(rsp *http.Response) (*GetConnectorAu } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -23504,34 +15262,20 @@ func ParseGetConnectorAuthStatusGCPResponse(rsp *http.Response) (*GetConnectorAu return response, nil } -// ParseAuthenticateConnectorGCPResponse parses an HTTP response from a AuthenticateConnectorGCPWithResponse call -func ParseAuthenticateConnectorGCPResponse(rsp *http.Response) (*AuthenticateConnectorGCPResponse, error) { +// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call +func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorGCPResponse{ + response := &DeletePluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ConnectorAuthResponseGCP - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23539,19 +15283,19 @@ func ParseAuthenticateConnectorGCPResponse(rsp *http.Response) (*AuthenticateCon } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23565,26 +15309,26 @@ func ParseAuthenticateConnectorGCPResponse(rsp *http.Response) (*AuthenticateCon return response, nil } -// ParseAuthenticateConnectorFinishGCPResponse parses an HTTP response from a AuthenticateConnectorFinishGCPWithResponse call -func ParseAuthenticateConnectorFinishGCPResponse(rsp *http.Response) (*AuthenticateConnectorFinishGCPResponse, error) { +// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call +func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorFinishGCPResponse{ + response := &ListPluginUpcomingPriceChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginUpcomingPriceChanges200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -23607,13 +15351,6 @@ func ParseAuthenticateConnectorFinishGCPResponse(rsp *http.Response) (*Authentic } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23626,33 +15363,26 @@ func ParseAuthenticateConnectorFinishGCPResponse(rsp *http.Response) (*Authentic return response, nil } -// ParseAuthenticateConnectorFinishOAuthResponse parses an HTTP response from a AuthenticateConnectorFinishOAuthWithResponse call -func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*AuthenticateConnectorFinishOAuthResponse, error) { +// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call +func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorFinishOAuthResponse{ + response := &CreatePluginUpcomingPriceChangeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ConnectorAuthResponseOAuth - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginPrice if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -23694,22 +15424,22 @@ func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*Authent return response, nil } -// ParseAuthenticateConnectorOAuthResponse parses an HTTP response from a AuthenticateConnectorOAuthWithResponse call -func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateConnectorOAuthResponse, error) { +// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call +func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AuthenticateConnectorOAuthResponse{ + response := &ListPluginVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ConnectorAuthResponseOAuth + var dest ListPluginVersions200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -23729,19 +15459,19 @@ func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateC } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -23755,26 +15485,26 @@ func ParseAuthenticateConnectorOAuthResponse(rsp *http.Response) (*AuthenticateC return response, nil } -// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call -func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { +// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call +func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamImagesResponse{ + response := &GetPluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest CreateTeamImages201Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersionDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -23809,20 +15539,27 @@ func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesRespons return response, nil } -// ParseDeleteTeamInvitationResponse parses an HTTP response from a DeleteTeamInvitationWithResponse call -func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitationResponse, error) { +// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call +func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamInvitationResponse{ + response := &UpdatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23837,13 +15574,6 @@ func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitatio } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23863,27 +15593,48 @@ func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitatio return response, nil } -// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call -func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { +// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call +func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamInvitationsResponse{ + response := &CreatePluginVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListTeamInvitations200Response + var dest PluginVersion if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -23903,54 +15654,40 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR return response, nil } -// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call -func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { +// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call +func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &EmailTeamInvitationResponse{ + response := &DownloadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invitation + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Invitation - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON202 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: var dest TooManyRequests @@ -23971,33 +15708,33 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR return response, nil } -// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call -func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { +// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call +func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AcceptTeamInvitationResponse{ + response := &UploadPluginAssetResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest MembershipWithTeam + var dest ReleaseURL if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: - var dest MembershipWithTeam + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON303 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -24018,15 +15755,15 @@ func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitatio return response, nil } -// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call -func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { +// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call +func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CancelTeamInvitationResponse{ + response := &DeletePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -24060,6 +15797,13 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24072,22 +15816,22 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio return response, nil } -// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call -func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { +// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call +func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListInvoicesByTeamResponse{ + response := &ListPluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListInvoicesByTeam200Response + var dest ListPluginVersionDocs200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24100,13 +15844,6 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24126,26 +15863,26 @@ func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamRes return response, nil } -// ParseGetManagedDatabasesResponse parses an HTTP response from a GetManagedDatabasesWithResponse call -func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesResponse, error) { +// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call +func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetManagedDatabasesResponse{ + response := &ReplacePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetManagedDatabases200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -24175,6 +15912,13 @@ func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesR } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24187,22 +15931,22 @@ func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesR return response, nil } -// ParseCreateManagedDatabaseResponse parses an HTTP response from a CreateManagedDatabaseWithResponse call -func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatabaseResponse, error) { +// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call +func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateManagedDatabaseResponse{ + response := &CreatePluginVersionDocsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ManagedDatabase + var dest CreatePluginVersionDocs201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24229,19 +15973,12 @@ func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatab } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON409 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -24262,20 +15999,27 @@ func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatab return response, nil } -// ParseDeleteManagedDatabaseResponse parses an HTTP response from a DeleteManagedDatabaseWithResponse call -func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatabaseResponse, error) { +// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call +func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteManagedDatabaseResponse{ + response := &DeletePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24283,6 +16027,13 @@ func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatab } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24309,22 +16060,22 @@ func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatab return response, nil } -// ParseGetManagedDatabaseResponse parses an HTTP response from a GetManagedDatabaseWithResponse call -func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseResponse, error) { +// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call +func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetManagedDatabaseResponse{ + response := &ListPluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ManagedDatabase + var dest ListPluginVersionTables200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24356,20 +16107,27 @@ func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseRes return response, nil } -// ParseRemoveTeamMembershipResponse parses an HTTP response from a RemoveTeamMembershipWithResponse call -func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershipResponse, error) { +// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call +func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &RemoveTeamMembershipResponse{ + response := &CreatePluginVersionTablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionTables201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24417,34 +16175,27 @@ func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershi return response, nil } -// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call -func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { +// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call +func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamMembershipsResponse{ + response := &GetPluginVersionTableResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetTeamMemberships200Response + var dest PluginTableDetails if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24452,13 +16203,6 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24478,15 +16222,15 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } -// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call -func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { +// ParseRemovePluginUIAssetsResponse parses an HTTP response from a RemovePluginUIAssetsWithResponse call +func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAssetsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteTeamMembershipResponse{ + response := &RemovePluginUIAssetsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -24513,20 +16257,6 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24539,20 +16269,27 @@ func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershi return response, nil } -// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call -func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { +// ParseUploadPluginUIAssetsResponse parses an HTTP response from a UploadPluginUIAssetsWithResponse call +func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAssetsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginsByTeamResponse{ + response := &UploadPluginUIAssetsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest UploadPluginUIAssets201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24574,13 +16311,6 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24593,26 +16323,26 @@ func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamR return response, nil } -// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call -func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { +// ParseFinalizePluginUIAssetUploadResponse parses an HTTP response from a FinalizePluginUIAssetUploadWithResponse call +func ParseFinalizePluginUIAssetUploadResponse(rsp *http.Response) (*FinalizePluginUIAssetUploadResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsByTeamResponse{ + response := &FinalizePluginUIAssetUploadResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListPluginsByTeam200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -24628,12 +16358,12 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -24647,50 +16377,57 @@ func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamRespo return response, nil } -// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call -func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetByTeamResponse{ + response := &AuthRegistryRequestResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginAsset + var dest RegistryAuthToken if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24701,22 +16438,22 @@ func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPlugin return response, nil } -// ParseGetSettingsResponse parses an HTTP response from a GetSettingsWithResponse call -func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error) { +// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call +func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSettingsResponse{ + response := &ListTeamsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Settings + var dest ListTeams200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -24743,13 +16480,6 @@ func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error) } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24762,26 +16492,33 @@ func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error) return response, nil } -// ParseUpdateSettingsResponse parses an HTTP response from a UpdateSettingsWithResponse call -func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, error) { +// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call +func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSettingsResponse{ + response := &CreateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Settings + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -24797,13 +16534,6 @@ func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, e } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24823,27 +16553,20 @@ func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, e return response, nil } -// ParseGetTeamSpendResponse parses an HTTP response from a GetTeamSpendWithResponse call -func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error) { +// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call +func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamSpendResponse{ + response := &DeleteTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendSummary - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24872,6 +16595,13 @@ func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24884,20 +16614,34 @@ func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error return response, nil } -// ParseDeleteSpendingLimitResponse parses an HTTP response from a DeleteSpendingLimitWithResponse call -func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitResponse, error) { +// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call +func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSpendingLimitResponse{ + response := &GetTeamByNameResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24931,27 +16675,34 @@ func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitR return response, nil } -// ParseGetSpendingLimitResponse parses an HTTP response from a GetSpendingLimitWithResponse call -func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitResponse, error) { +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSpendingLimitResponse{ + response := &UpdateTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendingLimit + var dest Team if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -24985,26 +16736,26 @@ func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitRespons return response, nil } -// ParseCreateSpendingLimitResponse parses an HTTP response from a CreateSpendingLimitWithResponse call -func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitResponse, error) { +// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call +func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSpendingLimitResponse{ + response := &ListAddonOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SpendingLimit + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -25027,13 +16778,6 @@ func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitR } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25046,26 +16790,26 @@ func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitR return response, nil } -// ParseUpdateSpendingLimitResponse parses an HTTP response from a UpdateSpendingLimitWithResponse call -func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitResponse, error) { +// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call +func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSpendingLimitResponse{ + response := &CreateAddonOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendingLimit + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -25081,13 +16825,6 @@ func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitR } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25107,22 +16844,22 @@ func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitR return response, nil } -// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call -func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { +// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call +func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSubscriptionOrdersByTeamResponse{ + response := &GetAddonOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSubscriptionOrdersByTeam200Response + var dest AddonOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -25161,27 +16898,20 @@ func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscri return response, nil } -// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call -func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { +// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call +func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSubscriptionOrderForTeamResponse{ + response := &DeleteAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest TeamSubscriptionOrder - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25210,13 +16940,6 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25229,22 +16952,22 @@ func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSub return response, nil } -// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call -func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { +// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call +func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSubscriptionOrderByTeamResponse{ + response := &ListAddonsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest TeamSubscriptionOrder + var dest ListAddonsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -25283,33 +17006,26 @@ func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscripti return response, nil } -// ParseCreateSyncDestinationTestConnectionResponse parses an HTTP response from a CreateSyncDestinationTestConnectionWithResponse call -func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*CreateSyncDestinationTestConnectionResponse, error) { +// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call +func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncDestinationTestConnectionResponse{ + response := &DownloadAddonAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncDestinationTestConnection - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -25318,19 +17034,19 @@ func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*Crea } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: var dest TooManyRequests @@ -25351,27 +17067,34 @@ func ParseCreateSyncDestinationTestConnectionResponse(rsp *http.Response) (*Crea return response, nil } -// ParseGetSyncDestinationTestConnectionResponse parses an HTTP response from a GetSyncDestinationTestConnectionWithResponse call -func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSyncDestinationTestConnectionResponse, error) { +// ParseAIOnboardingChatResponse parses an HTTP response from a AIOnboardingChatWithResponse call +func ParseAIOnboardingChatResponse(rsp *http.Response) (*AIOnboardingChatResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncDestinationTestConnectionResponse{ + response := &AIOnboardingChatResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestinationTestConnection + var dest AIOnboardingChat200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25393,6 +17116,13 @@ func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSync } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25405,22 +17135,22 @@ func ParseGetSyncDestinationTestConnectionResponse(rsp *http.Response) (*GetSync return response, nil } -// ParseUpdateSyncTestConnectionForSyncDestinationResponse parses an HTTP response from a UpdateSyncTestConnectionForSyncDestinationWithResponse call -func ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp *http.Response) (*UpdateSyncTestConnectionForSyncDestinationResponse, error) { +// ParseAIOnboardingEndConversationResponse parses an HTTP response from a AIOnboardingEndConversationWithResponse call +func ParseAIOnboardingEndConversationResponse(rsp *http.Response) (*AIOnboardingEndConversationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncTestConnectionForSyncDestinationResponse{ + response := &AIOnboardingEndConversationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestinationTestConnection + var dest AIOnboardingEndConversation200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -25433,6 +17163,13 @@ func ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp *http.Response) } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25447,12 +17184,12 @@ func ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp *http.Response) } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON405 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -25466,34 +17203,27 @@ func ParseUpdateSyncTestConnectionForSyncDestinationResponse(rsp *http.Response) return response, nil } -// ParsePromoteSyncDestinationTestConnectionResponse parses an HTTP response from a PromoteSyncDestinationTestConnectionWithResponse call -func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*PromoteSyncDestinationTestConnectionResponse, error) { +// ParseAIOnboardingNewConversationResponse parses an HTTP response from a AIOnboardingNewConversationWithResponse call +func ParseAIOnboardingNewConversationResponse(rsp *http.Response) (*AIOnboardingNewConversationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PromoteSyncDestinationTestConnectionResponse{ + response := &AIOnboardingNewConversationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination + var dest AIOnboardingNewConversation200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncDestination - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25508,6 +17238,13 @@ func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*Pro } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25515,12 +17252,12 @@ func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*Pro } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON405 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -25534,22 +17271,22 @@ func ParsePromoteSyncDestinationTestConnectionResponse(rsp *http.Response) (*Pro return response, nil } -// ParseListSyncDestinationsResponse parses an HTTP response from a ListSyncDestinationsWithResponse call -func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestinationsResponse, error) { +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncDestinationsResponse{ + response := &ListTeamAPIKeysResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncDestinations200Response + var dest ListTeamAPIKeys200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -25581,20 +17318,34 @@ func ParseListSyncDestinationsResponse(rsp *http.Response) (*ListSyncDestination return response, nil } -// ParseDeleteSyncDestinationResponse parses an HTTP response from a DeleteSyncDestinationWithResponse call -func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinationResponse, error) { +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSyncDestinationResponse{ + response := &CreateTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest APIKey + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25602,12 +17353,12 @@ func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinat } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -25628,26 +17379,26 @@ func ParseDeleteSyncDestinationResponse(rsp *http.Response) (*DeleteSyncDestinat return response, nil } -// ParseGetSyncDestinationResponse parses an HTTP response from a GetSyncDestinationWithResponse call -func ParseGetSyncDestinationResponse(rsp *http.Response) (*GetSyncDestinationResponse, error) { +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncDestinationResponse{ + response := &DeleteTeamAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -25656,6 +17407,13 @@ func ParseGetSyncDestinationResponse(rsp *http.Response) (*GetSyncDestinationRes } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25675,33 +17433,26 @@ func ParseGetSyncDestinationResponse(rsp *http.Response) (*GetSyncDestinationRes return response, nil } -// ParseUpdateSyncDestinationResponse parses an HTTP response from a UpdateSyncDestinationWithResponse call -func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinationResponse, error) { +// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call +func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncDestinationResponse{ + response := &CreateTeamImagesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncDestination - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateTeamImages201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -25710,19 +17461,19 @@ func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinat } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -25736,26 +17487,26 @@ func ParseUpdateSyncDestinationResponse(rsp *http.Response) (*UpdateSyncDestinat return response, nil } -// ParseListSyncDestinationSyncsResponse parses an HTTP response from a ListSyncDestinationSyncsWithResponse call -func ParseListSyncDestinationSyncsResponse(rsp *http.Response) (*ListSyncDestinationSyncsResponse, error) { +// ParseDeleteTeamInvitationResponse parses an HTTP response from a DeleteTeamInvitationWithResponse call +func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncDestinationSyncsResponse{ + response := &DeleteTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncSourceSyncs200Response + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -25764,6 +17515,13 @@ func ParseListSyncDestinationSyncsResponse(rsp *http.Response) (*ListSyncDestina } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25783,47 +17541,33 @@ func ParseListSyncDestinationSyncsResponse(rsp *http.Response) (*ListSyncDestina return response, nil } -// ParseGetTestConnectionForSyncDestinationResponse parses an HTTP response from a GetTestConnectionForSyncDestinationWithResponse call -func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetTestConnectionForSyncDestinationResponse, error) { +// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call +func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionForSyncDestinationResponse{ + response := &ListTeamInvitationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + var dest ListTeamInvitations200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -25837,47 +17581,47 @@ func ParseGetTestConnectionForSyncDestinationResponse(rsp *http.Response) (*GetT return response, nil } -// ParseCreateSyncSourceTestConnectionResponse parses an HTTP response from a CreateSyncSourceTestConnectionWithResponse call -func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyncSourceTestConnectionResponse, error) { +// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call +func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncSourceTestConnectionResponse{ + response := &EmailTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncSourceTestConnection + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest Invitation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON202 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity @@ -25905,33 +17649,33 @@ func ParseCreateSyncSourceTestConnectionResponse(rsp *http.Response) (*CreateSyn return response, nil } -// ParseGetSyncSourceTestConnectionResponse parses an HTTP response from a GetSyncSourceTestConnectionWithResponse call -func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourceTestConnectionResponse, error) { +// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call +func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncSourceTestConnectionResponse{ + response := &AcceptTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSourceTestConnection + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: + var dest MembershipWithTeam if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON303 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -25940,13 +17684,6 @@ func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourc } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -25959,33 +17696,33 @@ func ParseGetSyncSourceTestConnectionResponse(rsp *http.Response) (*GetSyncSourc return response, nil } -// ParseUpdateSyncTestConnectionForSyncSourceResponse parses an HTTP response from a UpdateSyncTestConnectionForSyncSourceWithResponse call -func ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp *http.Response) (*UpdateSyncTestConnectionForSyncSourceResponse, error) { +// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call +func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncTestConnectionForSyncSourceResponse{ + response := &CancelTeamInvitationResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSourceTestConnection + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -26001,13 +17738,6 @@ func ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp *http.Response) (*Up } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26020,41 +17750,27 @@ func ParseUpdateSyncTestConnectionForSyncSourceResponse(rsp *http.Response) (*Up return response, nil } -// ParsePromoteSyncSourceTestConnectionResponse parses an HTTP response from a PromoteSyncSourceTestConnectionWithResponse call -func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteSyncSourceTestConnectionResponse, error) { +// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call +func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PromoteSyncSourceTestConnectionResponse{ + response := &ListInvoicesByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSource + var dest ListInvoicesByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncSource - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26062,19 +17778,19 @@ func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteS } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -26088,27 +17804,34 @@ func ParsePromoteSyncSourceTestConnectionResponse(rsp *http.Response) (*PromoteS return response, nil } -// ParseListSyncSourcesResponse parses an HTTP response from a ListSyncSourcesWithResponse call -func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, error) { +// ParseGetManagedDatabasesResponse parses an HTTP response from a GetManagedDatabasesWithResponse call +func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncSourcesResponse{ + response := &GetManagedDatabasesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncSources200Response + var dest GetManagedDatabases200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26116,6 +17839,13 @@ func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26135,87 +17865,68 @@ func ParseListSyncSourcesResponse(rsp *http.Response) (*ListSyncSourcesResponse, return response, nil } -// ParseDeleteSyncSourceResponse parses an HTTP response from a DeleteSyncSourceWithResponse call -func ParseDeleteSyncSourceResponse(rsp *http.Response) (*DeleteSyncSourceResponse, error) { +// ParseCreateManagedDatabaseResponse parses an HTTP response from a CreateManagedDatabaseWithResponse call +func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSyncSourceResponse{ + response := &CreateManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ManagedDatabase if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetSyncSourceResponse parses an HTTP response from a GetSyncSourceWithResponse call -func ParseGetSyncSourceResponse(rsp *http.Response) (*GetSyncSourceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSyncSourceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + response.JSON403 = &dest - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSource + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -26229,34 +17940,20 @@ func ParseGetSyncSourceResponse(rsp *http.Response) (*GetSyncSourceResponse, err return response, nil } -// ParseUpdateSyncSourceResponse parses an HTTP response from a UpdateSyncSourceWithResponse call -func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceResponse, error) { +// ParseDeleteManagedDatabaseResponse parses an HTTP response from a DeleteManagedDatabaseWithResponse call +func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncSourceResponse{ + response := &DeleteManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncSource - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26290,22 +17987,22 @@ func ParseUpdateSyncSourceResponse(rsp *http.Response) (*UpdateSyncSourceRespons return response, nil } -// ParseListSyncSourceSyncsResponse parses an HTTP response from a ListSyncSourceSyncsWithResponse call -func ParseListSyncSourceSyncsResponse(rsp *http.Response) (*ListSyncSourceSyncsResponse, error) { +// ParseGetManagedDatabaseResponse parses an HTTP response from a GetManagedDatabaseWithResponse call +func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncSourceSyncsResponse{ + response := &GetManagedDatabaseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncSourceSyncs200Response + var dest ManagedDatabase if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -26337,27 +18034,20 @@ func ParseListSyncSourceSyncsResponse(rsp *http.Response) (*ListSyncSourceSyncsR return response, nil } -// ParseGetTestConnectionForSyncSourceResponse parses an HTTP response from a GetTestConnectionForSyncSourceWithResponse call -func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestConnectionForSyncSourceResponse, error) { +// ParseRemoveTeamMembershipResponse parses an HTTP response from a RemoveTeamMembershipWithResponse call +func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershipResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionForSyncSourceResponse{ + response := &RemoveTeamMembershipResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26372,6 +18062,13 @@ func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestCo } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26379,6 +18076,13 @@ func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestCo } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26391,27 +18095,34 @@ func ParseGetTestConnectionForSyncSourceResponse(rsp *http.Response) (*GetTestCo return response, nil } -// ParseListSyncsResponse parses an HTTP response from a ListSyncsWithResponse call -func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { +// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call +func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncsResponse{ + response := &GetTeamMembershipsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncSourceSyncs200Response + var dest GetTeamMemberships200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26419,6 +18130,13 @@ func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26438,27 +18156,20 @@ func ParseListSyncsResponse(rsp *http.Response) (*ListSyncsResponse, error) { return response, nil } -// ParseCreateSyncResponse parses an HTTP response from a CreateSyncWithResponse call -func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { +// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call +func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Sync - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest + response := &DeleteTeamMembershipResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26473,6 +18184,20 @@ func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26492,27 +18217,20 @@ func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { return response, nil } -// ParseGetTestConnectionConnectorCredentialsResponse parses an HTTP response from a GetTestConnectionConnectorCredentialsWithResponse call -func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*GetTestConnectionConnectorCredentialsResponse, error) { +// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call +func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionConnectorCredentialsResponse{ + response := &DeletePluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetSyncRunConnectorCredentials200Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26527,19 +18245,19 @@ func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*Ge } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -26553,34 +18271,27 @@ func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*Ge return response, nil } -// ParseGetTestConnectionConnectorIdentityResponse parses an HTTP response from a GetTestConnectionConnectorIdentityWithResponse call -func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTestConnectionConnectorIdentityResponse, error) { +// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call +func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTestConnectionConnectorIdentityResponse{ + response := &ListPluginsByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetSyncRunConnectorIdentity200Response + var dest ListPluginsByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26588,19 +18299,19 @@ func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTe } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -26614,26 +18325,26 @@ func ParseGetTestConnectionConnectorIdentityResponse(rsp *http.Response) (*GetTe return response, nil } -// ParseDeleteSyncResponse parses an HTTP response from a DeleteSyncWithResponse call -func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { +// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call +func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSyncResponse{ + response := &DownloadPluginAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginAsset if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -26649,12 +18360,12 @@ func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -26668,40 +18379,40 @@ func ParseDeleteSyncResponse(rsp *http.Response) (*DeleteSyncResponse, error) { return response, nil } -// ParseGetSyncResponse parses an HTTP response from a GetSyncWithResponse call -func ParseGetSyncResponse(rsp *http.Response) (*GetSyncResponse, error) { +// ParseGetSettingsResponse parses an HTTP response from a GetSettingsWithResponse call +func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncResponse{ + response := &GetSettingsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Sync + var dest Settings if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound @@ -26710,6 +18421,13 @@ func ParseGetSyncResponse(rsp *http.Response) (*GetSyncResponse, error) { } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26722,33 +18440,33 @@ func ParseGetSyncResponse(rsp *http.Response) (*GetSyncResponse, error) { return response, nil } -// ParseUpdateSyncResponse parses an HTTP response from a UpdateSyncWithResponse call -func ParseUpdateSyncResponse(rsp *http.Response) (*UpdateSyncResponse, error) { +// ParseUpdateSettingsResponse parses an HTTP response from a UpdateSettingsWithResponse call +func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncResponse{ + response := &UpdateSettingsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Sync + var dest Settings if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -26783,27 +18501,34 @@ func ParseUpdateSyncResponse(rsp *http.Response) (*UpdateSyncResponse, error) { return response, nil } -// ParseListSyncRunsResponse parses an HTTP response from a ListSyncRunsWithResponse call -func ParseListSyncRunsResponse(rsp *http.Response) (*ListSyncRunsResponse, error) { +// ParseGetTeamSpendResponse parses an HTTP response from a GetTeamSpendWithResponse call +func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSyncRunsResponse{ + response := &GetTeamSpendResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ListSyncRuns200Response + var dest SpendSummary if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26811,6 +18536,13 @@ func ParseListSyncRunsResponse(rsp *http.Response) (*ListSyncRunsResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26830,47 +18562,40 @@ func ParseListSyncRunsResponse(rsp *http.Response) (*ListSyncRunsResponse, error return response, nil } -// ParseCreateSyncRunResponse parses an HTTP response from a CreateSyncRunWithResponse call -func ParseCreateSyncRunResponse(rsp *http.Response) (*CreateSyncRunResponse, error) { +// ParseDeleteSpendingLimitResponse parses an HTTP response from a DeleteSpendingLimitWithResponse call +func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncRunResponse{ + response := &DeleteSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SyncRun - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -26884,22 +18609,22 @@ func ParseCreateSyncRunResponse(rsp *http.Response) (*CreateSyncRunResponse, err return response, nil } -// ParseGetSyncRunResponse parses an HTTP response from a GetSyncRunWithResponse call -func ParseGetSyncRunResponse(rsp *http.Response) (*GetSyncRunResponse, error) { +// ParseGetSpendingLimitResponse parses an HTTP response from a GetSpendingLimitWithResponse call +func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncRunResponse{ + response := &GetSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncRunDetails + var dest SpendingLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -26912,6 +18637,13 @@ func ParseGetSyncRunResponse(rsp *http.Response) (*GetSyncRunResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -26931,33 +18663,33 @@ func ParseGetSyncRunResponse(rsp *http.Response) (*GetSyncRunResponse, error) { return response, nil } -// ParseUpdateSyncRunResponse parses an HTTP response from a UpdateSyncRunWithResponse call -func ParseUpdateSyncRunResponse(rsp *http.Response) (*UpdateSyncRunResponse, error) { +// ParseCreateSpendingLimitResponse parses an HTTP response from a CreateSpendingLimitWithResponse call +func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSyncRunResponse{ + response := &CreateSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncRun + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SpendingLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -26992,22 +18724,22 @@ func ParseUpdateSyncRunResponse(rsp *http.Response) (*UpdateSyncRunResponse, err return response, nil } -// ParseGetSyncRunConnectorCredentialsResponse parses an HTTP response from a GetSyncRunConnectorCredentialsWithResponse call -func ParseGetSyncRunConnectorCredentialsResponse(rsp *http.Response) (*GetSyncRunConnectorCredentialsResponse, error) { +// ParseUpdateSpendingLimitResponse parses an HTTP response from a UpdateSpendingLimitWithResponse call +func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncRunConnectorCredentialsResponse{ + response := &UpdateSpendingLimitResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetSyncRunConnectorCredentials200Response + var dest SpendingLimit if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -27027,19 +18759,19 @@ func ParseGetSyncRunConnectorCredentialsResponse(rsp *http.Response) (*GetSyncRu } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -27053,34 +18785,27 @@ func ParseGetSyncRunConnectorCredentialsResponse(rsp *http.Response) (*GetSyncRu return response, nil } -// ParseGetSyncRunConnectorIdentityResponse parses an HTTP response from a GetSyncRunConnectorIdentityWithResponse call -func ParseGetSyncRunConnectorIdentityResponse(rsp *http.Response) (*GetSyncRunConnectorIdentityResponse, error) { +// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call +func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncRunConnectorIdentityResponse{ + response := &ListSubscriptionOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetSyncRunConnectorIdentity200Response + var dest ListSubscriptionOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -27088,19 +18813,19 @@ func ParseGetSyncRunConnectorIdentityResponse(rsp *http.Response) (*GetSyncRunCo } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -27114,26 +18839,26 @@ func ParseGetSyncRunConnectorIdentityResponse(rsp *http.Response) (*GetSyncRunCo return response, nil } -// ParseGetSyncRunLogsResponse parses an HTTP response from a GetSyncRunLogsWithResponse call -func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, error) { +// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call +func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSyncRunLogsResponse{ + response := &CreateSubscriptionOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncRunLogs + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -27149,6 +18874,13 @@ func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, e } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -27170,34 +18902,31 @@ func ParseGetSyncRunLogsResponse(rsp *http.Response) (*GetSyncRunLogsResponse, e } response.JSON500 = &dest - case rsp.StatusCode == 200: - // Content-type (text/plain) unsupported - } return response, nil } -// ParseCreateSyncRunProgressResponse parses an HTTP response from a CreateSyncRunProgressWithResponse call -func ParseCreateSyncRunProgressResponse(rsp *http.Response) (*CreateSyncRunProgressResponse, error) { +// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call +func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSyncRunProgressResponse{ + response := &GetSubscriptionOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -27206,19 +18935,19 @@ func ParseCreateSyncRunProgressResponse(rsp *http.Response) (*CreateSyncRunProgr } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError diff --git a/models.gen.go b/models.gen.go index b906fee..b9e8799 100644 --- a/models.gen.go +++ b/models.gen.go @@ -56,14 +56,6 @@ const ( AddonTypeVisualization AddonType = "visualization" ) -// Defines values for ConnectorStatus. -const ( - ConnectorStatusAuthenticated ConnectorStatus = "authenticated" - ConnectorStatusCreated ConnectorStatus = "created" - ConnectorStatusFailed ConnectorStatus = "failed" - ConnectorStatusRevoked ConnectorStatus = "revoked" -) - // Defines values for ContentType. const ( ContentTypeImagejpeg ContentType = "image/jpeg" @@ -161,61 +153,6 @@ const ( PluginTierPaid PluginTier = "paid" ) -// Defines values for SyncDestinationMigrateMode. -const ( - SyncDestinationMigrateModeForced SyncDestinationMigrateMode = "forced" - SyncDestinationMigrateModeSafe SyncDestinationMigrateMode = "safe" -) - -// Defines values for SyncDestinationMigrateModeUpdate. -const ( - SyncDestinationMigrateModeUpdateForced SyncDestinationMigrateModeUpdate = "forced" - SyncDestinationMigrateModeUpdateSafe SyncDestinationMigrateModeUpdate = "safe" -) - -// Defines values for SyncDestinationWriteMode. -const ( - SyncDestinationWriteModeAppend SyncDestinationWriteMode = "append" - SyncDestinationWriteModeOverwrite SyncDestinationWriteMode = "overwrite" - SyncDestinationWriteModeOverwriteDeleteStale SyncDestinationWriteMode = "overwrite-delete-stale" -) - -// Defines values for SyncDestinationWriteModeUpdate. -const ( - SyncDestinationWriteModeUpdateAppend SyncDestinationWriteModeUpdate = "append" - SyncDestinationWriteModeUpdateOverwrite SyncDestinationWriteModeUpdate = "overwrite" - SyncDestinationWriteModeUpdateOverwriteDeleteStale SyncDestinationWriteModeUpdate = "overwrite-delete-stale" -) - -// Defines values for SyncLastUpdateSource. -const ( - SyncLastUpdateSourceUi SyncLastUpdateSource = "ui" - SyncLastUpdateSourceYaml SyncLastUpdateSource = "yaml" -) - -// Defines values for SyncRunStatus. -const ( - SyncRunStatusCancelled SyncRunStatus = "cancelled" - SyncRunStatusCompleted SyncRunStatus = "completed" - SyncRunStatusCreated SyncRunStatus = "created" - SyncRunStatusFailed SyncRunStatus = "failed" - SyncRunStatusStarted SyncRunStatus = "started" -) - -// Defines values for SyncRunStatusReason. -const ( - SyncRunStatusReasonError SyncRunStatusReason = "error" - SyncRunStatusReasonOomKilled SyncRunStatusReason = "oom_killed" -) - -// Defines values for SyncTestConnectionStatus. -const ( - SyncTestConnectionStatusCompleted SyncTestConnectionStatus = "completed" - SyncTestConnectionStatusCreated SyncTestConnectionStatus = "created" - SyncTestConnectionStatusFailed SyncTestConnectionStatus = "failed" - SyncTestConnectionStatusStarted SyncTestConnectionStatus = "started" -) - // Defines values for TeamPlan. const ( TeamPlanEnterprise TeamPlan = "enterprise" @@ -686,193 +623,6 @@ type CheckUserAuthStatus200Response struct { Authenticated bool `json:"authenticated"` } -// Connector Connector definition -type Connector struct { - // CreatedAt Time the connector was created - CreatedAt time.Time `json:"created_at"` - - // ID unique ID of the connector - ID openapi_types.UUID `json:"id"` - - // Name Name of the connector - Name string `json:"name"` - - // Status The status of the connector - Status ConnectorStatus `json:"status"` - - // Type Type of the connector - Type string `json:"type"` -} - -// ConnectorAuthFinishRequestAWS AWS connector authentication request, filled in after the user has authenticated through AWS -type ConnectorAuthFinishRequestAWS struct { - // ExternalID External ID in the role definition. Optional. If not provided the previously suggested external ID will be used. Empty string will remove the external ID. - ExternalID *string `json:"external_id,omitempty"` - - // RoleARN ARN of role created by the user - RoleARN string `json:"role_arn"` -} - -// ConnectorAuthFinishRequestOAuth OAuth connector authentication request, filled in after the user has authenticated through OAuth -type ConnectorAuthFinishRequestOAuth struct { - // BaseURL Base of the URL the callback url was constructed from - BaseURL interface{} `json:"base_url"` - - // Env Environment variables used in the spec. - Env *interface{} `json:"env,omitempty"` - - // ReturnURL URL the user was redirected to (including new parameter values) after the OAuth flow is complete - ReturnURL interface{} `json:"return_url"` - Spec *map[string]interface{} `json:"spec,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process -type ConnectorAuthRequestAWS struct { - // Env Environment variables used in the spec. - Env *interface{} `json:"env,omitempty"` - - // PluginKind Kind of the plugin - PluginKind interface{} `json:"plugin_kind"` - - // PluginName Name of the plugin - PluginName interface{} `json:"plugin_name"` - - // PluginTeam Team that owns the plugin we are authenticating the connector for - PluginTeam interface{} `json:"plugin_team"` - - // PluginVersion Version of the plugin - PluginVersion *interface{} `json:"plugin_version,omitempty"` - - // SkipDependentTables Whether to skip dependent tables, setting from the outer spec - SkipDependentTables *interface{} `json:"skip_dependent_tables,omitempty"` - - // SkipTables Tables to skip authentication, setting from the outer spec - SkipTables *interface{} `json:"skip_tables,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Tables Tables to authenticate, setting from the outer spec - Tables *interface{} `json:"tables,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// ConnectorAuthRequestGCP GCP connector authentication request to start the authentication process -type ConnectorAuthRequestGCP struct { - // PluginKind Kind of the plugin - PluginKind string `json:"plugin_kind"` - - // PluginName Name of the plugin - PluginName string `json:"plugin_name"` - - // PluginTeam Team that owns the plugin we are authenticating the connector for - PluginTeam string `json:"plugin_team"` -} - -// ConnectorAuthRequestOAuth OAuth connector authentication request to start the authentication process -type ConnectorAuthRequestOAuth struct { - // BaseURL Base of the URL the callback url will be constructed from - BaseURL interface{} `json:"base_url"` - - // Env Environment variables used in the spec. - Env *interface{} `json:"env,omitempty"` - - // Flavor Override default flavor - Flavor *interface{} `json:"flavor,omitempty"` - - // PluginKind Kind of the plugin - PluginKind interface{} `json:"plugin_kind"` - - // PluginName Name of the plugin - PluginName interface{} `json:"plugin_name"` - - // PluginTeam Team that owns the plugin we are authenticating the connector for - PluginTeam interface{} `json:"plugin_team"` - - // PluginVersion Version of the plugin - PluginVersion *interface{} `json:"plugin_version,omitempty"` - - // SkipDependentTables Whether to skip dependent tables, setting from the outer spec - SkipDependentTables *interface{} `json:"skip_dependent_tables,omitempty"` - - // SkipTables Tables to skip authentication, setting from the outer spec - SkipTables *interface{} `json:"skip_tables,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Tables Tables to authenticate, setting from the outer spec - Tables *interface{} `json:"tables,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// ConnectorAuthResponseAWS AWS connector authentication response to start the authentication process -type ConnectorAuthResponseAWS struct { - // RedirectURL URL to redirect the user to, to authenticate - RedirectURL string `json:"redirect_url"` - - // RoleTemplateURL URL to the role template, to present to the user - RoleTemplateURL string `json:"role_template_url"` - - // SuggestedExternalID External ID suggested to enter into the role definition - SuggestedExternalID string `json:"suggested_external_id"` - - // SuggestedPolicyARNs List of AWS policy ARNs suggested to grant inside the role definition - SuggestedPolicyARNs []string `json:"suggested_policy_arns"` -} - -// ConnectorAuthResponseGCP GCP connector authentication response to start the authentication process -type ConnectorAuthResponseGCP struct { - // ServiceAccount CloudQuery GCP Service Account to grant access to - ServiceAccount string `json:"service_account"` -} - -// ConnectorAuthResponseOAuth OAuth connector authentication response to start the authentication process -type ConnectorAuthResponseOAuth struct { - // RedirectURL URL to redirect the user to, to authenticate - RedirectURL string `json:"redirect_url"` -} - -// ConnectorCreate Connector creation request -type ConnectorCreate struct { - // Name Name of the connector - Name string `json:"name"` - - // Type Type of the connector - Type string `json:"type"` -} - -// ConnectorCredentialsResponseAWS AWS connector credentials response -type ConnectorCredentialsResponseAWS struct { - AccessKeyId string `json:"access_key_id"` - CanExpire bool `json:"can_expire"` - Expires time.Time `json:"expires"` - SecretAccessKey string `json:"secret_access_key"` - SessionToken string `json:"session_token"` - Source string `json:"source"` -} - -// ConnectorCredentialsResponseOAuth OAuth connector credentials response -type ConnectorCredentialsResponseOAuth struct { - AccessToken string `json:"access_token"` - Expires *time.Time `json:"expires,omitempty"` -} - -// ConnectorID ID of the Connector -type ConnectorID = openapi_types.UUID - -// ConnectorIdentityResponseAWS AWS connector identity response -type ConnectorIdentityResponseAWS struct { - // RoleARN Role ARN to assume - RoleARN string `json:"role_arn"` -} - -// ConnectorStatus The status of the connector -type ConnectorStatus string - -// ConnectorUpdate defines model for ConnectorUpdate. -type ConnectorUpdate struct { - // Name Name of the connector - Name *string `json:"name,omitempty"` -} - // ContentType The HTTP Content-Type of the image or asset type ContentType string @@ -939,30 +689,6 @@ type CreatePluginVersionRequest struct { SupportedTargets []string `json:"supported_targets"` } -// CreateSyncRunProgressRequest defines model for CreateSyncRunProgress_request. -type CreateSyncRunProgressRequest struct { - // Errors Number of errors encountered so far - Errors int64 `json:"errors"` - - // Rows Number of rows synced so far - Rows int64 `json:"rows"` - - // ShardNum The shard number that this progress update is for - ShardNum *int32 `json:"shard_num,omitempty"` - - // ShardTotal The total number of shards for this sync run - ShardTotal *int32 `json:"shard_total,omitempty"` - - // Status The status of the sync run - Status *SyncRunStatus `json:"status,omitempty"` - - // TableProgress Table-specific progress information for a sync run - TableProgress *SyncRunTableProgress `json:"table_progress,omitempty"` - - // Warnings Number of warnings encountered so far - Warnings int64 `json:"warnings"` -} - // CreateTeamAPIKeyRequest defines model for CreateTeamAPIKey_request. type CreateTeamAPIKeyRequest struct { ExpiresAt time.Time `json:"expires_at"` @@ -1025,9 +751,6 @@ type DeterminePlatformTenantByEmail200Response struct { Items []TenantUser `json:"items,omitempty"` } -// DisplayName A human-readable display name -type DisplayName = string - // DockerError Error Returned from the Docker Authorization Handler to the Docker Registry type DockerError struct { Details string `json:"details"` @@ -1075,21 +798,6 @@ type FunctionCallOutput struct { AdditionalProperties map[string]interface{} `json:"-"` } -// GetConnectorAuthStatusAWS200Response defines model for GetConnectorAuthStatusAWS_200_response. -type GetConnectorAuthStatusAWS200Response struct { - // ExternalID External ID used for the role - ExternalID *string `json:"external_id,omitempty"` - - // RoleARN ARN of role created by the user - RoleARN *string `json:"role_arn,omitempty"` -} - -// GetConnectorAuthStatusGCP200Response defines model for GetConnectorAuthStatusGCP_200_response. -type GetConnectorAuthStatusGCP200Response struct { - // ServiceAccount CloudQuery GCP Service Account to grant access to - ServiceAccount *string `json:"service_account,omitempty"` -} - // GetCurrentUserMemberships200Response defines model for GetCurrentUserMemberships_200_response. type GetCurrentUserMemberships200Response struct { Items []MembershipWithTeam `json:"items"` @@ -1102,21 +810,6 @@ type GetManagedDatabases200Response struct { Metadata ListMetadata `json:"metadata"` } -// GetSyncRunConnectorCredentials200Response defines model for GetSyncRunConnectorCredentials_200_response. -type GetSyncRunConnectorCredentials200Response struct { - // Aws AWS connector credentials response - Aws *ConnectorCredentialsResponseAWS `json:"aws,omitempty"` - - // Oauth OAuth connector credentials response - Oauth *ConnectorCredentialsResponseOAuth `json:"oauth,omitempty"` -} - -// GetSyncRunConnectorIdentity200Response defines model for GetSyncRunConnectorIdentity_200_response. -type GetSyncRunConnectorIdentity200Response struct { - // Aws AWS connector identity response - Aws *ConnectorIdentityResponseAWS `json:"aws,omitempty"` -} - // GetTeamMemberships200Response defines model for GetTeamMemberships_200_response. type GetTeamMemberships200Response struct { Items []MembershipWithUser `json:"items"` @@ -1235,12 +928,6 @@ type ListAddons200Response struct { Metadata ListMetadata `json:"metadata"` } -// ListConnectors200Response defines model for ListConnectors_200_response. -type ListConnectors200Response struct { - Items []Connector `json:"items"` - Metadata ListMetadata `json:"metadata"` -} - // ListCurrentUserInvitations200Response defines model for ListCurrentUserInvitations_200_response. type ListCurrentUserInvitations200Response struct { Items []InvitationWithToken `json:"items"` @@ -1371,30 +1058,6 @@ type ListSubscriptionOrdersByTeam200Response struct { Metadata ListMetadata `json:"metadata"` } -// ListSyncDestinations200Response defines model for ListSyncDestinations_200_response. -type ListSyncDestinations200Response struct { - Items []SyncDestination `json:"items"` - Metadata ListMetadata `json:"metadata"` -} - -// ListSyncRuns200Response defines model for ListSyncRuns_200_response. -type ListSyncRuns200Response struct { - Items []SyncRun `json:"items"` - Metadata ListMetadata `json:"metadata"` -} - -// ListSyncSourceSyncs200Response defines model for ListSyncSourceSyncs_200_response. -type ListSyncSourceSyncs200Response struct { - Items []Sync `json:"items"` - Metadata ListMetadata `json:"metadata"` -} - -// ListSyncSources200Response defines model for ListSyncSources_200_response. -type ListSyncSources200Response struct { - Items []SyncSource `json:"items"` - Metadata ListMetadata `json:"metadata"` -} - // ListTeamAPIKeys200Response defines model for ListTeamAPIKeys_200_response. type ListTeamAPIKeys200Response struct { Items []APIKey `json:"items"` @@ -2072,42 +1735,6 @@ type PriceCategorySpend struct { Total string `json:"total"` } -// PromoteSyncDestinationTestConnection Sync Destination Definition -type PromoteSyncDestinationTestConnection struct { - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` - - // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` - - // OverwriteDestination Set this to allow overwriting an existing sync destination. Defaults to true to preserve compatibility. - OverwriteDestination *bool `json:"overwrite_destination,omitempty"` - - // WriteMode Write mode for the destination - WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` -} - -// PromoteSyncSourceTestConnection Sync Source Definition -type PromoteSyncSourceTestConnection struct { - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` - - // OverwriteSource Set this to allow overwriting an existing sync source. Defaults to true to preserve compatibility. - OverwriteSource *bool `json:"overwrite_source,omitempty"` - - // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables *[]string `json:"skip_tables,omitempty"` - - // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. - Tables []string `json:"tables"` -} - // RegisterUser201Response defines model for RegisterUser_201_response. type RegisterUser201Response struct { // CustomToken Token to exchange for ID token @@ -2267,668 +1894,115 @@ type SpendingLimitUpdate struct { USD int `json:"usd"` } -// Sync Managed Sync definition -type Sync struct { - // CPU CPU quota for the sync - CPU string `json:"cpu"` - - // CreatedAt Time when the sync was created - CreatedAt time.Time `json:"created_at"` - CreatedBy *string `json:"created_by,omitempty"` - - // Destinations List of destinations for the sync - Destinations []string `json:"destinations"` +// Team CloudQuery Team +type Team struct { + CreatedAt *time.Time `json:"created_at,omitempty"` - // Disabled Whether the sync is disabled - Disabled bool `json:"disabled"` + // DisplayName The team's display name + DisplayName string `json:"display_name"` + Internal bool `json:"internal"` + IsTrialActive bool `json:"is_trial_active"` - // DisplayName A human-readable display name - DisplayName DisplayName `json:"display_name"` + // Name The unique name for the team. + Name TeamName `json:"name"` - // Incremental Managed Sync Incremental Options definition - Incremental *SyncIncremental `json:"incremental,omitempty"` + // Plan The plan the team is on (trial is deprecated) + Plan TeamPlan `json:"plan"` + PlanEndTime *time.Time `json:"plan_end_time,omitempty"` + TrialEndTime *time.Time `json:"trial_end_time,omitempty"` +} - // Memory Memory quota for the sync - Memory string `json:"memory"` +// TeamImage defines model for TeamImage. +type TeamImage struct { + // Checksum SHA1 checksum of image + Checksum string `json:"checksum"` - // Name Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _. + // Name Name of image Name string `json:"name"` - // Schedule Cron schedule for the sync - Schedule string `json:"schedule"` + // RequiredHeaders Required HTTP headers to include for the upload + RequiredHeaders map[string]interface{} `json:"required_headers"` - // Source Unique name of the source - Source string `json:"source"` + // UploadURL URL to upload image + UploadURL *string `json:"upload_url,omitempty"` - // UpdatedAt Time when the sync was updated - UpdatedAt time.Time `json:"updated_at"` + // URL URL to download image + URL string `json:"url"` } -// SyncCreate Managed Sync definition -type SyncCreate struct { - // CPU CPU quota for the sync - CPU *string `json:"cpu,omitempty"` - Destinations []string `json:"destinations"` - - // Disabled Whether the sync is disabled - Disabled *bool `json:"disabled,omitempty"` - - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // Incremental Managed Sync Incremental Options definition - Incremental *SyncIncremental `json:"incremental,omitempty"` +// TeamImageCreate defines model for TeamImageCreate. +type TeamImageCreate struct { + // Checksum SHA1 checksum of image + Checksum string `json:"checksum"` - // Memory Memory quota for the sync - Memory *string `json:"memory,omitempty"` + // ContentType The HTTP Content-Type of the image or asset + ContentType ContentType `json:"content_type"` - // Name Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _. + // Name Name of image Name string `json:"name"` - - // Schedule Cron schedule for the sync - Schedule *string `json:"schedule,omitempty"` - - // Source Unique name of the source - Source string `json:"source"` } -// SyncDestination defines model for SyncDestination. -type SyncDestination struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // CreatedAt Time when the source was created - CreatedAt time.Time `json:"created_at"` - - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // Draft If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID. - Draft bool `json:"draft"` +// TeamName The unique name for the team. +type TeamName = string - // Env Environment variables for the plugin. - Env []SyncEnv `json:"env"` +// TeamPlan The plan the team is on (trial is deprecated) +type TeamPlan string - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` +// TeamSubscriptionOrder Team subscription order +type TeamSubscriptionOrder struct { + CompletedAt *time.Time `json:"completed_at,omitempty"` - // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` + // CompletionURL Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected. + CompletionURL *string `json:"completion_url,omitempty"` + CreatedAt time.Time `json:"created_at"` - // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` + // TeamSubscriptionOrderID ID of the team subscription order + TeamSubscriptionOrderID TeamSubscriptionOrderID `json:"id"` - // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - Spec *map[string]interface{} `json:"spec,omitempty"` + // Plan The plan the team is on (trial is deprecated) + Plan TeamPlan `json:"plan"` + Status TeamSubscriptionOrderStatus `json:"status"` - // UpdatedAt Time when the source was last updated + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` UpdatedAt time.Time `json:"updated_at"` - - // Version Version of the plugin - Version string `json:"version"` - - // WriteMode Write mode for the destination - WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` } -// SyncDestinationCreate Sync Destination Definition -type SyncDestinationCreate struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnvCreate `json:"env,omitempty"` - - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` - - // Name Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` - - // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - Spec *map[string]interface{} `json:"spec,omitempty"` +// TeamSubscriptionOrderCreate Create team subscription order +type TeamSubscriptionOrderCreate struct { + // CancelUrl URL to redirect to after order cancellation + CancelUrl string `json:"cancel_url"` - // Version Version of the plugin - Version string `json:"version"` + // Plan The plan the team is on (trial is deprecated) + Plan TeamPlan `json:"plan"` - // WriteMode Write mode for the destination - WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` + // SuccessUrl URL to redirect to after successful order completion + SuccessUrl string `json:"success_url"` } -// SyncDestinationMigrateMode Migrate mode for the destination -type SyncDestinationMigrateMode string - -// SyncDestinationMigrateModeUpdate Migrate mode for the destination, for updating -type SyncDestinationMigrateModeUpdate string - -// SyncDestinationTestConnection defines model for SyncDestinationTestConnection. -type SyncDestinationTestConnection struct { - // CompletedAt Time the test connection was completed - CompletedAt *time.Time `json:"completed_at,omitempty"` - - // CreatedAt Time the test connection was created - CreatedAt time.Time `json:"created_at"` - - // FailureCode Code for failure - FailureCode *string `json:"failure_code,omitempty"` - - // FailureReason Reason for failure - FailureReason *string `json:"failure_reason,omitempty"` - - // ID unique ID of the test connection - ID ID `json:"id"` +// TeamSubscriptionOrderID ID of the team subscription order +type TeamSubscriptionOrderID = openapi_types.UUID - // PluginPath Plugin path in CloudQuery registry - PluginPath *SyncPluginPath `json:"plugin_path,omitempty"` +// TeamSubscriptionOrderStatus defines model for TeamSubscriptionOrderStatus. +type TeamSubscriptionOrderStatus string - // PluginVersion The version in semantic version format. - PluginVersion *VersionName `json:"plugin_version,omitempty"` +// TenantUser Tenant information of a platform user +type TenantUser struct { + // Provider Login provider of the tenant + Provider *string `json:"provider,omitempty"` - // Status The status of the sync run - Status SyncTestConnectionStatus `json:"status"` + // TenantURL URL of the tenant + TenantURL string `json:"tenant_url"` } -// SyncDestinationTestConnectionCreate defines model for SyncDestinationTestConnectionCreate. -type SyncDestinationTestConnectionCreate struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // DestinationName Name of an existing destination - DestinationName *string `json:"destination_name,omitempty"` - - // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnvCreate `json:"env,omitempty"` - - // MigrateMode Migrate mode for the destination - MigrateMode *SyncDestinationMigrateMode `json:"migrate_mode,omitempty"` - - // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Version Version of the plugin - Version string `json:"version"` +// UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. +type UpdateCurrentUserRequest struct { + // Name The unique name for the user. + Name *UserName `json:"name,omitempty"` - // WriteMode Write mode for the destination - WriteMode *SyncDestinationWriteMode `json:"write_mode,omitempty"` -} - -// SyncDestinationTestConnectionID ID of the Sync Destination Test Connection -type SyncDestinationTestConnectionID = openapi_types.UUID - -// SyncDestinationUpdate Sync Destination Update Definition -type SyncDestinationUpdate struct { - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // MigrateMode Migrate mode for the destination, for updating - MigrateMode *SyncDestinationMigrateModeUpdate `json:"migrate_mode,omitempty"` - - // WriteMode Write mode for the destination, for updating - WriteMode *SyncDestinationWriteModeUpdate `json:"write_mode,omitempty"` -} - -// SyncDestinationWriteMode Write mode for the destination -type SyncDestinationWriteMode string - -// SyncDestinationWriteModeUpdate Write mode for the destination, for updating -type SyncDestinationWriteModeUpdate string - -// SyncEnv Environment variable. Environment variables are assumed to be secret. -type SyncEnv struct { - // Name Name of the environment variable - Name string `json:"name"` -} - -// SyncEnvCreate Environment variable. Environment variables are assumed to be secret. -type SyncEnvCreate struct { - // Name Name of the environment variable - Name string `json:"name"` - - // Value Value of the environment variable - Value *string `json:"value,omitempty"` -} - -// SyncIncremental Managed Sync Incremental Options definition -type SyncIncremental struct { - // Destination Name of the destination in which to store incremental sync data - Destination string `json:"destination"` - - // Table Name of the table in which to store incremental sync data - Table string `json:"table"` -} - -// SyncIncrementalUpdate Managed Sync Incremental Options Update definition -type SyncIncrementalUpdate struct { - // Destination Name of the destination in which to store incremental sync data - Destination *string `json:"destination,omitempty"` - - // Table Name of the table in which to store incremental sync data - Table *string `json:"table,omitempty"` -} - -// SyncLastUpdateSource How was the source or destination been created or updated last -type SyncLastUpdateSource string - -// SyncPluginPath Plugin path in CloudQuery registry -type SyncPluginPath = string - -// SyncRun Managed Sync Run definition -type SyncRun struct { - // CompletedAt Time the sync run was completed - CompletedAt *time.Time `json:"completed_at,omitempty"` - - // CreatedAt Time the sync run was created - CreatedAt time.Time `json:"created_at"` - - // Errors Number of errors encountered during the sync - Errors int64 `json:"errors"` - - // ID unique ID of the run - ID openapi_types.UUID `json:"id"` - - // Status The status of the sync run - Status SyncRunStatus `json:"status"` - - // StatusReason The reason for the status - StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` - - // SyncName Name of the sync - SyncName string `json:"sync_name"` - - // TotalRows Total number of rows in the sync - TotalRows int64 `json:"total_rows"` - - // Warnings Number of warnings encountered during the sync - Warnings int64 `json:"warnings"` -} - -// SyncRunDetails defines model for SyncRunDetails. -type SyncRunDetails struct { - // CompletedAt Time the sync run was completed - CompletedAt *time.Time `json:"completed_at,omitempty"` - - // CPUSeconds Total CPU seconds utilized during this sync run - CPUSeconds *float64 `json:"cpu_seconds,omitempty"` - - // CreatedAt Time the sync run was created - CreatedAt time.Time `json:"created_at"` - - // Errors Number of errors encountered during the sync - Errors int64 `json:"errors"` - - // ID unique ID of the run - ID openapi_types.UUID `json:"id"` - - // MemoryByteSeconds Total memory byte seconds utilized during this sync run - MemoryByteSeconds *float64 `json:"memory_byte_seconds,omitempty"` - - // NetworkEgressBytes Total network egress bytes during this sync run - NetworkEgressBytes *float64 `json:"network_egress_bytes,omitempty"` - - // Status The status of the sync run - Status SyncRunStatus `json:"status"` - - // StatusReason The reason for the status - StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` - - // SyncName Name of the sync - SyncName string `json:"sync_name"` - - // TotalRows Total number of rows in the sync - TotalRows int64 `json:"total_rows"` - - // Warnings Number of warnings encountered during the sync - Warnings int64 `json:"warnings"` -} - -// SyncRunID ID of the SyncRun -type SyncRunID = openapi_types.UUID - -// SyncRunStatus The status of the sync run -type SyncRunStatus string - -// SyncRunStatusReason The reason for the status -type SyncRunStatusReason string - -// SyncRunTableProgress Table-specific progress information for a sync run -type SyncRunTableProgress map[string]SyncRunTableProgressValue - -// SyncRunTableProgressValue defines model for SyncRunTableProgress_value. -type SyncRunTableProgressValue struct { - // Errors Number of errors for this table - Errors int64 `json:"errors"` - - // Rows Number of rows processed for this table - Rows int64 `json:"rows"` -} - -// SyncSource defines model for SyncSource. -type SyncSource struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // CreatedAt Time when the source was created - CreatedAt time.Time `json:"created_at"` - - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // Draft If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID. - Draft bool `json:"draft"` - - // Env Environment variables for the plugin. - Env []SyncEnv `json:"env"` - - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` - - // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - - // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables *[]string `json:"skip_tables,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. - Tables []string `json:"tables"` - - // UpdatedAt Time when the source was last updated - UpdatedAt time.Time `json:"updated_at"` - - // Version Version of the plugin - Version string `json:"version"` -} - -// SyncSourceCreate Sync Source Definition -type SyncSourceCreate struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnvCreate `json:"env,omitempty"` - - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // Name Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _. - Name string `json:"name"` - - // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - - // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables *[]string `json:"skip_tables,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. - Tables []string `json:"tables"` - - // Version Version of the plugin - Version string `json:"version"` -} - -// SyncSourceTestConnection defines model for SyncSourceTestConnection. -type SyncSourceTestConnection struct { - // CompletedAt Time the test connection was completed - CompletedAt *time.Time `json:"completed_at,omitempty"` - - // CreatedAt Time the test connection was created - CreatedAt time.Time `json:"created_at"` - - // FailureCode Code for failure - FailureCode *string `json:"failure_code,omitempty"` - - // FailureReason Reason for failure - FailureReason *string `json:"failure_reason,omitempty"` - - // ID unique ID of the test connection - ID ID `json:"id"` - - // PluginPath Plugin path in CloudQuery registry - PluginPath *SyncPluginPath `json:"plugin_path,omitempty"` - - // PluginVersion The version in semantic version format. - PluginVersion *VersionName `json:"plugin_version,omitempty"` - - // Status The status of the sync run - Status SyncTestConnectionStatus `json:"status"` -} - -// SyncSourceTestConnectionCreate defines model for SyncSourceTestConnectionCreate. -type SyncSourceTestConnectionCreate struct { - // ConnectorID ID of the Connector - ConnectorID *ConnectorID `json:"connector_id,omitempty"` - - // Env Environment variables for the plugin. All environment variables will be stored as secrets. - Env *[]SyncEnvCreate `json:"env,omitempty"` - - // Path Plugin path in CloudQuery registry - Path SyncPluginPath `json:"path"` - - // SourceName Name of an existing source - SourceName *string `json:"source_name,omitempty"` - Spec *map[string]interface{} `json:"spec,omitempty"` - - // Version Version of the plugin - Version string `json:"version"` -} - -// SyncSourceTestConnectionID ID of the Sync Source Test Connection -type SyncSourceTestConnectionID = openapi_types.UUID - -// SyncSourceUpdate Sync Source Update Definition -type SyncSourceUpdate struct { - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // LastUpdateSource How was the source or destination been created or updated last - LastUpdateSource *SyncLastUpdateSource `json:"last_update_source,omitempty"` - - // SkipTables Tables matched by `tables` that should be skipped. Wildcards are supported. - SkipTables *[]string `json:"skip_tables,omitempty"` - - // Tables Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified. - Tables *[]string `json:"tables,omitempty"` -} - -// SyncTestConnection defines model for SyncTestConnection. -type SyncTestConnection struct { - // CompletedAt Time the test connection was completed - CompletedAt *time.Time `json:"completed_at,omitempty"` - - // CreatedAt Time the test connection was created - CreatedAt time.Time `json:"created_at"` - - // FailureCode Code for failure - FailureCode *string `json:"failure_code,omitempty"` - - // FailureReason Reason for failure - FailureReason *string `json:"failure_reason,omitempty"` - - // ID unique ID of the test connection - ID ID `json:"id"` - - // PluginKind The kind of plugin, ie. source or destination. - PluginKind *PluginKind `json:"plugin_kind,omitempty"` - - // PluginPath Plugin path in CloudQuery registry - PluginPath *SyncPluginPath `json:"plugin_path,omitempty"` - - // PluginVersion The version in semantic version format. - PluginVersion *VersionName `json:"plugin_version,omitempty"` - - // Status The status of the sync run - Status SyncTestConnectionStatus `json:"status"` -} - -// ID unique ID of the test connection -type ID = openapi_types.UUID - -// SyncTestConnectionStatus The status of the sync run -type SyncTestConnectionStatus string - -// SyncUpdate Managed Sync definition -type SyncUpdate struct { - // CPU CPU quota for the sync - CPU *string `json:"cpu,omitempty"` - Destinations *[]string `json:"destinations,omitempty"` - - // Disabled Whether the sync is disabled - Disabled *bool `json:"disabled,omitempty"` - - // DisplayName A human-readable display name - DisplayName *DisplayName `json:"display_name,omitempty"` - - // Env Environment variables for the sync - Env *[]SyncEnv `json:"env,omitempty"` - - // Incremental Managed Sync Incremental Options Update definition - Incremental *SyncIncrementalUpdate `json:"incremental,omitempty"` - - // Memory Memory quota for the sync - Memory *string `json:"memory,omitempty"` - - // Schedule Cron schedule for the sync - Schedule *string `json:"schedule,omitempty"` - - // Source Unique name of the source - Source *string `json:"source,omitempty"` -} - -// SyncRunLogs defines model for Sync_Run_Logs. -type SyncRunLogs struct { - // Location The location to download the sync run logs from - Location interface{} `json:"location"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// Team CloudQuery Team -type Team struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - - // DisplayName The team's display name - DisplayName string `json:"display_name"` - Internal bool `json:"internal"` - IsTrialActive bool `json:"is_trial_active"` - - // Name The unique name for the team. - Name TeamName `json:"name"` - - // Plan The plan the team is on (trial is deprecated) - Plan TeamPlan `json:"plan"` - PlanEndTime *time.Time `json:"plan_end_time,omitempty"` - TrialEndTime *time.Time `json:"trial_end_time,omitempty"` -} - -// TeamImage defines model for TeamImage. -type TeamImage struct { - // Checksum SHA1 checksum of image - Checksum string `json:"checksum"` - - // Name Name of image - Name string `json:"name"` - - // RequiredHeaders Required HTTP headers to include for the upload - RequiredHeaders map[string]interface{} `json:"required_headers"` - - // UploadURL URL to upload image - UploadURL *string `json:"upload_url,omitempty"` - - // URL URL to download image - URL string `json:"url"` -} - -// TeamImageCreate defines model for TeamImageCreate. -type TeamImageCreate struct { - // Checksum SHA1 checksum of image - Checksum string `json:"checksum"` - - // ContentType The HTTP Content-Type of the image or asset - ContentType ContentType `json:"content_type"` - - // Name Name of image - Name string `json:"name"` -} - -// TeamName The unique name for the team. -type TeamName = string - -// TeamPlan The plan the team is on (trial is deprecated) -type TeamPlan string - -// TeamSubscriptionOrder Team subscription order -type TeamSubscriptionOrder struct { - CompletedAt *time.Time `json:"completed_at,omitempty"` - - // CompletionURL Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected. - CompletionURL *string `json:"completion_url,omitempty"` - CreatedAt time.Time `json:"created_at"` - - // TeamSubscriptionOrderID ID of the team subscription order - TeamSubscriptionOrderID TeamSubscriptionOrderID `json:"id"` - - // Plan The plan the team is on (trial is deprecated) - Plan TeamPlan `json:"plan"` - Status TeamSubscriptionOrderStatus `json:"status"` - - // TeamName The unique name for the team. - TeamName TeamName `json:"team_name"` - UpdatedAt time.Time `json:"updated_at"` -} - -// TeamSubscriptionOrderCreate Create team subscription order -type TeamSubscriptionOrderCreate struct { - // CancelUrl URL to redirect to after order cancellation - CancelUrl string `json:"cancel_url"` - - // Plan The plan the team is on (trial is deprecated) - Plan TeamPlan `json:"plan"` - - // SuccessUrl URL to redirect to after successful order completion - SuccessUrl string `json:"success_url"` -} - -// TeamSubscriptionOrderID ID of the team subscription order -type TeamSubscriptionOrderID = openapi_types.UUID - -// TeamSubscriptionOrderStatus defines model for TeamSubscriptionOrderStatus. -type TeamSubscriptionOrderStatus string - -// TenantUser Tenant information of a platform user -type TenantUser struct { - // Provider Login provider of the tenant - Provider *string `json:"provider,omitempty"` - - // TenantURL URL of the tenant - TenantURL string `json:"tenant_url"` -} - -// UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. -type UpdateCurrentUserRequest struct { - // Name The unique name for the user. - Name *UserName `json:"name,omitempty"` - - // Onboarded Whether the user has completed onboarding - Onboarded *UserOnboarded `json:"onboarded,omitempty"` - AdditionalProperties map[string]interface{} `json:"-"` + // Onboarded Whether the user has completed onboarding + Onboarded *UserOnboarded `json:"onboarded,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } // UpdateCustomerRequest defines model for UpdateCustomer_request. @@ -2942,27 +2016,6 @@ type UpdateCustomerRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } -// UpdateSyncRunRequest defines model for UpdateSyncRun_request. -type UpdateSyncRunRequest struct { - // Status The status of the sync run - Status *SyncRunStatus `json:"status,omitempty"` - - // StatusReason The reason for the status - StatusReason *SyncRunStatusReason `json:"status_reason,omitempty"` -} - -// UpdateSyncTestConnectionForSyncSourceRequest defines model for UpdateSyncTestConnectionForSyncSource_request. -type UpdateSyncTestConnectionForSyncSourceRequest struct { - // FailureCode Code for failure - FailureCode *string `json:"failure_code,omitempty"` - - // FailureReason Reason for failure - FailureReason *string `json:"failure_reason,omitempty"` - - // Status The status of the sync run - Status SyncTestConnectionStatus `json:"status"` -} - // UpdateTeamRequest defines model for UpdateTeam_request. type UpdateTeamRequest struct { // DisplayName The team's display name @@ -3205,23 +2258,8 @@ type PluginSortBy string // PluginTeam The unique name for the team. type PluginTeam = TeamName -// SyncDestinationName Unique name of the sync destination -type SyncDestinationName = string - -// SyncName Unique name of the sync -type SyncName = string - -// SyncRunId ID of the SyncRun -type SyncRunId = SyncRunID - -// SyncSourceName Unique name of the sync source -type SyncSourceName = string - -// SyncTestConnectionId unique ID of the test connection -type SyncTestConnectionId = ID - -// TargetName defines model for target_name. -type TargetName = string +// TargetName defines model for target_name. +type TargetName = string // VersionSortBy defines model for version_sort_by. type VersionSortBy string @@ -3434,21 +2472,6 @@ type ListTeamAPIKeysParams struct { Page *Page `form:"page,omitempty" json:"page,omitempty"` } -// ListConnectorsParams defines parameters for ListConnectors. -type ListConnectorsParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` - - // FilterType Filter connectors by a given type. - FilterType *string `form:"filter_type,omitempty" json:"filter_type,omitempty"` - - // FilterPlugin Filter connectors by a given plugin reference. Mutually exclusive with `type`. - FilterPlugin *string `form:"filter_plugin,omitempty" json:"filter_plugin,omitempty"` -} - // ListTeamInvitationsParams defines parameters for ListTeamInvitations. type ListTeamInvitationsParams struct { // Page Page number of the results to fetch @@ -3520,65 +2543,6 @@ type ListSubscriptionOrdersByTeamParams struct { PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` } -// ListSyncDestinationsParams defines parameters for ListSyncDestinations. -type ListSyncDestinationsParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` -} - -// ListSyncDestinationSyncsParams defines parameters for ListSyncDestinationSyncs. -type ListSyncDestinationSyncsParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` -} - -// ListSyncSourcesParams defines parameters for ListSyncSources. -type ListSyncSourcesParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` -} - -// ListSyncSourceSyncsParams defines parameters for ListSyncSourceSyncs. -type ListSyncSourceSyncsParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` -} - -// ListSyncsParams defines parameters for ListSyncs. -type ListSyncsParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` -} - -// ListSyncRunsParams defines parameters for ListSyncRuns. -type ListSyncRunsParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` - - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` -} - -// GetSyncRunLogsParams defines parameters for GetSyncRunLogs. -type GetSyncRunLogsParams struct { - Accept *string `json:"Accept,omitempty"` -} - // ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. type ListTeamPluginUsageParams struct { // Page Page number of the results to fetch @@ -3738,27 +2702,6 @@ type AIOnboardingNewConversationJSONRequestBody = AIOnboardingNewConversationReq // CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. type CreateTeamAPIKeyJSONRequestBody = CreateTeamAPIKeyRequest -// CreateConnectorJSONRequestBody defines body for CreateConnector for application/json ContentType. -type CreateConnectorJSONRequestBody = ConnectorCreate - -// UpdateConnectorJSONRequestBody defines body for UpdateConnector for application/json ContentType. -type UpdateConnectorJSONRequestBody = ConnectorUpdate - -// AuthenticateConnectorFinishAWSJSONRequestBody defines body for AuthenticateConnectorFinishAWS for application/json ContentType. -type AuthenticateConnectorFinishAWSJSONRequestBody = ConnectorAuthFinishRequestAWS - -// AuthenticateConnectorAWSJSONRequestBody defines body for AuthenticateConnectorAWS for application/json ContentType. -type AuthenticateConnectorAWSJSONRequestBody = ConnectorAuthRequestAWS - -// AuthenticateConnectorGCPJSONRequestBody defines body for AuthenticateConnectorGCP for application/json ContentType. -type AuthenticateConnectorGCPJSONRequestBody = ConnectorAuthRequestGCP - -// AuthenticateConnectorFinishOAuthJSONRequestBody defines body for AuthenticateConnectorFinishOAuth for application/json ContentType. -type AuthenticateConnectorFinishOAuthJSONRequestBody = ConnectorAuthFinishRequestOAuth - -// AuthenticateConnectorOAuthJSONRequestBody defines body for AuthenticateConnectorOAuth for application/json ContentType. -type AuthenticateConnectorOAuthJSONRequestBody = ConnectorAuthRequestOAuth - // CreateTeamImagesJSONRequestBody defines body for CreateTeamImages for application/json ContentType. type CreateTeamImagesJSONRequestBody = CreateTeamImagesRequest @@ -3789,42 +2732,6 @@ type UpdateSpendingLimitJSONRequestBody = SpendingLimitUpdate // CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate -// CreateSyncDestinationTestConnectionJSONRequestBody defines body for CreateSyncDestinationTestConnection for application/json ContentType. -type CreateSyncDestinationTestConnectionJSONRequestBody = SyncDestinationTestConnectionCreate - -// UpdateSyncTestConnectionForSyncDestinationJSONRequestBody defines body for UpdateSyncTestConnectionForSyncDestination for application/json ContentType. -type UpdateSyncTestConnectionForSyncDestinationJSONRequestBody = UpdateSyncTestConnectionForSyncSourceRequest - -// PromoteSyncDestinationTestConnectionJSONRequestBody defines body for PromoteSyncDestinationTestConnection for application/json ContentType. -type PromoteSyncDestinationTestConnectionJSONRequestBody = PromoteSyncDestinationTestConnection - -// UpdateSyncDestinationJSONRequestBody defines body for UpdateSyncDestination for application/json ContentType. -type UpdateSyncDestinationJSONRequestBody = SyncDestinationUpdate - -// CreateSyncSourceTestConnectionJSONRequestBody defines body for CreateSyncSourceTestConnection for application/json ContentType. -type CreateSyncSourceTestConnectionJSONRequestBody = SyncSourceTestConnectionCreate - -// UpdateSyncTestConnectionForSyncSourceJSONRequestBody defines body for UpdateSyncTestConnectionForSyncSource for application/json ContentType. -type UpdateSyncTestConnectionForSyncSourceJSONRequestBody = UpdateSyncTestConnectionForSyncSourceRequest - -// PromoteSyncSourceTestConnectionJSONRequestBody defines body for PromoteSyncSourceTestConnection for application/json ContentType. -type PromoteSyncSourceTestConnectionJSONRequestBody = PromoteSyncSourceTestConnection - -// UpdateSyncSourceJSONRequestBody defines body for UpdateSyncSource for application/json ContentType. -type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate - -// CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. -type CreateSyncJSONRequestBody = SyncCreate - -// UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. -type UpdateSyncJSONRequestBody = SyncUpdate - -// UpdateSyncRunJSONRequestBody defines body for UpdateSyncRun for application/json ContentType. -type UpdateSyncRunJSONRequestBody = UpdateSyncRunRequest - -// CreateSyncRunProgressJSONRequestBody defines body for CreateSyncRunProgress for application/json ContentType. -type CreateSyncRunProgressJSONRequestBody = CreateSyncRunProgressRequest - // IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease @@ -4272,274 +3179,7 @@ func (a AIOnboardingNewConversationRequest) MarshalJSON() ([]byte, error) { object["try_resume"], err = json.Marshal(a.TryResume) if err != nil { return nil, fmt.Errorf("error marshaling 'try_resume': %w", err) - } - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for ActivatePlatform200Response. Returns the specified -// element and whether it was found -func (a ActivatePlatform200Response) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for ActivatePlatform200Response -func (a *ActivatePlatform200Response) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties -func (a *ActivatePlatform200Response) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["activation_id"]; found { - err = json.Unmarshal(raw, &a.ActivationID) - if err != nil { - return fmt.Errorf("error reading 'activation_id': %w", err) - } - delete(object, "activation_id") - } - - if raw, found := object["next_check_in_seconds"]; found { - err = json.Unmarshal(raw, &a.NextCheckInSeconds) - if err != nil { - return fmt.Errorf("error reading 'next_check_in_seconds': %w", err) - } - delete(object, "next_check_in_seconds") - } - - if raw, found := object["team_name"]; found { - err = json.Unmarshal(raw, &a.TeamName) - if err != nil { - return fmt.Errorf("error reading 'team_name': %w", err) - } - delete(object, "team_name") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties -func (a ActivatePlatform200Response) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["activation_id"], err = json.Marshal(a.ActivationID) - if err != nil { - return nil, fmt.Errorf("error marshaling 'activation_id': %w", err) - } - - object["next_check_in_seconds"], err = json.Marshal(a.NextCheckInSeconds) - if err != nil { - return nil, fmt.Errorf("error marshaling 'next_check_in_seconds': %w", err) - } - - object["team_name"], err = json.Marshal(a.TeamName) - if err != nil { - return nil, fmt.Errorf("error marshaling 'team_name': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for ActivatePlatform205Response. Returns the specified -// element and whether it was found -func (a ActivatePlatform205Response) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for ActivatePlatform205Response -func (a *ActivatePlatform205Response) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties -func (a *ActivatePlatform205Response) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["button_text"]; found { - err = json.Unmarshal(raw, &a.ButtonText) - if err != nil { - return fmt.Errorf("error reading 'button_text': %w", err) - } - delete(object, "button_text") - } - - if raw, found := object["button_url"]; found { - err = json.Unmarshal(raw, &a.ButtonURL) - if err != nil { - return fmt.Errorf("error reading 'button_url': %w", err) - } - delete(object, "button_url") - } - - if raw, found := object["error"]; found { - err = json.Unmarshal(raw, &a.Error) - if err != nil { - return fmt.Errorf("error reading 'error': %w", err) - } - delete(object, "error") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties -func (a ActivatePlatform205Response) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - if a.ButtonText != nil { - object["button_text"], err = json.Marshal(a.ButtonText) - if err != nil { - return nil, fmt.Errorf("error marshaling 'button_text': %w", err) - } - } - - if a.ButtonURL != nil { - object["button_url"], err = json.Marshal(a.ButtonURL) - if err != nil { - return nil, fmt.Errorf("error marshaling 'button_url': %w", err) - } - } - - object["error"], err = json.Marshal(a.Error) - if err != nil { - return nil, fmt.Errorf("error marshaling 'error': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - -// Getter for additional properties for ActivatePlatformRequest. Returns the specified -// element and whether it was found -func (a ActivatePlatformRequest) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for ActivatePlatformRequest -func (a *ActivatePlatformRequest) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties -func (a *ActivatePlatformRequest) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["api_key"]; found { - err = json.Unmarshal(raw, &a.APIKey) - if err != nil { - return fmt.Errorf("error reading 'api_key': %w", err) - } - delete(object, "api_key") - } - - if raw, found := object["installation_id"]; found { - err = json.Unmarshal(raw, &a.InstallationID) - if err != nil { - return fmt.Errorf("error reading 'installation_id': %w", err) - } - delete(object, "installation_id") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties -func (a ActivatePlatformRequest) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["api_key"], err = json.Marshal(a.APIKey) - if err != nil { - return nil, fmt.Errorf("error marshaling 'api_key': %w", err) - } - - object["installation_id"], err = json.Marshal(a.InstallationID) - if err != nil { - return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) + } } for fieldName, field := range a.AdditionalProperties { @@ -4551,61 +3191,53 @@ func (a ActivatePlatformRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } -// Getter for additional properties for ConnectorAuthFinishRequestOAuth. Returns the specified +// Getter for additional properties for ActivatePlatform200Response. Returns the specified // element and whether it was found -func (a ConnectorAuthFinishRequestOAuth) Get(fieldName string) (value interface{}, found bool) { +func (a ActivatePlatform200Response) Get(fieldName string) (value interface{}, found bool) { if a.AdditionalProperties != nil { value, found = a.AdditionalProperties[fieldName] } return } -// Setter for additional properties for ConnectorAuthFinishRequestOAuth -func (a *ConnectorAuthFinishRequestOAuth) Set(fieldName string, value interface{}) { +// Setter for additional properties for ActivatePlatform200Response +func (a *ActivatePlatform200Response) Set(fieldName string, value interface{}) { if a.AdditionalProperties == nil { a.AdditionalProperties = make(map[string]interface{}) } a.AdditionalProperties[fieldName] = value } -// Override default JSON handling for ConnectorAuthFinishRequestOAuth to handle AdditionalProperties -func (a *ConnectorAuthFinishRequestOAuth) UnmarshalJSON(b []byte) error { +// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties +func (a *ActivatePlatform200Response) UnmarshalJSON(b []byte) error { object := make(map[string]json.RawMessage) err := json.Unmarshal(b, &object) if err != nil { return err } - if raw, found := object["base_url"]; found { - err = json.Unmarshal(raw, &a.BaseURL) - if err != nil { - return fmt.Errorf("error reading 'base_url': %w", err) - } - delete(object, "base_url") - } - - if raw, found := object["env"]; found { - err = json.Unmarshal(raw, &a.Env) + if raw, found := object["activation_id"]; found { + err = json.Unmarshal(raw, &a.ActivationID) if err != nil { - return fmt.Errorf("error reading 'env': %w", err) + return fmt.Errorf("error reading 'activation_id': %w", err) } - delete(object, "env") + delete(object, "activation_id") } - if raw, found := object["return_url"]; found { - err = json.Unmarshal(raw, &a.ReturnURL) + if raw, found := object["next_check_in_seconds"]; found { + err = json.Unmarshal(raw, &a.NextCheckInSeconds) if err != nil { - return fmt.Errorf("error reading 'return_url': %w", err) + return fmt.Errorf("error reading 'next_check_in_seconds': %w", err) } - delete(object, "return_url") + delete(object, "next_check_in_seconds") } - if raw, found := object["spec"]; found { - err = json.Unmarshal(raw, &a.Spec) + if raw, found := object["team_name"]; found { + err = json.Unmarshal(raw, &a.TeamName) if err != nil { - return fmt.Errorf("error reading 'spec': %w", err) + return fmt.Errorf("error reading 'team_name': %w", err) } - delete(object, "spec") + delete(object, "team_name") } if len(object) != 0 { @@ -4622,33 +3254,24 @@ func (a *ConnectorAuthFinishRequestOAuth) UnmarshalJSON(b []byte) error { return nil } -// Override default JSON handling for ConnectorAuthFinishRequestOAuth to handle AdditionalProperties -func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { +// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties +func (a ActivatePlatform200Response) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) - object["base_url"], err = json.Marshal(a.BaseURL) + object["activation_id"], err = json.Marshal(a.ActivationID) if err != nil { - return nil, fmt.Errorf("error marshaling 'base_url': %w", err) - } - - if a.Env != nil { - object["env"], err = json.Marshal(a.Env) - if err != nil { - return nil, fmt.Errorf("error marshaling 'env': %w", err) - } + return nil, fmt.Errorf("error marshaling 'activation_id': %w", err) } - object["return_url"], err = json.Marshal(a.ReturnURL) + object["next_check_in_seconds"], err = json.Marshal(a.NextCheckInSeconds) if err != nil { - return nil, fmt.Errorf("error marshaling 'return_url': %w", err) + return nil, fmt.Errorf("error marshaling 'next_check_in_seconds': %w", err) } - if a.Spec != nil { - object["spec"], err = json.Marshal(a.Spec) - if err != nil { - return nil, fmt.Errorf("error marshaling 'spec': %w", err) - } + object["team_name"], err = json.Marshal(a.TeamName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'team_name': %w", err) } for fieldName, field := range a.AdditionalProperties { @@ -4660,101 +3283,53 @@ func (a ConnectorAuthFinishRequestOAuth) MarshalJSON() ([]byte, error) { return json.Marshal(object) } -// Getter for additional properties for ConnectorAuthRequestAWS. Returns the specified +// Getter for additional properties for ActivatePlatform205Response. Returns the specified // element and whether it was found -func (a ConnectorAuthRequestAWS) Get(fieldName string) (value interface{}, found bool) { +func (a ActivatePlatform205Response) Get(fieldName string) (value interface{}, found bool) { if a.AdditionalProperties != nil { value, found = a.AdditionalProperties[fieldName] } return } -// Setter for additional properties for ConnectorAuthRequestAWS -func (a *ConnectorAuthRequestAWS) Set(fieldName string, value interface{}) { +// Setter for additional properties for ActivatePlatform205Response +func (a *ActivatePlatform205Response) Set(fieldName string, value interface{}) { if a.AdditionalProperties == nil { a.AdditionalProperties = make(map[string]interface{}) } a.AdditionalProperties[fieldName] = value } -// Override default JSON handling for ConnectorAuthRequestAWS to handle AdditionalProperties -func (a *ConnectorAuthRequestAWS) UnmarshalJSON(b []byte) error { +// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties +func (a *ActivatePlatform205Response) UnmarshalJSON(b []byte) error { object := make(map[string]json.RawMessage) err := json.Unmarshal(b, &object) if err != nil { return err } - if raw, found := object["env"]; found { - err = json.Unmarshal(raw, &a.Env) - if err != nil { - return fmt.Errorf("error reading 'env': %w", err) - } - delete(object, "env") - } - - if raw, found := object["plugin_kind"]; found { - err = json.Unmarshal(raw, &a.PluginKind) - if err != nil { - return fmt.Errorf("error reading 'plugin_kind': %w", err) - } - delete(object, "plugin_kind") - } - - if raw, found := object["plugin_name"]; found { - err = json.Unmarshal(raw, &a.PluginName) - if err != nil { - return fmt.Errorf("error reading 'plugin_name': %w", err) - } - delete(object, "plugin_name") - } - - if raw, found := object["plugin_team"]; found { - err = json.Unmarshal(raw, &a.PluginTeam) - if err != nil { - return fmt.Errorf("error reading 'plugin_team': %w", err) - } - delete(object, "plugin_team") - } - - if raw, found := object["plugin_version"]; found { - err = json.Unmarshal(raw, &a.PluginVersion) - if err != nil { - return fmt.Errorf("error reading 'plugin_version': %w", err) - } - delete(object, "plugin_version") - } - - if raw, found := object["skip_dependent_tables"]; found { - err = json.Unmarshal(raw, &a.SkipDependentTables) - if err != nil { - return fmt.Errorf("error reading 'skip_dependent_tables': %w", err) - } - delete(object, "skip_dependent_tables") - } - - if raw, found := object["skip_tables"]; found { - err = json.Unmarshal(raw, &a.SkipTables) + if raw, found := object["button_text"]; found { + err = json.Unmarshal(raw, &a.ButtonText) if err != nil { - return fmt.Errorf("error reading 'skip_tables': %w", err) + return fmt.Errorf("error reading 'button_text': %w", err) } - delete(object, "skip_tables") + delete(object, "button_text") } - if raw, found := object["spec"]; found { - err = json.Unmarshal(raw, &a.Spec) + if raw, found := object["button_url"]; found { + err = json.Unmarshal(raw, &a.ButtonURL) if err != nil { - return fmt.Errorf("error reading 'spec': %w", err) + return fmt.Errorf("error reading 'button_url': %w", err) } - delete(object, "spec") + delete(object, "button_url") } - if raw, found := object["tables"]; found { - err = json.Unmarshal(raw, &a.Tables) + if raw, found := object["error"]; found { + err = json.Unmarshal(raw, &a.Error) if err != nil { - return fmt.Errorf("error reading 'tables': %w", err) + return fmt.Errorf("error reading 'error': %w", err) } - delete(object, "tables") + delete(object, "error") } if len(object) != 0 { @@ -4771,66 +3346,28 @@ func (a *ConnectorAuthRequestAWS) UnmarshalJSON(b []byte) error { return nil } -// Override default JSON handling for ConnectorAuthRequestAWS to handle AdditionalProperties -func (a ConnectorAuthRequestAWS) MarshalJSON() ([]byte, error) { +// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties +func (a ActivatePlatform205Response) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) - if a.Env != nil { - object["env"], err = json.Marshal(a.Env) - if err != nil { - return nil, fmt.Errorf("error marshaling 'env': %w", err) - } - } - - object["plugin_kind"], err = json.Marshal(a.PluginKind) - if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_kind': %w", err) - } - - object["plugin_name"], err = json.Marshal(a.PluginName) - if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_name': %w", err) - } - - object["plugin_team"], err = json.Marshal(a.PluginTeam) - if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_team': %w", err) - } - - if a.PluginVersion != nil { - object["plugin_version"], err = json.Marshal(a.PluginVersion) - if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_version': %w", err) - } - } - - if a.SkipDependentTables != nil { - object["skip_dependent_tables"], err = json.Marshal(a.SkipDependentTables) - if err != nil { - return nil, fmt.Errorf("error marshaling 'skip_dependent_tables': %w", err) - } - } - - if a.SkipTables != nil { - object["skip_tables"], err = json.Marshal(a.SkipTables) + if a.ButtonText != nil { + object["button_text"], err = json.Marshal(a.ButtonText) if err != nil { - return nil, fmt.Errorf("error marshaling 'skip_tables': %w", err) + return nil, fmt.Errorf("error marshaling 'button_text': %w", err) } } - if a.Spec != nil { - object["spec"], err = json.Marshal(a.Spec) + if a.ButtonURL != nil { + object["button_url"], err = json.Marshal(a.ButtonURL) if err != nil { - return nil, fmt.Errorf("error marshaling 'spec': %w", err) + return nil, fmt.Errorf("error marshaling 'button_url': %w", err) } } - if a.Tables != nil { - object["tables"], err = json.Marshal(a.Tables) - if err != nil { - return nil, fmt.Errorf("error marshaling 'tables': %w", err) - } + object["error"], err = json.Marshal(a.Error) + if err != nil { + return nil, fmt.Errorf("error marshaling 'error': %w", err) } for fieldName, field := range a.AdditionalProperties { @@ -4842,117 +3379,45 @@ func (a ConnectorAuthRequestAWS) MarshalJSON() ([]byte, error) { return json.Marshal(object) } -// Getter for additional properties for ConnectorAuthRequestOAuth. Returns the specified +// Getter for additional properties for ActivatePlatformRequest. Returns the specified // element and whether it was found -func (a ConnectorAuthRequestOAuth) Get(fieldName string) (value interface{}, found bool) { +func (a ActivatePlatformRequest) Get(fieldName string) (value interface{}, found bool) { if a.AdditionalProperties != nil { value, found = a.AdditionalProperties[fieldName] } return } -// Setter for additional properties for ConnectorAuthRequestOAuth -func (a *ConnectorAuthRequestOAuth) Set(fieldName string, value interface{}) { +// Setter for additional properties for ActivatePlatformRequest +func (a *ActivatePlatformRequest) Set(fieldName string, value interface{}) { if a.AdditionalProperties == nil { a.AdditionalProperties = make(map[string]interface{}) } a.AdditionalProperties[fieldName] = value } -// Override default JSON handling for ConnectorAuthRequestOAuth to handle AdditionalProperties -func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { +// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties +func (a *ActivatePlatformRequest) UnmarshalJSON(b []byte) error { object := make(map[string]json.RawMessage) err := json.Unmarshal(b, &object) if err != nil { return err } - if raw, found := object["base_url"]; found { - err = json.Unmarshal(raw, &a.BaseURL) - if err != nil { - return fmt.Errorf("error reading 'base_url': %w", err) - } - delete(object, "base_url") - } - - if raw, found := object["env"]; found { - err = json.Unmarshal(raw, &a.Env) - if err != nil { - return fmt.Errorf("error reading 'env': %w", err) - } - delete(object, "env") - } - - if raw, found := object["flavor"]; found { - err = json.Unmarshal(raw, &a.Flavor) - if err != nil { - return fmt.Errorf("error reading 'flavor': %w", err) - } - delete(object, "flavor") - } - - if raw, found := object["plugin_kind"]; found { - err = json.Unmarshal(raw, &a.PluginKind) - if err != nil { - return fmt.Errorf("error reading 'plugin_kind': %w", err) - } - delete(object, "plugin_kind") - } - - if raw, found := object["plugin_name"]; found { - err = json.Unmarshal(raw, &a.PluginName) - if err != nil { - return fmt.Errorf("error reading 'plugin_name': %w", err) - } - delete(object, "plugin_name") - } - - if raw, found := object["plugin_team"]; found { - err = json.Unmarshal(raw, &a.PluginTeam) - if err != nil { - return fmt.Errorf("error reading 'plugin_team': %w", err) - } - delete(object, "plugin_team") - } - - if raw, found := object["plugin_version"]; found { - err = json.Unmarshal(raw, &a.PluginVersion) - if err != nil { - return fmt.Errorf("error reading 'plugin_version': %w", err) - } - delete(object, "plugin_version") - } - - if raw, found := object["skip_dependent_tables"]; found { - err = json.Unmarshal(raw, &a.SkipDependentTables) - if err != nil { - return fmt.Errorf("error reading 'skip_dependent_tables': %w", err) - } - delete(object, "skip_dependent_tables") - } - - if raw, found := object["skip_tables"]; found { - err = json.Unmarshal(raw, &a.SkipTables) - if err != nil { - return fmt.Errorf("error reading 'skip_tables': %w", err) - } - delete(object, "skip_tables") - } - - if raw, found := object["spec"]; found { - err = json.Unmarshal(raw, &a.Spec) + if raw, found := object["api_key"]; found { + err = json.Unmarshal(raw, &a.APIKey) if err != nil { - return fmt.Errorf("error reading 'spec': %w", err) + return fmt.Errorf("error reading 'api_key': %w", err) } - delete(object, "spec") + delete(object, "api_key") } - if raw, found := object["tables"]; found { - err = json.Unmarshal(raw, &a.Tables) + if raw, found := object["installation_id"]; found { + err = json.Unmarshal(raw, &a.InstallationID) if err != nil { - return fmt.Errorf("error reading 'tables': %w", err) + return fmt.Errorf("error reading 'installation_id': %w", err) } - delete(object, "tables") + delete(object, "installation_id") } if len(object) != 0 { @@ -4969,78 +3434,19 @@ func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { return nil } -// Override default JSON handling for ConnectorAuthRequestOAuth to handle AdditionalProperties -func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { +// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties +func (a ActivatePlatformRequest) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) - object["base_url"], err = json.Marshal(a.BaseURL) - if err != nil { - return nil, fmt.Errorf("error marshaling 'base_url': %w", err) - } - - if a.Env != nil { - object["env"], err = json.Marshal(a.Env) - if err != nil { - return nil, fmt.Errorf("error marshaling 'env': %w", err) - } - } - - if a.Flavor != nil { - object["flavor"], err = json.Marshal(a.Flavor) - if err != nil { - return nil, fmt.Errorf("error marshaling 'flavor': %w", err) - } - } - - object["plugin_kind"], err = json.Marshal(a.PluginKind) - if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_kind': %w", err) - } - - object["plugin_name"], err = json.Marshal(a.PluginName) + object["api_key"], err = json.Marshal(a.APIKey) if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_name': %w", err) + return nil, fmt.Errorf("error marshaling 'api_key': %w", err) } - object["plugin_team"], err = json.Marshal(a.PluginTeam) + object["installation_id"], err = json.Marshal(a.InstallationID) if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_team': %w", err) - } - - if a.PluginVersion != nil { - object["plugin_version"], err = json.Marshal(a.PluginVersion) - if err != nil { - return nil, fmt.Errorf("error marshaling 'plugin_version': %w", err) - } - } - - if a.SkipDependentTables != nil { - object["skip_dependent_tables"], err = json.Marshal(a.SkipDependentTables) - if err != nil { - return nil, fmt.Errorf("error marshaling 'skip_dependent_tables': %w", err) - } - } - - if a.SkipTables != nil { - object["skip_tables"], err = json.Marshal(a.SkipTables) - if err != nil { - return nil, fmt.Errorf("error marshaling 'skip_tables': %w", err) - } - } - - if a.Spec != nil { - object["spec"], err = json.Marshal(a.Spec) - if err != nil { - return nil, fmt.Errorf("error marshaling 'spec': %w", err) - } - } - - if a.Tables != nil { - object["tables"], err = json.Marshal(a.Tables) - if err != nil { - return nil, fmt.Errorf("error marshaling 'tables': %w", err) - } + return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) } for fieldName, field := range a.AdditionalProperties { @@ -5957,72 +4363,6 @@ func (a SpendSummary) MarshalJSON() ([]byte, error) { return json.Marshal(object) } -// Getter for additional properties for SyncRunLogs. Returns the specified -// element and whether it was found -func (a SyncRunLogs) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for SyncRunLogs -func (a *SyncRunLogs) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for SyncRunLogs to handle AdditionalProperties -func (a *SyncRunLogs) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["location"]; found { - err = json.Unmarshal(raw, &a.Location) - if err != nil { - return fmt.Errorf("error reading 'location': %w", err) - } - delete(object, "location") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for SyncRunLogs to handle AdditionalProperties -func (a SyncRunLogs) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["location"], err = json.Marshal(a.Location) - if err != nil { - return nil, fmt.Errorf("error marshaling 'location': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - // Getter for additional properties for UpdateCurrentUserRequest. Returns the specified // element and whether it was found func (a UpdateCurrentUserRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index 8ce2417..70fe722 100644 --- a/spec.json +++ b/spec.json @@ -38,8 +38,6 @@ "name" : "addons" }, { "name" : "registry" - }, { - "name" : "syncs" }, { "name" : "managed-databases" }, { @@ -4606,10 +4604,50 @@ "tags" : [ "registry" ] } }, - "/teams/{team_name}/sync-source-test-connections" : { + "/teams/{team_name}/managed-databases" : { + "get" : { + "description" : "Get a paginated list of managed databases", + "operationId" : "GetManagedDatabases", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetManagedDatabases_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + }, "post" : { - "description" : "Create a test source connection.", - "operationId" : "CreateSyncSourceTestConnection", + "description" : "Create a new managed database", + "operationId" : "CreateManagedDatabase", "parameters" : [ { "$ref" : "#/components/parameters/team_name" } ], @@ -4617,7 +4655,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSourceTestConnectionCreate" + "$ref" : "#/components/schemas/ManagedDatabaseCreate" } } }, @@ -4628,7 +4666,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSourceTestConnection" + "$ref" : "#/components/schemas/ManagedDatabase" } } }, @@ -4640,37 +4678,69 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "404" : { "$ref" : "#/components/responses/NotFound" }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, "422" : { "$ref" : "#/components/responses/UnprocessableEntity" }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "managed-databases" ], + "x-internal" : true } }, - "/teams/{team_name}/sync-source-test-connections/{sync_source_test_connection_id}" : { + "/teams/{team_name}/managed-databases/{managed_database_id}" : { + "delete" : { + "description" : "Delete this managed database. Any syncs relying on this database must be deleted first.", + "operationId" : "DeleteManagedDatabase", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/managed_database_id" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + }, "get" : { - "description" : "Get a sync source test connection.", - "operationId" : "GetSyncSourceTestConnection", + "description" : "Get a single managed database.", + "operationId" : "GetManagedDatabase", "parameters" : [ { "$ref" : "#/components/parameters/team_name" }, { - "$ref" : "#/components/parameters/sync_source_test_connection_id" + "$ref" : "#/components/parameters/managed_database_id" } ], "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSourceTestConnection" + "$ref" : "#/components/schemas/ManagedDatabase" } } }, @@ -4679,9 +4749,6 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, "404" : { "$ref" : "#/components/responses/NotFound" }, @@ -4689,69 +4756,72 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a sync source test connection.", - "operationId" : "UpdateSyncTestConnectionForSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_test_connection_id" - } ], + "tags" : [ "managed-databases" ], + "x-internal" : true + } + }, + "/platform/activate" : { + "post" : { + "description" : "Activate platform usage by API key", + "operationId" : "ActivatePlatform", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSyncTestConnectionForSyncSource_request" + "$ref" : "#/components/schemas/ActivatePlatform_request" } } - } + }, + "required" : true }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSourceTestConnection" + "$ref" : "#/components/schemas/ActivatePlatform_200_response" + } + } + }, + "description" : "Success" + }, + "205" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_205_response" } } }, - "description" : "Updated" + "description" : "Activation method is no longer valid" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" + "429" : { + "$ref" : "#/components/responses/TooManyRequests" }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "security" : [ ], + "tags" : [ "platform" ], + "x-internal" : true } }, - "/teams/{team_name}/sync-source-test-connections/{sync_source_test_connection_id}/promote" : { + "/platform/activate/renew" : { "post" : { - "description" : "Promote a sync source test connection to a sync source.", - "operationId" : "PromoteSyncSourceTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_test_connection_id" - } ], + "description" : "Renew platform activation", + "operationId" : "RenewPlatformActivation", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PromoteSyncSourceTestConnection" + "$ref" : "#/components/schemas/RenewPlatformActivation_request" } } }, @@ -4762,81 +4832,64 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSource" + "$ref" : "#/components/schemas/RenewPlatformActivation_200_response" } } }, - "description" : "Successful response indicating that an existing sync source was replaced." + "description" : "Success" }, - "201" : { + "205" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncSource" + "$ref" : "#/components/schemas/ActivatePlatform_205_response" } } }, - "description" : "Successful response indicating that a new sync source was created." + "description" : "Activation method is no longer valid" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" + "429" : { + "$ref" : "#/components/responses/TooManyRequests" }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "security" : [ ], + "tags" : [ "platform" ], + "x-internal" : true } }, - "/teams/{team_name}/sync-destination-test-connections" : { + "/platform/report" : { "post" : { - "description" : "Create a test destination connection.", - "operationId" : "CreateSyncDestinationTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], + "description" : "Report platform data", + "operationId" : "ReportPlatformData", "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestinationTestConnectionCreate" + "$ref" : "#/components/schemas/ReportPlatformData_request" } } }, "required" : true }, "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationTestConnection" - } - } - }, - "description" : "Response" + "204" : { + "description" : "Success" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, "429" : { "$ref" : "#/components/responses/TooManyRequests" }, @@ -4844,28 +4897,47 @@ "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "platform" ], + "x-internal" : true } }, - "/teams/{team_name}/sync-destination-test-connections/{sync_destination_test_connection_id}" : { - "get" : { - "description" : "Get a sync destination test connection.", - "operationId" : "GetSyncDestinationTestConnection", + "/teams/{team_name}/ai-onboarding/chat" : { + "post" : { + "description" : "Send a chat message to the AI onboarding assistant", + "operationId" : "AIOnboardingChat", "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_test_connection_id" + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingChat_request" + } + } + } + }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestinationTestConnection" + "$ref" : "#/components/schemas/AIOnboardingChat_200_response" } } }, - "description" : "Response" + "description" : "Chat response from the AI assistant" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" }, "401" : { "$ref" : "#/components/responses/RequiresAuthentication" @@ -4876,98 +4948,96 @@ "404" : { "$ref" : "#/components/responses/NotFound" }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a sync destination test connection.", - "operationId" : "UpdateSyncTestConnectionForSyncDestination", + "tags" : [ "ai-onboarding" ] + } + }, + "/teams/{team_name}/ai-onboarding/conversations" : { + "delete" : { + "description" : "End the current AI onboarding conversation", + "operationId" : "AIOnboardingEndConversation", "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_test_connection_id" + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSyncTestConnectionForSyncSource_request" - } - } - } - }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestinationTestConnection" + "$ref" : "#/components/schemas/AIOnboardingEndConversation_200_response" } } }, - "description" : "Updated" + "description" : "Conversation ended successfully" }, "400" : { "$ref" : "#/components/responses/BadRequest" }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, "403" : { "$ref" : "#/components/responses/Forbidden" }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-destination-test-connections/{sync_destination_test_connection_id}/promote" : { + "tags" : [ "ai-onboarding" ] + }, "post" : { - "description" : "Promote a sync destination test connection to a sync destination.", - "operationId" : "PromoteSyncDestinationTestConnection", + "description" : "Start a new conversation with the AI onboarding assistant", + "operationId" : "AIOnboardingNewConversation", "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_test_connection_id" + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" } ], "requestBody" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PromoteSyncDestinationTestConnection" + "$ref" : "#/components/schemas/AIOnboardingNewConversation_request" } } - }, - "required" : true + } }, "responses" : { "200" : { "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SyncDestination" - } - } - }, - "description" : "Successful response indicating that an existing sync destination was replaced." - }, - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestination" + "$ref" : "#/components/schemas/AIOnboardingNewConversation_200_response" } } }, - "description" : "Response" + "description" : "New conversation started successfully" }, "400" : { "$ref" : "#/components/responses/BadRequest" @@ -4975,4073 +5045,632 @@ "401" : { "$ref" : "#/components/responses/RequiresAuthentication" }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, "404" : { "$ref" : "#/components/responses/NotFound" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" }, "500" : { "$ref" : "#/components/responses/InternalError" } }, - "tags" : [ "syncs" ] + "tags" : [ "ai-onboarding" ] } - }, - "/teams/{team_name}/sync-sources" : { - "get" : { - "description" : "List all sync source definitions.", - "operationId" : "ListSyncSources", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListSyncSources_200_response" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } + } + }, + "components" : { + "parameters" : { + "page" : { + "description" : "Page number of the results to fetch", + "explode" : true, + "in" : "query", + "name" : "page", + "required" : false, + "schema" : { + "default" : 1, + "format" : "int64", + "minimum" : 1, + "type" : "integer" }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-sources/{sync_source_name}" : { - "delete" : { - "description" : "Delete a Sync Source definition. Any syncs relying on this source must be deleted first.", - "operationId" : "DeleteSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } + "style" : "form" + }, + "per_page" : { + "description" : "The number of results per page (max 1000).", + "explode" : true, + "in" : "query", + "name" : "per_page", + "required" : false, + "schema" : { + "default" : 100, + "format" : "int64", + "maximum" : 1000, + "minimum" : 1, + "type" : "integer" }, - "tags" : [ "syncs" ] + "style" : "form" }, - "get" : { - "description" : "Get a single sync source definition.", - "operationId" : "GetSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSource" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } + "plugin_team" : { + "explode" : false, + "in" : "path", + "name" : "plugin_team", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" }, - "tags" : [ "syncs" ] + "style" : "simple" }, - "patch" : { - "description" : "Update a Sync Source definition.", - "operationId" : "UpdateSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSourceUpdate" - } - } - }, - "required" : true + "plugin_kind" : { + "explode" : false, + "in" : "path", + "name" : "plugin_kind", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/PluginKind" }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncSource" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" + "style" : "simple" + }, + "plugin_name" : { + "explode" : false, + "in" : "path", + "name" : "plugin_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/PluginName" + }, + "style" : "simple" + }, + "plugin_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at", "updated_at", "name", "downloads" ], + "type" : "string" + }, + "style" : "form" + }, + "plugin_include_release_stages" : { + "allowEmptyValue" : true, + "description" : "Include these release stages in the response", + "explode" : true, + "in" : "query", + "name" : "include_release_stages", + "required" : false, + "schema" : { + "items" : { + "$ref" : "#/components/schemas/PluginReleaseStage" }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" + "type" : "array" + }, + "style" : "form" + }, + "plugin_exclude_release_stages" : { + "allowEmptyValue" : true, + "description" : "Exclude these release stages from the response", + "explode" : true, + "in" : "query", + "name" : "exclude_release_stages", + "required" : false, + "schema" : { + "default" : [ "deprecated" ], + "items" : { + "$ref" : "#/components/schemas/PluginReleaseStage" }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } + "type" : "array" }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-sources/{sync_source_name}/test-connections/{sync_test_connection_id}" : { - "get" : { - "description" : "Get test connection details for sync source.", - "operationId" : "GetTestConnectionForSyncSource", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-sources/{sync_source_name}/syncs" : { - "get" : { - "description" : "List all Syncs for a given sync source.", - "operationId" : "ListSyncSourceSyncs", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_source_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListSyncSourceSyncs_200_response" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-destinations" : { - "get" : { - "description" : "List all sync destination definitions.", - "operationId" : "ListSyncDestinations", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListSyncDestinations_200_response" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}" : { - "delete" : { - "description" : "Delete a Sync Destination definition. Any syncs relying on this destination must be deleted first.", - "operationId" : "DeleteSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "get" : { - "description" : "Get a single sync destination definition.", - "operationId" : "GetSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestination" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a Sync Destination definition.", - "operationId" : "UpdateSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationUpdate" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncDestination" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}/test-connections/{sync_test_connection_id}" : { - "get" : { - "description" : "Get test connection details for sync destination.", - "operationId" : "GetTestConnectionForSyncDestination", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/sync-destinations/{sync_destination_name}/syncs" : { - "get" : { - "description" : "List all Syncs for a given sync destination.", - "operationId" : "ListSyncDestinationSyncs", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_destination_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListSyncSourceSyncs_200_response" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs" : { - "get" : { - "description" : "List all Syncs.", - "operationId" : "ListSyncs", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListSyncSourceSyncs_200_response" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Create new Sync definition. Sync runs can be scheduled automatically, or triggered manually after sync is created.", - "operationId" : "CreateSync", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Sync" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/{sync_name}" : { - "delete" : { - "description" : "Delete Sync. This will delete Sync configuration and all associated sync runs, but will not delete the associated source and destination(s). These will need to be deleted separately.", - "operationId" : "DeleteSync", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "get" : { - "description" : "Get a Sync", - "operationId" : "GetSync", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Sync" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a Sync", - "operationId" : "UpdateSync", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncUpdate" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Sync" - } - } - }, - "description" : "Updated" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs" : { - "get" : { - "description" : "List all Sync Runs.", - "operationId" : "ListSyncRuns", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListSyncRuns_200_response" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Create new SyncRun. This will trigger a manual job run.", - "operationId" : "CreateSyncRun", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - } ], - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncRun" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}" : { - "get" : { - "description" : "Get a Sync Run.", - "operationId" : "GetSyncRun", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncRunDetails" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a SyncRun", - "operationId" : "UpdateSyncRun", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSyncRun_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncRun" - } - } - }, - "description" : "Updated" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/progress" : { - "post" : { - "description" : "Create a new sync run progress update.", - "operationId" : "CreateSyncRunProgress", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateSyncRunProgress_request" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "Progress was reported successfully" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/logs" : { - "get" : { - "description" : "Get logs for a sync run.", - "operationId" : "GetSyncRunLogs", - "parameters" : [ { - "explode" : false, - "in" : "header", - "name" : "Accept", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "simple" - }, { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Sync_Run_Logs" - } - }, - "text/plain" : { - "schema" : { - "description" : "Chunked response logs for a sync run that is in progress.", - "type" : "string" - } - } - }, - "description" : "Response" - }, - "204" : { - "description" : "No logs available for a sync run that has not started." - }, - "302" : { - "description" : "Redirect to the logs download URL for a sync run that has completed.", - "headers" : { - "Location" : { - "explode" : false, - "schema" : { - "description" : "URL to download logs", - "type" : "string" - }, - "style" : "simple" - } - } - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/identity" : { - "get" : { - "description" : "Get connector identity for a sync run.", - "operationId" : "GetSyncRunConnectorIdentity", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/{sync_name}/runs/{sync_run_id}/connector/{connector_id}/credentials" : { - "get" : { - "description" : "Get connector credentials for a sync run.", - "operationId" : "GetSyncRunConnectorCredentials", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_name" - }, { - "$ref" : "#/components/parameters/sync_run_id" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/identity" : { - "get" : { - "description" : "Get connector identity for a test connection.", - "operationId" : "GetTestConnectionConnectorIdentity", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorIdentity_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/credentials" : { - "get" : { - "description" : "Get connector credentials for a test connection", - "operationId" : "GetTestConnectionConnectorCredentials", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetSyncRunConnectorCredentials_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ], - "x-internal" : true - } - }, - "/teams/{team_name}/managed-databases" : { - "get" : { - "description" : "Get a paginated list of managed databases", - "operationId" : "GetManagedDatabases", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/page" - }, { - "$ref" : "#/components/parameters/per_page" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetManagedDatabases_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "managed-databases" ], - "x-internal" : true - }, - "post" : { - "description" : "Create a new managed database", - "operationId" : "CreateManagedDatabase", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ManagedDatabaseCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ManagedDatabase" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "409" : { - "$ref" : "#/components/responses/Conflict" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "managed-databases" ], - "x-internal" : true - } - }, - "/teams/{team_name}/managed-databases/{managed_database_id}" : { - "delete" : { - "description" : "Delete this managed database. Any syncs relying on this database must be deleted first.", - "operationId" : "DeleteManagedDatabase", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/managed_database_id" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "managed-databases" ], - "x-internal" : true - }, - "get" : { - "description" : "Get a single managed database.", - "operationId" : "GetManagedDatabase", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/managed_database_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ManagedDatabase" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "managed-databases" ], - "x-internal" : true - } - }, - "/teams/{team_name}/connectors" : { - "get" : { - "description" : "List all configured connectors", - "operationId" : "ListConnectors", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/per_page" - }, { - "$ref" : "#/components/parameters/page" - }, { - "description" : "Filter connectors by a given type.", - "explode" : true, - "in" : "query", - "name" : "filter_type", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - }, { - "description" : "Filter connectors by a given plugin reference. Mutually exclusive with `type`.", - "example" : "cloudquery/source/googleanalytics", - "explode" : true, - "in" : "query", - "name" : "filter_plugin", - "required" : false, - "schema" : { - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListConnectors_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Create new connector", - "operationId" : "CreateConnector", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorCreate" - } - } - }, - "required" : true - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Connector" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/connectors/{connector_id}" : { - "get" : { - "description" : "Get a configured connector", - "operationId" : "GetConnector", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Connector" - } - } - }, - "description" : "Response" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Update a connector", - "operationId" : "UpdateConnector", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorUpdate" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Connector" - } - } - }, - "description" : "Update response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/connectors/{connector_id}/authenticate" : { - "delete" : { - "description" : "Revoke authentication for a given connector. Any syncs relying on this connector will stop running until the connector is reauthenticated or sync references are updated.", - "operationId" : "RevokeConnector", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "204" : { - "description" : "Deleted" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/connectors/{connector_id}/authenticate/aws" : { - "get" : { - "description" : "Get authentication status for the given AWS connector", - "operationId" : "GetConnectorAuthStatusAWS", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetConnectorAuthStatusAWS_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "patch" : { - "description" : "Complete authentication for the given AWS connector", - "operationId" : "AuthenticateConnectorFinishAWS", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthFinishRequestAWS" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "Authentication is complete." - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Authenticate or reauthenticate the given AWS connector", - "operationId" : "AuthenticateConnectorAWS", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthRequestAWS" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseAWS" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/connectors/{connector_id}/authenticate/gcp" : { - "get" : { - "description" : "Get authentication status for the given GCP connector", - "operationId" : "GetConnectorAuthStatusGCP", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetConnectorAuthStatusGCP_200_response" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Authenticate or reauthenticate the given GCP connector", - "operationId" : "AuthenticateConnectorGCP", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthRequestGCP" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseGCP" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/connectors/{connector_id}/authenticate/gcp/finish" : { - "post" : { - "description" : "Complete authentication for the given GCP connector", - "operationId" : "AuthenticateConnectorFinishGCP", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "responses" : { - "204" : { - "description" : "Authentication is complete." - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/teams/{team_name}/connectors/{connector_id}/authenticate/oauth" : { - "patch" : { - "description" : "Complete authentication for the given OAuth connector", - "operationId" : "AuthenticateConnectorFinishOAuth", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthFinishRequestOAuth" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" - } - } - }, - "description" : "First part of authentication is complete, follow redirect to continue" - }, - "204" : { - "description" : "Authentication is complete." - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - }, - "post" : { - "description" : "Authenticate or reauthenticate the given OAuth connector", - "operationId" : "AuthenticateConnectorOAuth", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/connector_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthRequestOAuth" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" - } - } - }, - "description" : "Response" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, - "/platform/activate" : { - "post" : { - "description" : "Activate platform usage by API key", - "operationId" : "ActivatePlatform", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ActivatePlatform_request" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ActivatePlatform_200_response" - } - } - }, - "description" : "Success" - }, - "205" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ActivatePlatform_205_response" - } - } - }, - "description" : "Activation method is no longer valid" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "security" : [ ], - "tags" : [ "platform" ], - "x-internal" : true - } - }, - "/platform/activate/renew" : { - "post" : { - "description" : "Renew platform activation", - "operationId" : "RenewPlatformActivation", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RenewPlatformActivation_request" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RenewPlatformActivation_200_response" - } - } - }, - "description" : "Success" - }, - "205" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ActivatePlatform_205_response" - } - } - }, - "description" : "Activation method is no longer valid" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "security" : [ ], - "tags" : [ "platform" ], - "x-internal" : true - } - }, - "/platform/report" : { - "post" : { - "description" : "Report platform data", - "operationId" : "ReportPlatformData", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ReportPlatformData_request" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "Success" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "429" : { - "$ref" : "#/components/responses/TooManyRequests" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "platform" ], - "x-internal" : true - } - }, - "/teams/{team_name}/ai-onboarding/chat" : { - "post" : { - "description" : "Send a chat message to the AI onboarding assistant", - "operationId" : "AIOnboardingChat", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "team_name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple", - "x-go-name" : "TeamName" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AIOnboardingChat_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AIOnboardingChat_200_response" - } - } - }, - "description" : "Chat response from the AI assistant" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "405" : { - "$ref" : "#/components/responses/MethodNotAllowed" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "ai-onboarding" ] - } - }, - "/teams/{team_name}/ai-onboarding/conversations" : { - "delete" : { - "description" : "End the current AI onboarding conversation", - "operationId" : "AIOnboardingEndConversation", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "team_name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple", - "x-go-name" : "TeamName" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AIOnboardingEndConversation_200_response" - } - } - }, - "description" : "Conversation ended successfully" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "405" : { - "$ref" : "#/components/responses/MethodNotAllowed" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "ai-onboarding" ] - }, - "post" : { - "description" : "Start a new conversation with the AI onboarding assistant", - "operationId" : "AIOnboardingNewConversation", - "parameters" : [ { - "explode" : false, - "in" : "path", - "name" : "team_name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple", - "x-go-name" : "TeamName" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AIOnboardingNewConversation_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AIOnboardingNewConversation_200_response" - } - } - }, - "description" : "New conversation started successfully" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "405" : { - "$ref" : "#/components/responses/MethodNotAllowed" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "ai-onboarding" ] - } - } - }, - "components" : { - "parameters" : { - "page" : { - "description" : "Page number of the results to fetch", - "explode" : true, - "in" : "query", - "name" : "page", - "required" : false, - "schema" : { - "default" : 1, - "format" : "int64", - "minimum" : 1, - "type" : "integer" - }, - "style" : "form" - }, - "per_page" : { - "description" : "The number of results per page (max 1000).", - "explode" : true, - "in" : "query", - "name" : "per_page", - "required" : false, - "schema" : { - "default" : 100, - "format" : "int64", - "maximum" : 1000, - "minimum" : 1, - "type" : "integer" - }, - "style" : "form" - }, - "plugin_team" : { - "explode" : false, - "in" : "path", - "name" : "plugin_team", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/TeamName" - }, - "style" : "simple" - }, - "plugin_kind" : { - "explode" : false, - "in" : "path", - "name" : "plugin_kind", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "style" : "simple" - }, - "plugin_name" : { - "explode" : false, - "in" : "path", - "name" : "plugin_name", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/PluginName" - }, - "style" : "simple" - }, - "plugin_sort_by" : { - "description" : "The field to sort by", - "explode" : true, - "in" : "query", - "name" : "sort_by", - "required" : false, - "schema" : { - "enum" : [ "created_at", "updated_at", "name", "downloads" ], - "type" : "string" - }, - "style" : "form" - }, - "plugin_include_release_stages" : { - "allowEmptyValue" : true, - "description" : "Include these release stages in the response", - "explode" : true, - "in" : "query", - "name" : "include_release_stages", - "required" : false, - "schema" : { - "items" : { - "$ref" : "#/components/schemas/PluginReleaseStage" - }, - "type" : "array" - }, - "style" : "form" - }, - "plugin_exclude_release_stages" : { - "allowEmptyValue" : true, - "description" : "Exclude these release stages from the response", - "explode" : true, - "in" : "query", - "name" : "exclude_release_stages", - "required" : false, - "schema" : { - "default" : [ "deprecated" ], - "items" : { - "$ref" : "#/components/schemas/PluginReleaseStage" - }, - "type" : "array" - }, - "style" : "form" - }, - "team_name" : { - "explode" : false, - "in" : "path", - "name" : "team_name", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/TeamName" - }, - "style" : "simple" - }, - "version_sort_by" : { - "description" : "The field to sort by", - "explode" : true, - "in" : "query", - "name" : "sort_by", - "required" : false, - "schema" : { - "enum" : [ "created_at" ], - "type" : "string" - }, - "style" : "form" - }, - "include_drafts" : { - "description" : "Whether to include draft versions", - "explode" : true, - "in" : "query", - "name" : "include_drafts", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "style" : "form" - }, - "include_fips" : { - "description" : "Whether to include fips versions", - "explode" : true, - "in" : "query", - "name" : "include_fips", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "style" : "form" - }, - "include_prereleases" : { - "description" : "Whether to include prerelease versions", - "explode" : true, - "in" : "query", - "name" : "include_prereleases", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "style" : "form" - }, - "version_filter" : { - "explode" : true, - "in" : "query", - "name" : "version_filter", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/VersionFilter" - }, - "style" : "form" - }, - "version_name" : { - "explode" : false, - "in" : "path", - "name" : "version_name", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/VersionName" - }, - "style" : "simple" - }, - "target_name" : { - "explode" : false, - "in" : "path", - "name" : "target_name", - "required" : true, - "schema" : { - "type" : "string" - }, - "style" : "simple" - }, - "addon_sort_by" : { - "description" : "The field to sort by", - "explode" : true, - "in" : "query", - "name" : "sort_by", - "required" : false, - "schema" : { - "enum" : [ "created_at", "updated_at", "name", "downloads" ], - "type" : "string" - }, - "style" : "form" - }, - "addon_type" : { - "explode" : false, - "in" : "path", - "name" : "addon_type", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/AddonType" - }, - "style" : "simple" - }, - "addon_name" : { - "explode" : false, - "in" : "path", - "name" : "addon_name", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/AddonName" - }, - "style" : "simple" - }, - "include_private" : { - "description" : "Whether to include private plugins", - "explode" : true, - "in" : "query", - "name" : "include_private", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "style" : "form" - }, - "addon_order_id" : { - "explode" : false, - "in" : "path", - "name" : "addon_order_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/AddonOrderID" - }, - "style" : "simple", - "x-go-name" : "AddonOrderID" - }, - "email_basic" : { - "explode" : false, - "in" : "path", - "name" : "email", - "required" : true, - "schema" : { - "example" : "user@example.com", - "type" : "string" - }, - "style" : "simple" - }, - "addon_team" : { - "explode" : false, - "in" : "path", - "name" : "addon_team", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/TeamName" - }, - "style" : "simple" - }, - "team_subscription_order_id" : { - "explode" : false, - "in" : "path", - "name" : "subscription_order_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/TeamSubscriptionOrderID" - }, - "style" : "simple", - "x-go-name" : "TeamSubscriptionOrderID" - }, - "user_id" : { - "explode" : false, - "in" : "path", - "name" : "user_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/UserID" - }, - "style" : "simple", - "x-go-name" : "UserID" - }, - "apikey_id" : { - "explode" : false, - "in" : "path", - "name" : "apikey_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/APIKeyID" - }, - "style" : "simple", - "x-go-name" : "APIKeyID" - }, - "sync_source_test_connection_id" : { - "explode" : false, - "in" : "path", - "name" : "sync_source_test_connection_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SyncSourceTestConnectionID" - }, - "style" : "simple", - "x-go-name" : "SyncSourceTestConnectionID" - }, - "sync_destination_test_connection_id" : { - "explode" : false, - "in" : "path", - "name" : "sync_destination_test_connection_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SyncDestinationTestConnectionID" - }, - "style" : "simple", - "x-go-name" : "SyncDestinationTestConnectionID" - }, - "sync_source_name" : { - "explode" : false, - "in" : "path", - "name" : "sync_source_name", - "required" : true, - "schema" : { - "description" : "Unique name of the sync source", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string", - "x-go-name" : "SyncSourceName" - }, - "style" : "simple" - }, - "sync_test_connection_id" : { - "explode" : false, - "in" : "path", - "name" : "sync_test_connection_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnectionID" - }, - "style" : "simple" - }, - "sync_destination_name" : { - "explode" : false, - "in" : "path", - "name" : "sync_destination_name", - "required" : true, - "schema" : { - "description" : "Unique name of the sync destination", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string", - "x-go-name" : "SyncDestinationName" - }, - "style" : "simple" - }, - "sync_name" : { - "explode" : false, - "in" : "path", - "name" : "sync_name", - "required" : true, - "schema" : { - "description" : "Unique name of the sync", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string", - "x-go-name" : "SyncName" - }, - "style" : "simple" - }, - "sync_run_id" : { - "explode" : false, - "in" : "path", - "name" : "sync_run_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SyncRunID" - }, - "style" : "simple" - }, - "connector_id" : { - "explode" : false, - "in" : "path", - "name" : "connector_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/ConnectorID" - }, - "style" : "simple", - "x-go-name" : "ConnectorID" - }, - "managed_database_id" : { - "explode" : false, - "in" : "path", - "name" : "managed_database_id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/ManagedDatabaseID" - }, - "style" : "simple", - "x-go-name" : "ManagedDatabaseID" - } - }, - "responses" : { - "InternalError" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BasicError" - } - } - }, - "description" : "Internal Error" - }, - "RequiresAuthentication" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BasicError" - } - } - }, - "description" : "Requires authentication" - }, - "BadRequest" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FieldError" - } - } - }, - "description" : "Bad request" - }, - "Forbidden" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FieldError" - } - } - }, - "description" : "Forbidden" - }, - "NotFound" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BasicError" - } - } - }, - "description" : "Resource not found" - }, - "UnprocessableEntity" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FieldError" - } - } - }, - "description" : "UnprocessableEntity" - }, - "TooManyRequests" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BasicError" - } - } - }, - "description" : "Too Many Requests" - }, - "ServiceUnavailable" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BasicError" - } - } - }, - "description" : "Service unavailable" - }, - "MethodNotAllowed" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BasicError" - } - } - }, - "description" : "Method not allowed" - }, - "DockerError" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DockerError" - } - } - }, - "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry" - }, - "Conflict" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BasicError" - } - } - }, - "description" : "Conflict" - } - }, - "schemas" : { - "BasicError" : { - "additionalProperties" : false, - "description" : "Basic Error", - "properties" : { - "message" : { - "type" : "string" - }, - "status" : { - "type" : "integer" - } - }, - "required" : [ "message", "status" ], - "title" : "Basic Error" - }, - "ContentType" : { - "description" : "The HTTP Content-Type of the image or asset", - "enum" : [ "image/jpeg", "image/png", "image/webp" ], - "example" : "image/png", - "type" : "string" - }, - "ImageURL" : { - "properties" : { - "upload_url" : { - "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", - "type" : "string" - }, - "download_url" : { - "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", - "type" : "string" - }, - "required_headers" : { - "additionalProperties" : { - "items" : { - "type" : "string" - } - }, - "description" : "Required HTTP headers to include for the upload" - } - }, - "required" : [ "download_url", "required_headers", "upload_url" ] - }, - "TeamName" : { - "description" : "The unique name for the team.", - "example" : "cloudquery", - "maxLength" : 255, - "pattern" : "^[a-z](-?[a-z0-9]+)+$", - "type" : "string" - }, - "PluginKind" : { - "description" : "The kind of plugin, ie. source or destination.", - "enum" : [ "source", "destination", "transformer" ], - "example" : "source", - "type" : "string" - }, - "PluginName" : { - "description" : "The unique name for the plugin.", - "example" : "aws-source", - "maxLength" : 255, - "pattern" : "^[a-z](-?[a-z0-9]+)+$", - "type" : "string" - }, - "PluginNotificationRequestStatus" : { - "default" : "pending", - "description" : "Status of a plugin notification request", - "enum" : [ "pending", "sent" ], - "type" : "string" - }, - "PluginNotificationRequest" : { - "additionalProperties" : false, - "description" : "Plugin Notification Request", - "properties" : { - "plugin_team" : { - "$ref" : "#/components/schemas/TeamName" - }, - "plugin_kind" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "plugin_name" : { - "$ref" : "#/components/schemas/PluginName" - }, - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "sent_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "status" : { - "$ref" : "#/components/schemas/PluginNotificationRequestStatus" - } - }, - "required" : [ "created_at", "plugin_kind", "plugin_name", "plugin_team" ] - }, - "ListMetadata" : { - "properties" : { - "total_count" : { - "type" : "integer" - }, - "last_page" : { - "type" : "integer" - }, - "page_size" : { - "type" : "integer" - }, - "time_ms" : { - "type" : "integer" - } - }, - "required" : [ "page_size" ] - }, - "PluginNotificationRequestCreate" : { - "additionalProperties" : false, - "description" : "Create a Plugin Notification Request", - "properties" : { - "plugin_team" : { - "$ref" : "#/components/schemas/TeamName" - }, - "plugin_kind" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "plugin_name" : { - "$ref" : "#/components/schemas/PluginName" - } - }, - "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] - }, - "FieldError" : { - "allOf" : [ { - "$ref" : "#/components/schemas/BasicError" - }, { - "properties" : { - "errors" : { - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "field_errors" : { - "additionalProperties" : { - "type" : "string" - } - } - } - } ] - }, - "PluginReleaseStage" : { - "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], - "type" : "string" - }, - "PluginCategory" : { - "description" : "Supported categories for plugins", - "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "finance", "customer-support", "other" ], - "type" : "string" - }, - "PluginPriceCategory" : { - "description" : "Supported price categories for billing", - "enum" : [ "api", "database", "free" ], - "type" : "string" - }, - "PluginTier" : { - "deprecated" : true, - "description" : "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", - "enum" : [ "free", "paid", "open-core" ], - "type" : "string" - }, - "Plugin" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin", - "properties" : { - "team_name" : { - "$ref" : "#/components/schemas/TeamName" - }, - "name" : { - "$ref" : "#/components/schemas/PluginName" - }, - "kind" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "category" : { - "$ref" : "#/components/schemas/PluginCategory" - }, - "price_category" : { - "$ref" : "#/components/schemas/PluginPriceCategory" - }, - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "homepage" : { - "example" : "https://cloudquery.io", - "type" : "string" - }, - "logo" : { - "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", - "type" : "string" - }, - "display_name" : { - "description" : "The plugin's display name", - "example" : "AWS Source Plugin", - "maxLength" : 50, - "minLength" : 1, - "type" : "string" - }, - "official" : { - "description" : "True if the plugin is maintained by CloudQuery, false otherwise", - "type" : "boolean" - }, - "release_stage" : { - "$ref" : "#/components/schemas/PluginReleaseStage" - }, - "repository" : { - "example" : "https://github.com/cloudquery/cloudquery", - "type" : "string" - }, - "short_description" : { - "example" : "Sync data from AWS to any destination", - "maxLength" : 512, - "minLength" : 1, - "type" : "string" - }, - "tier" : { - "$ref" : "#/components/schemas/PluginTier" - }, - "public" : { - "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type" : "boolean" - }, - "usd_per_row" : { - "deprecated" : true, - "description" : "Deprecated. Refer to `price_category` instead.", - "example" : "0.0001", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "USDPerRow" - }, - "free_rows_per_month" : { - "deprecated" : true, - "description" : "Deprecated. Refer to `price_category` instead.", - "example" : 1000, - "format" : "int64", - "type" : "integer" - }, - "minimum_cloud_version" : { - "description" : "Minimum plugin version that is supported in CloudQuery managed syncs.", - "example" : "v1.2.3", - "maxLength" : 64, - "type" : "string" - } - }, - "required" : [ "category", "created_at", "display_name", "free_rows_per_month", "kind", "logo", "name", "official", "release_stage", "short_description", "team_name", "tier", "updated_at", "usd_per_row" ], - "title" : "CloudQuery Plugin" - }, - "VersionName" : { - "description" : "The version in semantic version format.", - "pattern" : "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", - "type" : "string" - }, - "ListPlugin" : { - "allOf" : [ { - "$ref" : "#/components/schemas/Plugin" - }, { - "properties" : { - "latest_version" : { - "$ref" : "#/components/schemas/VersionName" - } - } - } ] - }, - "PluginReleaseStageCreate" : { - "default" : "coming-soon", - "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "enum" : [ "coming-soon", "preview", "ga" ], - "type" : "string" - }, - "PluginCreate" : { - "properties" : { - "team_name" : { - "$ref" : "#/components/schemas/TeamName" - }, - "kind" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "name" : { - "$ref" : "#/components/schemas/PluginName" - }, - "category" : { - "$ref" : "#/components/schemas/PluginCategory" - }, - "price_category" : { - "$ref" : "#/components/schemas/PluginPriceCategory" - }, - "tier" : { - "$ref" : "#/components/schemas/PluginTier" - }, - "display_name" : { - "description" : "The plugin's display name, as shown in the CloudQuery Hub.", - "example" : "AWS Source Plugin", - "maxLength" : 50, - "minLength" : 1, - "type" : "string" - }, - "short_description" : { - "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", - "example" : "Sync data from AWS to any destination", - "maxLength" : 512, - "minLength" : 1, - "type" : "string" - }, - "homepage" : { - "example" : "https://cloudquery.io", - "type" : "string" - }, - "public" : { - "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.", - "example" : true, - "type" : "boolean" - }, - "repository" : { - "example" : "https://github.com/cloudquery/cloudquery", - "type" : "string" - }, - "release_stage" : { - "$ref" : "#/components/schemas/PluginReleaseStageCreate" - }, - "logo" : { - "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", - "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", - "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", - "type" : "string" - }, - "usd_per_row" : { - "deprecated" : true, - "description" : "Deprecated. Use `price_category` instead.", - "example" : "0.00001", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "USDPerRow" - }, - "free_rows_per_month" : { - "deprecated" : true, - "description" : "Deprecated. Use `price_category` instead.", - "example" : 10000, - "format" : "int64", - "type" : "integer" - } - }, - "required" : [ "category", "display_name", "kind", "name", "public", "short_description", "team_name" ] - }, - "PluginReleaseStageUpdate" : { - "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", - "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], - "type" : "string" - }, - "PluginUpdate" : { - "properties" : { - "category" : { - "$ref" : "#/components/schemas/PluginCategory" - }, - "price_category" : { - "$ref" : "#/components/schemas/PluginPriceCategory" - }, - "tier" : { - "$ref" : "#/components/schemas/PluginTier" - }, - "display_name" : { - "description" : "The plugin's display name, as shown in the CloudQuery Hub.", - "example" : "AWS Source Plugin", - "maxLength" : 50, - "minLength" : 1, - "type" : "string" - }, - "short_description" : { - "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", - "example" : "Sync data from AWS to any destination", - "maxLength" : 512, - "minLength" : 1, - "type" : "string" - }, - "homepage" : { - "example" : "https://cloudquery.io", - "type" : "string" - }, - "repository" : { - "example" : "https://github.com/cloudquery/cloudquery", - "type" : "string" - }, - "logo" : { - "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", - "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f9e8", - "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", - "type" : "string" - }, - "public" : { - "description" : "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub.", - "type" : "boolean" - }, - "release_stage" : { - "$ref" : "#/components/schemas/PluginReleaseStageUpdate" - }, - "usd_per_row" : { - "deprecated" : true, - "description" : "Deprecated. Update `price_category` instead.", - "example" : "0.0001", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "USDPerRow" - }, - "free_rows_per_month" : { - "deprecated" : true, - "description" : "Deprecated. Update `price_category` instead.", - "example" : 1000, - "format" : "int64", - "type" : "integer" - } - } + "style" : "form" }, - "PluginPrice" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Price", - "properties" : { - "id" : { - "description" : "ID of the price change", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ID" - }, - "usd_per_row" : { - "description" : "The price per row in USD. This is used to calculate the price of a sync.", - "example" : "0.0001", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "USDPerRow" - }, - "free_rows_per_month" : { - "description" : "The number of rows that can be synced for free each month.", - "example" : 1000, - "format" : "int64", - "type" : "integer" - }, - "effective_from" : { - "description" : "The date and time the price came (or will come) into effect.", - "example" : "2024-01-02T00:00:00Z", - "format" : "date-time", - "type" : "string" - } + "team_name" : { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" }, - "required" : [ "effective_from", "free_rows_per_month", "id", "usd_per_row" ], - "title" : "CloudQuery Plugin Price" + "style" : "simple" }, - "PluginPriceCreate" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Price Create", - "properties" : { - "usd_per_row" : { - "description" : "The price per row in USD. This is used to calculate the price of a sync.", - "example" : "0.0001", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "USDPerRow" - }, - "free_rows_per_month" : { - "description" : "The number of rows that can be synced for free each month.", - "example" : 1000, - "format" : "int64", - "type" : "integer" - }, - "effective_from" : { - "description" : "The date and time the price came (or will come) into effect.", - "example" : "2024-01-02T00:00:00Z", - "format" : "date-time", - "type" : "string" - } + "version_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at" ], + "type" : "string" }, - "required" : [ "effective_from", "free_rows_per_month", "usd_per_row" ], - "title" : "CloudQuery Plugin Price Create" - }, - "VersionFilter" : { - "description" : "A version filter in semantic version format with prefix ranges.", - "pattern" : "^[^~]?v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", - "type" : "string" + "style" : "form" }, - "PluginProtocols" : { - "description" : "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", - "items" : { - "enum" : [ 3 ], - "type" : "integer" + "include_drafts" : { + "description" : "Whether to include draft versions", + "explode" : true, + "in" : "query", + "name" : "include_drafts", + "required" : false, + "schema" : { + "type" : "boolean" }, - "type" : "array" - }, - "PluginPackageType" : { - "description" : "The package type of the plugin assets", - "enum" : [ "native", "docker" ], - "type" : "string" + "style" : "form" }, - "PluginVersionBase" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Version", - "properties" : { - "created_at" : { - "description" : "The date and time the plugin version was created.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "published_at" : { - "description" : "The date and time the plugin version was set to non-draft (published).", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "name" : { - "$ref" : "#/components/schemas/VersionName" - }, - "message" : { - "description" : "Description of what's new or changed in this version (supports markdown)", - "example" : "- Added support for AWS S3 - Added support for AWS EC2", - "type" : "string" - }, - "draft" : { - "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", - "type" : "boolean" - }, - "retracted" : { - "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", - "type" : "boolean" - }, - "protocols" : { - "$ref" : "#/components/schemas/PluginProtocols" - }, - "supported_targets" : { - "description" : "The targets supported by this plugin version, formatted as _", - "example" : [ "linux_arm64", "darwin_amd64", "windows_amd64" ], - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "checksums" : { - "description" : "The checksums of the plugin assets", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "package_type" : { - "$ref" : "#/components/schemas/PluginPackageType" - } + "include_fips" : { + "description" : "Whether to include fips versions", + "explode" : true, + "in" : "query", + "name" : "include_fips", + "required" : false, + "schema" : { + "type" : "boolean" }, - "required" : [ "checksums", "created_at", "draft", "message", "name", "package_type", "protocols", "retracted", "supported_targets" ], - "title" : "CloudQuery Plugin Version" - }, - "PluginVersionList" : { - "allOf" : [ { - "$ref" : "#/components/schemas/PluginVersionBase" - } ] - }, - "PluginSpecJSONSchema" : { - "description" : "The specification of the plugin. This is a JSON schema that describes the configuration of the plugin.", - "type" : "string" - }, - "PluginVersion" : { - "allOf" : [ { - "$ref" : "#/components/schemas/PluginVersionBase" - }, { - "properties" : { - "spec_json_schema" : { - "$ref" : "#/components/schemas/PluginSpecJSONSchema" - }, - "connector_required" : { - "description" : "Whether a connector is required for this plugin version", - "type" : "boolean" - }, - "connector_types" : { - "description" : "List of connector types available for this plugin version", - "items" : { - "type" : "string" - }, - "type" : "array" - } - } - } ] - }, - "PluginVersionDetails" : { - "allOf" : [ { - "$ref" : "#/components/schemas/PluginVersion" - }, { - "properties" : { - "example_config" : { - "description" : "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format.", - "type" : "string" - }, - "ui_base_url" : { - "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", - "type" : "string", - "x-go-name" : "UIBaseURL" - }, - "ui_base_url_v2" : { - "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", - "type" : "string", - "x-go-name" : "UIBaseURLv2" - }, - "ui_id" : { - "description" : "ID of the plugin's UI.", - "format" : "uuid", - "type" : "string", - "x-go-name" : "UIID" - } - }, - "required" : [ "example_config" ] - } ] - }, - "PluginVersionUpdate" : { - "properties" : { - "message" : { - "description" : "Description of what's new or changed in this version (supports markdown)", - "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", - "type" : "string" - }, - "draft" : { - "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated.", - "type" : "boolean" - }, - "retracted" : { - "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", - "type" : "boolean" - }, - "protocols" : { - "$ref" : "#/components/schemas/PluginProtocols" - }, - "supported_targets" : { - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "checksums" : { - "description" : "The SHA-256 checksums of the plugin binaries, one per supported target.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "package_type" : { - "description" : "The package type of the plugin binaries", - "type" : "string" - }, - "spec_json_schema" : { - "$ref" : "#/components/schemas/PluginSpecJSONSchema" - } - } - }, - "PluginDocsPageName" : { - "description" : "The unique name for the plugin documentation page.", - "example" : "overview", - "maxLength" : 255, - "pattern" : "^[\\w,\\s-]+$", - "type" : "string" + "style" : "form" }, - "PluginDocsPage" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Documentation Page", - "properties" : { - "name" : { - "$ref" : "#/components/schemas/PluginDocsPageName" - }, - "content" : { - "description" : "The content of the documentation page. Supports markdown.", - "example" : "# Getting Started\n\nThis is the getting started page.", - "type" : "string" - } + "include_prereleases" : { + "description" : "Whether to include prerelease versions", + "explode" : true, + "in" : "query", + "name" : "include_prereleases", + "required" : false, + "schema" : { + "type" : "boolean" }, - "required" : [ "content", "name" ], - "title" : "CloudQuery Plugin Documentation Page" + "style" : "form" }, - "PluginDocsPageCreate" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Documentation Page", - "properties" : { - "name" : { - "$ref" : "#/components/schemas/PluginDocsPageName" - }, - "content" : { - "description" : "The content of the documentation page. Supports markdown.", - "example" : "# Getting Started\n\nThis is the getting started page.", - "minLength" : 1, - "type" : "string" - } + "version_filter" : { + "explode" : true, + "in" : "query", + "name" : "version_filter", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/VersionFilter" }, - "required" : [ "content", "name" ], - "title" : "CloudQuery Plugin Documentation Page" - }, - "PluginTableName" : { - "description" : "Name of the table", - "example" : "aws_ec2_instances", - "maxLength" : 255, - "pattern" : "^[a-z](_?[a-z0-9]+)+$", - "type" : "string" + "style" : "form" }, - "PluginTable" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Table", - "properties" : { - "description" : { - "description" : "Description of the table", - "example" : "AWS S3 Buckets", - "type" : "string" - }, - "is_incremental" : { - "description" : "Whether the table is incremental", - "type" : "boolean" - }, - "name" : { - "$ref" : "#/components/schemas/PluginTableName" - }, - "parent" : { - "description" : "Name of the parent table, if any", - "example" : "nil", - "type" : "string" - }, - "relations" : { - "description" : "Names of the tables that depend on this table", - "example" : [ "aws_s3_bucket_cors_rules" ], - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "title" : { - "description" : "Title of the table", - "example" : "AWS S3 Buckets", - "type" : "string" - }, - "is_paid" : { - "description" : "Whether the table is paid", - "type" : "boolean" - } + "version_name" : { + "explode" : false, + "in" : "path", + "name" : "version_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/VersionName" }, - "required" : [ "description", "is_incremental", "name", "relations", "title" ], - "title" : "CloudQuery Plugin Table" + "style" : "simple" }, - "PluginTableColumn" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Column", - "properties" : { - "description" : { - "description" : "Description of the column", - "type" : "string" - }, - "incremental_key" : { - "description" : "Whether the column is used as an incremental key", - "type" : "boolean" - }, - "name" : { - "description" : "Name of the column", - "type" : "string" - }, - "not_null" : { - "description" : "Whether the column is nullable", - "type" : "boolean" - }, - "primary_key" : { - "description" : "Whether the column is part of the primary key", - "type" : "boolean" - }, - "type" : { - "description" : "Arrow Type of the column", - "type" : "string" - }, - "type_schema" : { - "description" : "For columns of type JSON, the schema of the JSON object", - "type" : "string" - }, - "unique" : { - "description" : "Whether the column has a unique constraint", - "type" : "boolean" - } + "target_name" : { + "explode" : false, + "in" : "path", + "name" : "target_name", + "required" : true, + "schema" : { + "type" : "string" }, - "required" : [ "description", "incremental_key", "name", "not_null", "primary_key", "type", "unique" ], - "title" : "CloudQuery Plugin Table Column" + "style" : "simple" }, - "PluginTableCreate" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Table", - "properties" : { - "description" : { - "description" : "Description of the table", - "example" : "AWS S3 Buckets", - "type" : "string" - }, - "is_incremental" : { - "description" : "Whether the table is incremental", - "type" : "boolean" - }, - "name" : { - "$ref" : "#/components/schemas/PluginTableName" - }, - "parent" : { - "description" : "Name of the parent table, if any", - "example" : "nil", - "type" : "string" - }, - "relations" : { - "description" : "Names of the tables that depend on this table", - "example" : [ "aws_s3_bucket_cors_rules" ], - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "permissions_needed" : { - "description" : "List of permissions needed to access this table, if any", - "example" : [ "storage.buckets.list" ], - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "sensitive_columns" : { - "description" : "List of columns within this table that can contain sensitive/secret data", - "example" : [ "secret_key" ], - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "title" : { - "description" : "Title of the table", - "example" : "AWS S3 Buckets", - "type" : "string" - }, - "is_paid" : { - "description" : "Whether the table is paid", - "type" : "boolean" - }, - "columns" : { - "items" : { - "$ref" : "#/components/schemas/PluginTableColumn" - }, - "type" : "array" - } + "addon_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at", "updated_at", "name", "downloads" ], + "type" : "string" }, - "required" : [ "name" ], - "title" : "CloudQuery Plugin Table" + "style" : "form" }, - "PluginTableDetails" : { - "additionalProperties" : false, - "properties" : { - "columns" : { - "description" : "List of columns", - "items" : { - "$ref" : "#/components/schemas/PluginTableColumn" - }, - "type" : "array" - }, - "description" : { - "description" : "Description of the table", - "type" : "string" - }, - "is_incremental" : { - "description" : "Whether the table is incremental", - "type" : "boolean" - }, - "name" : { - "description" : "Name of the table", - "type" : "string" - }, - "parent" : { - "description" : "Name of the parent table, if any", - "type" : "string" - }, - "relations" : { - "description" : "Names of the tables that depend on this table", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "title" : { - "description" : "Title of the table", - "type" : "string" - }, - "is_paid" : { - "description" : "Whether the table is paid", - "type" : "boolean" - }, - "permissions_needed" : { - "description" : "List of permissions needed to access this table, if any", - "example" : [ "storage.buckets.list" ], - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "sensitive_columns" : { - "description" : "List of columns within this table that can contain sensitive/secret data", - "example" : [ "secret_key" ], - "items" : { - "type" : "string" - }, - "type" : "array" - } + "addon_type" : { + "explode" : false, + "in" : "path", + "name" : "addon_type", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonType" }, - "required" : [ "columns", "description", "is_incremental", "name", "permissions_needed", "relations", "title" ] + "style" : "simple" }, - "PluginAsset" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin Asset", - "properties" : { - "checksum" : { - "description" : "The checksum of the plugin asset", - "type" : "string" - }, - "location" : { - "description" : "The location to download the plugin asset from", - "format" : "uri", - "type" : "string" - } + "addon_name" : { + "explode" : false, + "in" : "path", + "name" : "addon_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonName" }, - "required" : [ "checksum", "location" ], - "title" : "CloudQuery Plugin Asset" + "style" : "simple" }, - "ReleaseURL" : { - "properties" : { - "url" : { - "type" : "string" - } + "include_private" : { + "description" : "Whether to include private plugins", + "explode" : true, + "in" : "query", + "name" : "include_private", + "required" : false, + "schema" : { + "type" : "boolean" }, - "required" : [ "url" ] + "style" : "form" }, - "PluginUIAssetUploadRequest" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin UI Asset Upload Request", - "properties" : { - "name" : { - "description" : "The path and name of the asset", - "example" : "scripts/main.js", - "type" : "string" - }, - "content_type" : { - "description" : "Content-type of the asset", - "example" : "application/json", - "type" : "string" - } + "addon_order_id" : { + "explode" : false, + "in" : "path", + "name" : "addon_order_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonOrderID" }, - "required" : [ "name" ], - "title" : "CloudQuery Plugin UI Asset Upload Request" + "style" : "simple", + "x-go-name" : "AddonOrderID" }, - "PluginUIAsset" : { - "additionalProperties" : false, - "description" : "CloudQuery Plugin UI Asset", - "properties" : { - "name" : { - "description" : "The path and name of the asset", - "type" : "string" - }, - "upload_url" : { - "description" : "URL to upload the asset to", - "type" : "string", - "x-go-name" : "UploadURL" - } + "email_basic" : { + "explode" : false, + "in" : "path", + "name" : "email", + "required" : true, + "schema" : { + "example" : "user@example.com", + "type" : "string" }, - "required" : [ "name", "upload_url" ], - "title" : "CloudQuery Plugin UI Asset" + "style" : "simple" }, - "AddonName" : { - "description" : "The unique name for the addon.", - "example" : "aws-policy", - "maxLength" : 255, - "pattern" : "^[a-z](-?[a-z0-9]+)+$", - "type" : "string" + "addon_team" : { + "explode" : false, + "in" : "path", + "name" : "addon_team", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" + }, + "style" : "simple" }, - "AddonCategory" : { - "description" : "Supported categories for addons", - "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "other" ], - "type" : "string" + "team_subscription_order_id" : { + "explode" : false, + "in" : "path", + "name" : "subscription_order_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + }, + "style" : "simple", + "x-go-name" : "TeamSubscriptionOrderID" }, - "AddonType" : { - "description" : "Supported types for addons", - "enum" : [ "transformation", "visualization" ], - "type" : "string" + "user_id" : { + "explode" : false, + "in" : "path", + "name" : "user_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/UserID" + }, + "style" : "simple", + "x-go-name" : "UserID" }, - "AddonFormat" : { - "description" : "Supported formats for addons", - "enum" : [ "zip" ], - "type" : "string" + "apikey_id" : { + "explode" : false, + "in" : "path", + "name" : "apikey_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/APIKeyID" + }, + "style" : "simple", + "x-go-name" : "APIKeyID" }, - "AddonTier" : { - "description" : "Supported tiers for addons", - "enum" : [ "free", "paid" ], - "type" : "string" + "managed_database_id" : { + "explode" : false, + "in" : "path", + "name" : "managed_database_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabaseID" + }, + "style" : "simple", + "x-go-name" : "ManagedDatabaseID" + } + }, + "responses" : { + "InternalError" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Internal Error" }, - "Addon" : { - "additionalProperties" : false, - "description" : "CloudQuery Addon", - "properties" : { - "team_name" : { - "$ref" : "#/components/schemas/TeamName" - }, - "name" : { - "$ref" : "#/components/schemas/AddonName" - }, - "official" : { - "description" : "True if the addon is maintained by CloudQuery, false otherwise", - "type" : "boolean" - }, - "category" : { - "$ref" : "#/components/schemas/AddonCategory" - }, - "addon_type" : { - "$ref" : "#/components/schemas/AddonType" - }, - "addon_format" : { - "$ref" : "#/components/schemas/AddonFormat" - }, - "tier" : { - "$ref" : "#/components/schemas/AddonTier" - }, - "price_usd" : { - "description" : "The price for 6 months", - "example" : "50", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "PriceUSD" - }, - "short_description" : { - "example" : "AWS Asset inventory dashboard for grafana", - "maxLength" : 512, - "minLength" : 1, - "type" : "string" - }, - "display_name" : { - "description" : "The addon's display name", - "example" : "AWS Asset inventory", - "maxLength" : 50, - "minLength" : 1, - "type" : "string" - }, - "homepage" : { - "example" : "https://cloudquery.io", - "type" : "string" - }, - "repository" : { - "example" : "https://github.com/cloudquery/cloudquery", - "type" : "string" - }, - "logo" : { - "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", - "type" : "string" - }, - "public" : { - "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type" : "boolean" - }, - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" + "RequiresAuthentication" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } } }, - "required" : [ "addon_format", "addon_type", "category", "created_at", "display_name", "logo", "name", "official", "price_usd", "short_description", "team_name", "tier", "updated_at" ], - "title" : "CloudQuery Addon" + "description" : "Requires authentication" }, - "ListAddon" : { - "allOf" : [ { - "$ref" : "#/components/schemas/Addon" - }, { - "properties" : { - "latest_version" : { - "$ref" : "#/components/schemas/VersionName" + "BadRequest" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" } } - } ] + }, + "description" : "Bad request" }, - "AddonCreate" : { - "additionalProperties" : false, - "description" : "CloudQuery AddonCreate", - "properties" : { - "team_name" : { - "$ref" : "#/components/schemas/TeamName" - }, - "name" : { - "$ref" : "#/components/schemas/AddonName" - }, - "category" : { - "$ref" : "#/components/schemas/AddonCategory" - }, - "addon_type" : { - "$ref" : "#/components/schemas/AddonType" - }, - "addon_format" : { - "$ref" : "#/components/schemas/AddonFormat" - }, - "tier" : { - "$ref" : "#/components/schemas/AddonTier" - }, - "price_usd" : { - "description" : "The price for 6 months", - "example" : "50", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "PriceUSD" - }, - "short_description" : { - "example" : "AWS Asset inventory dashboard for grafana", - "maxLength" : 512, - "minLength" : 1, - "type" : "string" - }, - "display_name" : { - "description" : "The addon's display name", - "example" : "AWS Asset inventory", - "maxLength" : 50, - "minLength" : 1, - "type" : "string" - }, - "homepage" : { - "example" : "https://cloudquery.io", - "type" : "string" - }, - "repository" : { - "example" : "https://github.com/cloudquery/cloudquery", - "type" : "string" - }, - "logo" : { - "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", - "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", - "type" : "string" - }, - "public" : { - "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type" : "boolean" + "Forbidden" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" + } } }, - "required" : [ "addon_format", "addon_type", "category", "display_name", "name", "public", "short_description", "team_name", "tier" ], - "title" : "CloudQuery Addon" + "description" : "Forbidden" }, - "AddonUpdate" : { - "additionalProperties" : false, - "description" : "CloudQuery AddonUpdate", - "properties" : { - "category" : { - "$ref" : "#/components/schemas/AddonCategory" - }, - "addon_format" : { - "$ref" : "#/components/schemas/AddonFormat" - }, - "tier" : { - "$ref" : "#/components/schemas/AddonTier" - }, - "price_usd" : { - "description" : "The price for 6 months in USD", - "example" : "50", - "pattern" : "^\\d+(?:\\.\\d{1,10})?$", - "type" : "string", - "x-go-name" : "PriceUSD" - }, - "short_description" : { - "example" : "AWS Asset inventory dashboard for grafana", - "maxLength" : 512, - "minLength" : 1, - "type" : "string" - }, - "display_name" : { - "description" : "The addon's display name", - "example" : "AWS Asset inventory", - "maxLength" : 50, - "minLength" : 1, - "type" : "string" - }, - "homepage" : { - "example" : "https://cloudquery.io", - "type" : "string" - }, - "repository" : { - "example" : "https://github.com/cloudquery/cloudquery", - "type" : "string" - }, - "logo" : { - "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", - "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", - "type" : "string" - }, - "public" : { - "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", - "type" : "boolean" - }, - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" + "NotFound" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } } }, - "title" : "CloudQuery Addon" + "description" : "Resource not found" }, - "AddonVersion" : { - "additionalProperties" : false, - "description" : "CloudQuery Addon Version", - "properties" : { - "created_at" : { - "description" : "The date and time the plugin version was created.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "published_at" : { - "description" : "The date and time the plugin version was set to non-draft (published).", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "name" : { - "$ref" : "#/components/schemas/VersionName" - }, - "message" : { - "description" : "Description of what's new or changed in this version (supports markdown)", - "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", - "type" : "string" - }, - "doc" : { - "description" : "Main README in MD format", - "type" : "string" - }, - "draft" : { - "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", - "type" : "boolean" - }, - "plugin_deps" : { - "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "addon_deps" : { - "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "retracted" : { - "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", - "type" : "boolean" - }, - "checksum" : { - "description" : "The checksum of the addon asset", - "type" : "string" + "UnprocessableEntity" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" + } } }, - "required" : [ "checksum", "created_at", "doc", "draft", "message", "name", "retracted" ], - "title" : "CloudQuery Addon Version" + "description" : "UnprocessableEntity" }, - "AddonVersionUpdate" : { + "TooManyRequests" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Too Many Requests" + }, + "ServiceUnavailable" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Service unavailable" + }, + "MethodNotAllowed" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Method not allowed" + }, + "DockerError" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DockerError" + } + } + }, + "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry" + }, + "Conflict" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Conflict" + } + }, + "schemas" : { + "BasicError" : { + "additionalProperties" : false, + "description" : "Basic Error", "properties" : { "message" : { - "description" : "Description of what's new or changed in this version (supports markdown)", - "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", - "type" : "string" - }, - "doc" : { - "description" : "Main README in MD format", "type" : "string" }, - "draft" : { - "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", - "type" : "boolean" - }, - "plugin_deps" : { - "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "addon_deps" : { - "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "retracted" : { - "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", - "type" : "boolean" - }, - "checksum" : { - "description" : "The checksum of the addon asset", - "type" : "string" + "status" : { + "type" : "integer" } - } + }, + "required" : [ "message", "status" ], + "title" : "Basic Error" }, - "AddonAsset" : { - "additionalProperties" : false, - "description" : "CloudQuery Addon Asset", + "ContentType" : { + "description" : "The HTTP Content-Type of the image or asset", + "enum" : [ "image/jpeg", "image/png", "image/webp" ], + "example" : "image/png", + "type" : "string" + }, + "ImageURL" : { "properties" : { - "checksum" : { - "description" : "The checksum of the addon asset", + "upload_url" : { + "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", "type" : "string" }, - "location" : { - "description" : "The location to download the addon asset from", - "format" : "uri", + "download_url" : { + "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", "type" : "string" + }, + "required_headers" : { + "additionalProperties" : { + "items" : { + "type" : "string" + } + }, + "description" : "Required HTTP headers to include for the upload" } }, - "required" : [ "checksum", "location" ], - "title" : "CloudQuery Addon Asset" + "required" : [ "download_url", "required_headers", "upload_url" ] }, - "TeamPlan" : { - "description" : "The plan the team is on (trial is deprecated)", - "enum" : [ "free", "paid", "enterprise", "trial" ], + "TeamName" : { + "description" : "The unique name for the team.", + "example" : "cloudquery", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", "type" : "string" }, - "Team" : { + "PluginKind" : { + "description" : "The kind of plugin, ie. source or destination.", + "enum" : [ "source", "destination", "transformer" ], + "example" : "source", + "type" : "string" + }, + "PluginName" : { + "description" : "The unique name for the plugin.", + "example" : "aws-source", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginNotificationRequestStatus" : { + "default" : "pending", + "description" : "Status of a plugin notification request", + "enum" : [ "pending", "sent" ], + "type" : "string" + }, + "PluginNotificationRequest" : { "additionalProperties" : false, - "description" : "CloudQuery Team", + "description" : "Plugin Notification Request", "properties" : { - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "name" : { + "plugin_team" : { "$ref" : "#/components/schemas/TeamName" }, - "plan" : { - "$ref" : "#/components/schemas/TeamPlan" + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" }, - "plan_end_time" : { + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "created_at" : { "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "is_trial_active" : { - "example" : false, - "type" : "boolean" - }, - "trial_end_time" : { + "sent_at" : { "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "display_name" : { - "description" : "The team's display name", - "example" : "CloudQuery", - "maxLength" : 255, - "type" : "string" - }, - "internal" : { - "example" : false, - "type" : "boolean" + "status" : { + "$ref" : "#/components/schemas/PluginNotificationRequestStatus" } }, - "required" : [ "display_name", "internal", "is_trial_active", "name", "plan" ], - "title" : "Team" + "required" : [ "created_at", "plugin_kind", "plugin_name", "plugin_team" ] }, - "TeamImageCreate" : { - "additionalProperties" : false, + "ListMetadata" : { "properties" : { - "name" : { - "description" : "Name of image", - "maxLength" : 64, - "minLength" : 1, - "type" : "string" + "total_count" : { + "type" : "integer" }, - "checksum" : { - "description" : "SHA1 checksum of image", - "maxLength" : 40, - "minLength" : 40, - "pattern" : "^[a-f0-9]+$", - "type" : "string" + "last_page" : { + "type" : "integer" }, - "content_type" : { - "$ref" : "#/components/schemas/ContentType" + "page_size" : { + "type" : "integer" + }, + "time_ms" : { + "type" : "integer" } }, - "required" : [ "checksum", "content_type", "name" ], - "title" : "Create Team Image Request" + "required" : [ "page_size" ] }, - "TeamImage" : { + "PluginNotificationRequestCreate" : { + "additionalProperties" : false, + "description" : "Create a Plugin Notification Request", "properties" : { - "name" : { - "description" : "Name of image", - "type" : "string" - }, - "checksum" : { - "description" : "SHA1 checksum of image", - "type" : "string" - }, - "url" : { - "description" : "URL to download image", - "type" : "string", - "x-go-name" : "URL" + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" }, - "upload_url" : { - "description" : "URL to upload image", - "type" : "string", - "x-go-name" : "UploadURL" + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" }, - "required_headers" : { - "additionalProperties" : { + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] + }, + "FieldError" : { + "allOf" : [ { + "$ref" : "#/components/schemas/BasicError" + }, { + "properties" : { + "errors" : { "items" : { "type" : "string" - } + }, + "type" : "array" }, - "description" : "Required HTTP headers to include for the upload" + "field_errors" : { + "additionalProperties" : { + "type" : "string" + } + } } - }, - "required" : [ "checksum", "name", "required_headers", "url" ] + } ] }, - "AddonOrderID" : { - "description" : "ID of the addon order", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "AddonOrderID" + "PluginReleaseStage" : { + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], + "type" : "string" }, - "AddonOrderStatus" : { - "enum" : [ "pending", "completed", "cancelled" ], + "PluginCategory" : { + "description" : "Supported categories for plugins", + "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "finance", "customer-support", "other" ], "type" : "string" }, - "AddonOrder" : { + "PluginPriceCategory" : { + "description" : "Supported price categories for billing", + "enum" : [ "api", "database", "free" ], + "type" : "string" + }, + "PluginTier" : { + "deprecated" : true, + "description" : "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", + "enum" : [ "free", "paid", "open-core" ], + "type" : "string" + }, + "Plugin" : { "additionalProperties" : false, - "description" : "CloudQuery Addon Order", + "description" : "CloudQuery Plugin", "properties" : { - "id" : { - "$ref" : "#/components/schemas/AddonOrderID" - }, "team_name" : { "$ref" : "#/components/schemas/TeamName" }, - "addon_team" : { - "$ref" : "#/components/schemas/TeamName" + "name" : { + "$ref" : "#/components/schemas/PluginName" }, - "addon_type" : { - "$ref" : "#/components/schemas/AddonType" + "kind" : { + "$ref" : "#/components/schemas/PluginKind" }, - "addon_name" : { - "$ref" : "#/components/schemas/AddonName" + "category" : { + "$ref" : "#/components/schemas/PluginCategory" }, - "status" : { - "$ref" : "#/components/schemas/AddonOrderStatus" + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" }, "created_at" : { "example" : "2017-07-14T16:53:42Z", @@ -9053,1940 +5682,2022 @@ "format" : "date-time", "type" : "string" }, - "completed_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "homepage" : { + "example" : "https://cloudquery.io", "type" : "string" }, - "completion_url" : { - "description" : "Stripe URL for completing purchase. Only shown in response to POST request.", - "format" : "uri", - "type" : "string", - "x-go-name" : "CompletionURL" - } - }, - "required" : [ "addon_name", "addon_team", "addon_type", "created_at", "id", "status", "team_name", "updated_at" ], - "title" : "CloudQuery Addon" - }, - "AddonOrderCreate" : { - "additionalProperties" : false, - "description" : "Create CloudQuery Addon Order", - "properties" : { - "addon_team" : { - "$ref" : "#/components/schemas/TeamName" + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "type" : "string" }, - "addon_type" : { - "$ref" : "#/components/schemas/AddonType" + "display_name" : { + "description" : "The plugin's display name", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" }, - "addon_name" : { - "$ref" : "#/components/schemas/AddonName" + "official" : { + "description" : "True if the plugin is maintained by CloudQuery, false otherwise", + "type" : "boolean" }, - "success_url" : { - "description" : "URL to redirect to after successful order completion", - "example" : "https://cloud.cloudquery.io/order-completion", + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStage" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", "type" : "string" }, - "cancel_url" : { - "description" : "URL to redirect to after order cancellation", - "example" : "https://cloud.cloudquery.io/order-cancelled", + "short_description" : { + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "tier" : { + "$ref" : "#/components/schemas/PluginTier" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Refer to `price_category` instead.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Refer to `price_category` instead.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "minimum_cloud_version" : { + "description" : "Minimum plugin version that is supported in CloudQuery managed syncs.", + "example" : "v1.2.3", + "maxLength" : 64, "type" : "string" } }, - "required" : [ "addon_name", "addon_team", "addon_type", "cancel_url", "success_url" ], - "title" : "Create CloudQuery Addon Order" + "required" : [ "category", "created_at", "display_name", "free_rows_per_month", "kind", "logo", "name", "official", "release_stage", "short_description", "team_name", "tier", "updated_at", "usd_per_row" ], + "title" : "CloudQuery Plugin" }, - "UserName" : { - "description" : "The unique name for the user.", - "example" : "Sarah O'Connor", - "maxLength" : 255, - "minLength" : 1, - "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", + "VersionName" : { + "description" : "The version in semantic version format.", + "pattern" : "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", "type" : "string" }, - "UserOnboarded" : { - "description" : "Whether the user has completed onboarding", - "type" : "boolean" + "ListPlugin" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Plugin" + }, { + "properties" : { + "latest_version" : { + "$ref" : "#/components/schemas/VersionName" + } + } + } ] }, - "User" : { - "additionalProperties" : false, - "description" : "CloudQuery User", + "PluginReleaseStageCreate" : { + "default" : "coming-soon", + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga" ], + "type" : "string" + }, + "PluginCreate" : { "properties" : { - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "id" : { - "description" : "ID of the User", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ID" + "team_name" : { + "$ref" : "#/components/schemas/TeamName" }, - "email" : { - "example" : "user@example.com", - "type" : "string" + "kind" : { + "$ref" : "#/components/schemas/PluginKind" }, "name" : { - "$ref" : "#/components/schemas/UserName" - }, - "onboarded" : { - "$ref" : "#/components/schemas/UserOnboarded" + "$ref" : "#/components/schemas/PluginName" }, - "updated_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" + "category" : { + "$ref" : "#/components/schemas/PluginCategory" }, - "profile_image_url" : { - "description" : "Profile image URL of user", - "type" : "string", - "x-go-name" : "ProfileImageURL" - } - }, - "required" : [ "email", "id" ], - "title" : "CloudQuery User" - }, - "MembershipWithUser" : { - "additionalProperties" : false, - "properties" : { - "role" : { - "example" : "admin", - "type" : "string" + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" }, - "user" : { - "$ref" : "#/components/schemas/User" - } - }, - "required" : [ "role", "user" ], - "title" : "CloudQuery User Membership" - }, - "SpendingLimit" : { - "additionalProperties" : false, - "description" : "A configurable spending limit for the team. Empty values indicate no limit.", - "properties" : { - "created_at" : { - "description" : "The date and time the team limit was created.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" + "tier" : { + "$ref" : "#/components/schemas/PluginTier" }, - "updated_at" : { - "description" : "The date and time the team limit was last updated.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "display_name" : { + "description" : "The plugin's display name, as shown in the CloudQuery Hub.", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, "type" : "string" }, - "usd" : { - "description" : "The maximum USD amount the team is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "title" : "Team Spending Limit" - }, - "SpendingLimitUpdate" : { - "additionalProperties" : false, - "description" : "A configurable spending limit for the team.", - "properties" : { - "usd" : { - "description" : "The maximum USD amount the team is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "required" : [ "usd" ], - "title" : "Team Spending Limit" - }, - "SpendingLimitCreate" : { - "additionalProperties" : false, - "description" : "A configurable monthly limit for team usage.", - "properties" : { - "usd" : { - "description" : "The maximum USD amount the team is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "required" : [ "usd" ], - "title" : "Team Spending Limit" - }, - "Invoice" : { - "additionalProperties" : false, - "description" : "Invoice details", - "properties" : { - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "short_description" : { + "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, "type" : "string" }, - "amount_due" : { - "description" : "Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due.", - "example" : 1000, - "format" : "int64", - "type" : "integer" + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" }, - "currency" : { - "example" : "usd", + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.", + "example" : true, + "type" : "boolean" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", "type" : "string" }, - "invoice_pdf" : { - "description" : "The link to download the PDF for the invoice.", - "format" : "uri", + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStageCreate" + }, + "logo" : { + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", + "type" : "string" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Use `price_category` instead.", + "example" : "0.00001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", "type" : "string", - "x-go-name" : "InvoicePDF" + "x-go-name" : "USDPerRow" }, - "paid" : { - "description" : "Whether or not payment was successfully collected for this invoice.", - "example" : true, - "type" : "boolean" + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Use `price_category` instead.", + "example" : 10000, + "format" : "int64", + "type" : "integer" } }, - "required" : [ "amount_due", "created_at", "currency", "invoice_pdf", "paid" ], - "title" : "Invoice" + "required" : [ "category", "display_name", "kind", "name", "public", "short_description", "team_name" ] }, - "UsageCurrent" : { - "additionalProperties" : false, - "description" : "The usage of a plugin within the current calendar month.", + "PluginReleaseStageUpdate" : { + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], + "type" : "string" + }, + "PluginUpdate" : { "properties" : { - "plugin_team" : { - "$ref" : "#/components/schemas/TeamName" + "category" : { + "$ref" : "#/components/schemas/PluginCategory" }, - "plugin_kind" : { - "$ref" : "#/components/schemas/PluginKind" + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" }, - "plugin_name" : { - "$ref" : "#/components/schemas/PluginName" + "tier" : { + "$ref" : "#/components/schemas/PluginTier" }, - "rows" : { - "description" : "The number of rows used by the plugin in the calendar month.", - "example" : 1000000, - "format" : "int64", - "minimum" : 0, - "type" : "integer" + "display_name" : { + "description" : "The plugin's display name, as shown in the CloudQuery Hub.", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" }, - "usd" : { - "deprecated" : true, - "description" : "The USD amount used by the plugin in the calendar month, rounded to two decimal places.", - "example" : "43.95", - "type" : "string", - "x-go-name" : "USD" + "short_description" : { + "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" }, - "remaining_usd" : { + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f9e8", + "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", + "type" : "string" + }, + "public" : { + "description" : "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub.", + "type" : "boolean" + }, + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStageUpdate" + }, + "usd_per_row" : { "deprecated" : true, - "description" : "The remaining USD amount in the plugin's quota for the calendar month.", - "example" : "56.05", + "description" : "Deprecated. Update `price_category` instead.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", "type" : "string", - "x-go-name" : "RemainingUSD" + "x-go-name" : "USDPerRow" }, - "remaining_rows" : { + "free_rows_per_month" : { "deprecated" : true, - "description" : "Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows.", - "example" : 1, + "description" : "Deprecated. Update `price_category` instead.", + "example" : 1000, "format" : "int64", - "minimum" : 0, "type" : "integer" } - }, - "required" : [ "plugin_kind", "plugin_name", "plugin_team", "rows", "usd" ], - "title" : "CloudQuery Plugin Usage" + } }, - "UsageIncrease" : { + "PluginPrice" : { "additionalProperties" : false, - "description" : "Increase the usage of a plugin. This can incur billing costs and should be used only by plugins.", + "description" : "CloudQuery Plugin Price", "properties" : { - "plugin_team" : { - "$ref" : "#/components/schemas/TeamName" - }, - "plugin_kind" : { - "$ref" : "#/components/schemas/PluginKind" - }, - "plugin_name" : { - "$ref" : "#/components/schemas/PluginName" + "id" : { + "description" : "ID of the price change", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" }, - "tables" : { - "items" : { - "$ref" : "#/components/schemas/UsageIncrease_tables_inner" - }, - "type" : "array" + "usd_per_row" : { + "description" : "The price per row in USD. This is used to calculate the price of a sync.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" }, - "rows" : { - "description" : "The total number of additional rows used by the plugin.", - "example" : 1000000, - "minimum" : 0, + "free_rows_per_month" : { + "description" : "The number of rows that can be synced for free each month.", + "example" : 1000, + "format" : "int64", "type" : "integer" }, - "request_id" : { - "description" : "A unique ID associated with the usage increase.", - "example" : "123e4567-e89b-12d3-a456-426614174000", - "format" : "uuid", + "effective_from" : { + "description" : "The date and time the price came (or will come) into effect.", + "example" : "2024-01-02T00:00:00Z", + "format" : "date-time", "type" : "string" - }, - "installation_id" : { - "description" : "Installation ID associated with the platform, for platform syncs.", - "pattern" : "^[a-z0-9]{64}$", - "type" : "string", - "x-go-name" : "InstallationID" } }, - "required" : [ "plugin_kind", "plugin_name", "plugin_team", "request_id", "rows" ], - "title" : "CloudQuery Plugin Usage Increase" + "required" : [ "effective_from", "free_rows_per_month", "id", "usd_per_row" ], + "title" : "CloudQuery Plugin Price" }, - "UsageSummaryGroup" : { - "description" : "A usage summary group.", + "PluginPriceCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Price Create", "properties" : { - "name" : { - "description" : "The name of the group.", - "example" : "plugin", - "type" : "string" + "usd_per_row" : { + "description" : "The price per row in USD. This is used to calculate the price of a sync.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" }, - "value" : { - "description" : "The value of the group at this index.", - "example" : "cloudquery/source/aws", + "free_rows_per_month" : { + "description" : "The number of rows that can be synced for free each month.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "effective_from" : { + "description" : "The date and time the price came (or will come) into effect.", + "example" : "2024-01-02T00:00:00Z", + "format" : "date-time", "type" : "string" } }, - "required" : [ "name", "value" ], - "title" : "CloudQuery Usage Summary Group" + "required" : [ "effective_from", "free_rows_per_month", "usd_per_row" ], + "title" : "CloudQuery Plugin Price Create" }, - "UsageSummaryValue" : { - "description" : "A usage summary value.", + "VersionFilter" : { + "description" : "A version filter in semantic version format with prefix ranges.", + "pattern" : "^[^~]?v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", + "type" : "string" + }, + "PluginProtocols" : { + "description" : "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", + "items" : { + "enum" : [ 3 ], + "type" : "integer" + }, + "type" : "array" + }, + "PluginPackageType" : { + "description" : "The package type of the plugin assets", + "enum" : [ "native", "docker" ], + "type" : "string" + }, + "PluginVersionBase" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Version", "properties" : { - "timestamp" : { - "description" : "The timestamp marking the start of a period.", + "created_at" : { + "description" : "The date and time the plugin version was created.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "published_at" : { + "description" : "The date and time the plugin version was set to non-draft (published).", + "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "paid_rows" : { - "description" : "The paid rows that were synced in this period, one per group.", + "name" : { + "$ref" : "#/components/schemas/VersionName" + }, + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for AWS S3 - Added support for AWS EC2", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" + }, + "supported_targets" : { + "description" : "The targets supported by this plugin version, formatted as _", + "example" : [ "linux_arm64", "darwin_amd64", "windows_amd64" ], "items" : { - "format" : "int64", - "type" : "integer" + "type" : "string" }, "type" : "array" }, - "cloud_vcpu_seconds" : { - "description" : "vCPU/seconds consumed in this period, one per group.", + "checksums" : { + "description" : "The checksums of the plugin assets", "items" : { - "format" : "int64", - "type" : "integer" + "type" : "string" }, "type" : "array" }, - "cloud_vram_byte_seconds" : { - "description" : "vRAM/byte-seconds consumed in this period, one per group.", + "package_type" : { + "$ref" : "#/components/schemas/PluginPackageType" + } + }, + "required" : [ "checksums", "created_at", "draft", "message", "name", "package_type", "protocols", "retracted", "supported_targets" ], + "title" : "CloudQuery Plugin Version" + }, + "PluginVersionList" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersionBase" + } ] + }, + "PluginSpecJSONSchema" : { + "description" : "The specification of the plugin. This is a JSON schema that describes the configuration of the plugin.", + "type" : "string" + }, + "PluginVersion" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersionBase" + }, { + "properties" : { + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" + }, + "connector_required" : { + "description" : "Whether a connector is required for this plugin version", + "type" : "boolean" + }, + "connector_types" : { + "description" : "List of connector types available for this plugin version", + "items" : { + "type" : "string" + }, + "type" : "array" + } + } + } ] + }, + "PluginVersionDetails" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersion" + }, { + "properties" : { + "example_config" : { + "description" : "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format.", + "type" : "string" + }, + "ui_base_url" : { + "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", + "type" : "string", + "x-go-name" : "UIBaseURL" + }, + "ui_base_url_v2" : { + "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", + "type" : "string", + "x-go-name" : "UIBaseURLv2" + }, + "ui_id" : { + "description" : "ID of the plugin's UI.", + "format" : "uuid", + "type" : "string", + "x-go-name" : "UIID" + } + }, + "required" : [ "example_config" ] + } ] + }, + "PluginVersionUpdate" : { + "properties" : { + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated.", + "type" : "boolean" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" + }, + "supported_targets" : { "items" : { - "format" : "int64", - "type" : "integer" + "type" : "string" }, "type" : "array" }, - "cloud_egress_bytes" : { - "description" : "Egress bytes consumed in this period, one per group.", + "checksums" : { + "description" : "The SHA-256 checksums of the plugin binaries, one per supported target.", "items" : { - "format" : "int64", - "type" : "integer" + "type" : "string" }, "type" : "array" + }, + "package_type" : { + "description" : "The package type of the plugin binaries", + "type" : "string" + }, + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" } - }, - "required" : [ "timestamp" ], - "title" : "CloudQuery Usage Summary Value" + } }, - "UsageSummary" : { - "additionalProperties" : { }, - "description" : "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "PluginDocsPageName" : { + "description" : "The unique name for the plugin documentation page.", + "example" : "overview", + "maxLength" : 255, + "pattern" : "^[\\w,\\s-]+$", + "type" : "string" + }, + "PluginDocsPage" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Documentation Page", "properties" : { - "groups" : { - "description" : "The groups of the usage summary. Every group will have a corresponding value at the same index in the values array.", - "example" : [ { - "name" : "plugin", - "value" : "cloudquery/source/aws" - }, { - "name" : "plugin", - "value" : "cloudquery/source/gcp" - } ], - "items" : { - "$ref" : "#/components/schemas/UsageSummaryGroup" - } - }, - "values" : { - "example" : [ { - "timestamp" : "2021-01-01T00:00:00Z", - "paid_rows" : [ 100, 200 ] - }, { - "timestamp" : "2021-01-02T00:00:00Z", - "paid_rows" : [ 150, 300 ] - } ], - "items" : { - "$ref" : "#/components/schemas/UsageSummaryValue" - } + "name" : { + "$ref" : "#/components/schemas/PluginDocsPageName" }, - "metadata" : { - "$ref" : "#/components/schemas/UsageSummary_metadata" + "content" : { + "description" : "The content of the documentation page. Supports markdown.", + "example" : "# Getting Started\n\nThis is the getting started page.", + "type" : "string" } }, - "required" : [ "groups", "metadata", "values" ], - "title" : "CloudQuery Usage Summary" + "required" : [ "content", "name" ], + "title" : "CloudQuery Plugin Documentation Page" }, - "PriceCategorySpend" : { + "PluginDocsPageCreate" : { "additionalProperties" : false, - "description" : "Spend by price category for a defined period.", + "description" : "CloudQuery Plugin Documentation Page", "properties" : { - "category" : { - "$ref" : "#/components/schemas/PluginPriceCategory" + "name" : { + "$ref" : "#/components/schemas/PluginDocsPageName" }, - "total" : { + "content" : { + "description" : "The content of the documentation page. Supports markdown.", + "example" : "# Getting Started\n\nThis is the getting started page.", + "minLength" : 1, "type" : "string" } }, - "required" : [ "category", "total" ], - "title" : "Spend by price category" + "required" : [ "content", "name" ], + "title" : "CloudQuery Plugin Documentation Page" }, - "SpendSummaryValue" : { + "PluginTableName" : { + "description" : "Name of the table", + "example" : "aws_ec2_instances", + "maxLength" : 255, + "pattern" : "^[a-z](_?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginTable" : { "additionalProperties" : false, - "description" : "A spend summary value.", + "description" : "CloudQuery Plugin Table", "properties" : { - "date" : { - "description" : "The timestamp for the spend summary.", - "format" : "date-time", + "description" : { + "description" : "Description of the table", + "example" : "AWS S3 Buckets", "type" : "string" }, - "by_category" : { - "items" : { - "$ref" : "#/components/schemas/PriceCategorySpend" - }, - "type" : "array" + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" }, - "total" : { - "description" : "Total spend for the period in USD.", + "name" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "example" : "nil", "type" : "string" - } - }, - "required" : [ "by_category", "date", "total" ], - "title" : "CloudQuery Spend Summary Value" - }, - "SpendSummary" : { - "additionalProperties" : { }, - "description" : "A spend summary for a team, summarizing the spend by each price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", - "properties" : { - "values" : { + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "example" : [ "aws_s3_bucket_cors_rules" ], "items" : { - "$ref" : "#/components/schemas/SpendSummaryValue" - } + "type" : "string" + }, + "type" : "array" }, - "metadata" : { - "$ref" : "#/components/schemas/SpendSummary_metadata" + "title" : { + "description" : "Title of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" } }, - "required" : [ "metadata", "values" ], - "title" : "CloudQuery Spend Summary" - }, - "Email" : { - "example" : "user@example.com", - "format" : "email", - "type" : "string" + "required" : [ "description", "is_incremental", "name", "relations", "title" ], + "title" : "CloudQuery Plugin Table" }, - "Invitation" : { + "PluginTableColumn" : { "additionalProperties" : false, + "description" : "CloudQuery Plugin Column", "properties" : { - "team_name" : { - "$ref" : "#/components/schemas/TeamName" + "description" : { + "description" : "Description of the column", + "type" : "string" }, - "email" : { - "$ref" : "#/components/schemas/Email" + "incremental_key" : { + "description" : "Whether the column is used as an incremental key", + "type" : "boolean" }, - "role" : { - "example" : "admin", + "name" : { + "description" : "Name of the column", "type" : "string" }, - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "not_null" : { + "description" : "Whether the column is nullable", + "type" : "boolean" + }, + "primary_key" : { + "description" : "Whether the column is part of the primary key", + "type" : "boolean" + }, + "type" : { + "description" : "Arrow Type of the column", "type" : "string" + }, + "type_schema" : { + "description" : "For columns of type JSON, the schema of the JSON object", + "type" : "string" + }, + "unique" : { + "description" : "Whether the column has a unique constraint", + "type" : "boolean" } }, - "required" : [ "created_at", "email", "role", "team_name" ] + "required" : [ "description", "incremental_key", "name", "not_null", "primary_key", "type", "unique" ], + "title" : "CloudQuery Plugin Table Column" }, - "MembershipWithTeam" : { + "PluginTableCreate" : { "additionalProperties" : false, + "description" : "CloudQuery Plugin Table", "properties" : { - "role" : { - "example" : "admin", + "description" : { + "description" : "Description of the table", + "example" : "AWS S3 Buckets", "type" : "string" }, - "team" : { - "$ref" : "#/components/schemas/Team" + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" + }, + "name" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "example" : "nil", + "type" : "string" + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "example" : [ "aws_s3_bucket_cors_rules" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "permissions_needed" : { + "description" : "List of permissions needed to access this table, if any", + "example" : [ "storage.buckets.list" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "sensitive_columns" : { + "description" : "List of columns within this table that can contain sensitive/secret data", + "example" : [ "secret_key" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + }, + "columns" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableColumn" + }, + "type" : "array" } }, - "required" : [ "role", "team" ], - "title" : "CloudQuery Team Membership" - }, - "TeamSubscriptionOrderID" : { - "description" : "ID of the team subscription order", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "TeamSubscriptionOrderID" - }, - "TeamSubscriptionOrderStatus" : { - "enum" : [ "pending", "completed", "cancelled" ], - "type" : "string" + "required" : [ "name" ], + "title" : "CloudQuery Plugin Table" }, - "TeamSubscriptionOrder" : { + "PluginTableDetails" : { "additionalProperties" : false, - "description" : "Team subscription order", "properties" : { - "id" : { - "$ref" : "#/components/schemas/TeamSubscriptionOrderID" - }, - "team_name" : { - "$ref" : "#/components/schemas/TeamName" + "columns" : { + "description" : "List of columns", + "items" : { + "$ref" : "#/components/schemas/PluginTableColumn" + }, + "type" : "array" }, - "plan" : { - "$ref" : "#/components/schemas/TeamPlan" + "description" : { + "description" : "Description of the table", + "type" : "string" }, - "status" : { - "$ref" : "#/components/schemas/TeamSubscriptionOrderStatus" + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" }, - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "name" : { + "description" : "Name of the table", "type" : "string" }, - "updated_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "parent" : { + "description" : "Name of the parent table, if any", "type" : "string" }, - "completed_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "relations" : { + "description" : "Names of the tables that depend on this table", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", "type" : "string" }, - "completion_url" : { - "description" : "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", - "format" : "uri", - "type" : "string", - "x-go-name" : "CompletionURL" + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + }, + "permissions_needed" : { + "description" : "List of permissions needed to access this table, if any", + "example" : [ "storage.buckets.list" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "sensitive_columns" : { + "description" : "List of columns within this table that can contain sensitive/secret data", + "example" : [ "secret_key" ], + "items" : { + "type" : "string" + }, + "type" : "array" } }, - "required" : [ "created_at", "id", "plan", "status", "team_name", "updated_at" ], - "title" : "Team subscription order" + "required" : [ "columns", "description", "is_incremental", "name", "permissions_needed", "relations", "title" ] }, - "TeamSubscriptionOrderCreate" : { + "PluginAsset" : { "additionalProperties" : false, - "description" : "Create team subscription order", + "description" : "CloudQuery Plugin Asset", "properties" : { - "plan" : { - "$ref" : "#/components/schemas/TeamPlan" - }, - "success_url" : { - "description" : "URL to redirect to after successful order completion", - "example" : "https://cloud.cloudquery.io/order-completion", + "checksum" : { + "description" : "The checksum of the plugin asset", "type" : "string" }, - "cancel_url" : { - "description" : "URL to redirect to after order cancellation", - "example" : "https://cloud.cloudquery.io/order-cancelled", + "location" : { + "description" : "The location to download the plugin asset from", + "format" : "uri", "type" : "string" } }, - "required" : [ "cancel_url", "plan", "success_url" ], - "title" : "Create team subscription order" - }, - "Settings" : { - "description" : "Platform settings definition", - "properties" : { - "enforce_mfa" : { - "default" : false, - "description" : "Whether or not to require MFA for all users", - "type" : "boolean" - } - }, - "required" : [ "enforce_mfa" ] + "required" : [ "checksum", "location" ], + "title" : "CloudQuery Plugin Asset" }, - "SettingsUpdate" : { - "description" : "Platform settings partial update", - "properties" : { - "enforce_mfa" : { - "default" : false, - "description" : "Whether or not to require MFA for all users", - "type" : "boolean" + "ReleaseURL" : { + "properties" : { + "url" : { + "type" : "string" } - } + }, + "required" : [ "url" ] }, - "InvitationWithToken" : { + "PluginUIAssetUploadRequest" : { "additionalProperties" : false, - "allOf" : [ { - "$ref" : "#/components/schemas/Invitation" - }, { - "properties" : { - "token" : { - "description" : "The token used to accept the invitation", - "format" : "uuid", - "type" : "string" - } + "description" : "CloudQuery Plugin UI Asset Upload Request", + "properties" : { + "name" : { + "description" : "The path and name of the asset", + "example" : "scripts/main.js", + "type" : "string" }, - "required" : [ "token" ] - } ] + "content_type" : { + "description" : "Content-type of the asset", + "example" : "application/json", + "type" : "string" + } + }, + "required" : [ "name" ], + "title" : "CloudQuery Plugin UI Asset Upload Request" }, - "TenantUser" : { + "PluginUIAsset" : { "additionalProperties" : false, - "description" : "Tenant information of a platform user", + "description" : "CloudQuery Plugin UI Asset", "properties" : { - "tenant_url" : { - "description" : "URL of the tenant", - "format" : "url", - "type" : "string", - "x-go-name" : "TenantURL" - }, - "provider" : { - "description" : "Login provider of the tenant", + "name" : { + "description" : "The path and name of the asset", "type" : "string" + }, + "upload_url" : { + "description" : "URL to upload the asset to", + "type" : "string", + "x-go-name" : "UploadURL" } }, - "required" : [ "tenant_url" ] - }, - "UserID" : { - "description" : "ID of the User", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "UserID" + "required" : [ "name", "upload_url" ], + "title" : "CloudQuery Plugin UI Asset" }, - "APIKeyName" : { - "description" : "Name of the API key", - "example" : "cli-api-key", + "AddonName" : { + "description" : "The unique name for the addon.", + "example" : "aws-policy", "maxLength" : 255, - "minLength" : 1, - "pattern" : "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$", + "pattern" : "^[a-z](-?[a-z0-9]+)+$", "type" : "string" }, - "APIKeyID" : { - "description" : "ID of the API key", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "APIKeyID" + "AddonCategory" : { + "description" : "Supported categories for addons", + "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "other" ], + "type" : "string" }, - "APIKeyScope" : { - "description" : "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", - "enum" : [ "read-and-write", "syncs-operations-only" ], + "AddonType" : { + "description" : "Supported types for addons", + "enum" : [ "transformation", "visualization" ], "type" : "string" }, - "APIKey" : { - "description" : "API Key to interact with CloudQuery Cloud under specific team", + "AddonFormat" : { + "description" : "Supported formats for addons", + "enum" : [ "zip" ], + "type" : "string" + }, + "AddonTier" : { + "description" : "Supported tiers for addons", + "enum" : [ "free", "paid" ], + "type" : "string" + }, + "Addon" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon", "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, "name" : { - "$ref" : "#/components/schemas/APIKeyName" + "$ref" : "#/components/schemas/AddonName" }, - "created_by" : { - "description" : "email of the user that created the API key", - "example" : "user@example.com", + "official" : { + "description" : "True if the addon is maintained by CloudQuery, false otherwise", + "type" : "boolean" + }, + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, "type" : "string" }, - "id" : { - "$ref" : "#/components/schemas/APIKeyID" + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" }, - "key" : { - "description" : "API key. Will be shown only in the response when creating the key.", - "example" : "1234567890abcdef1234567890abcdef", + "homepage" : { + "example" : "https://cloudquery.io", "type" : "string" }, - "created_at" : { - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", "type" : "string" }, - "expires_at" : { - "description" : "Timestamp at which API key will stop working", + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "created_at" : { "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "last_access_at" : { - "description" : "Timestamp at which API key was last used - accurate to the day only.", + "updated_at" : { "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" - }, - "expired" : { - "description" : "Whether the API key has expired or not", - "example" : false, - "type" : "boolean" - }, - "scope" : { - "$ref" : "#/components/schemas/APIKeyScope" } }, - "required" : [ "expired", "expires_at", "id", "name", "scope" ] + "required" : [ "addon_format", "addon_type", "category", "created_at", "display_name", "logo", "name", "official", "price_usd", "short_description", "team_name", "tier", "updated_at" ], + "title" : "CloudQuery Addon" }, - "RegistryAuthToken" : { + "ListAddon" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Addon" + }, { + "properties" : { + "latest_version" : { + "$ref" : "#/components/schemas/VersionName" + } + } + } ] + }, + "AddonCreate" : { "additionalProperties" : false, - "description" : "JWT token for the image registry", + "description" : "CloudQuery AddonCreate", "properties" : { - "access_token" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, "type" : "string" }, - "token" : { + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, "type" : "string" - } - }, - "required" : [ "access_token", "token" ] - }, - "DockerError" : { - "additionalProperties" : false, - "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry", - "properties" : { - "details" : { + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" } }, - "required" : [ "details" ], - "title" : "Docker Error" - }, - "SyncPluginPath" : { - "description" : "Plugin path in CloudQuery registry", - "pattern" : "^cloudquery/[^/]+", - "type" : "string" + "required" : [ "addon_format", "addon_type", "category", "display_name", "name", "public", "short_description", "team_name", "tier" ], + "title" : "CloudQuery Addon" }, - "SyncEnvCreate" : { - "description" : "Environment variable. Environment variables are assumed to be secret.", + "AddonUpdate" : { + "additionalProperties" : false, + "description" : "CloudQuery AddonUpdate", "properties" : { - "name" : { - "description" : "Name of the environment variable", + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months in USD", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, "type" : "string" }, - "value" : { - "description" : "Value of the environment variable", + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, "type" : "string" - } - }, - "required" : [ "name" ] - }, - "ConnectorID" : { - "description" : "ID of the Connector", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ConnectorID" - }, - "SyncSourceTestConnectionCreate" : { - "properties" : { - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" }, - "source_name" : { - "description" : "Name of an existing source", + "homepage" : { + "example" : "https://cloudquery.io", "type" : "string" }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", "type" : "string" }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", + "type" : "string" }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - }, - "type" : "array" + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" } }, - "required" : [ "path", "version" ], - "title" : "Sync Source Test Connection creation definition" - }, - "SyncTestConnectionID" : { - "description" : "unique ID of the test connection", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ID" - }, - "SyncTestConnectionStatus" : { - "description" : "The status of the sync run", - "enum" : [ "completed", "failed", "started", "created" ], - "type" : "string" + "title" : "CloudQuery Addon" }, - "SyncSourceTestConnection" : { + "AddonVersion" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Version", "properties" : { - "id" : { - "$ref" : "#/components/schemas/SyncTestConnectionID" - }, - "status" : { - "$ref" : "#/components/schemas/SyncTestConnectionStatus" - }, - "failure_reason" : { - "description" : "Reason for failure", - "example" : "password authentication failed for user \"exampleuser\"", - "type" : "string" - }, - "failure_code" : { - "description" : "Code for failure", - "example" : "INVALID_CREDENTIALS", - "type" : "string" - }, "created_at" : { - "description" : "Time the test connection was created", + "description" : "The date and time the plugin version was created.", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "completed_at" : { - "description" : "Time the test connection was completed", + "published_at" : { + "description" : "The date and time the plugin version was set to non-draft (published).", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "plugin_path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "plugin_version" : { - "$ref" : "#/components/schemas/VersionName" - } - }, - "required" : [ "created_at", "id", "status" ] - }, - "SyncSourceTestConnectionID" : { - "description" : "ID of the Sync Source Test Connection", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "SyncSourceTestConnectionID" - }, - "DisplayName" : { - "description" : "A human-readable display name", - "example" : "Human Readable Name", - "maxLength" : 255, - "minLength" : 1, - "pattern" : "^[a-zA-Z\\p{L}\\p{N}_][a-zA-Z\\p{L}\\p{N}_ \\-'\\(\\)\\[\\]]*$", - "type" : "string", - "x-pattern-message" : "can contain only letters, numbers, spaces, hyphens, underscores, brackets and apostrophes" - }, - "PromoteSyncSourceTestConnection" : { - "description" : "Sync Source Definition", - "properties" : { "name" : { - "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-source-definition", - "pattern" : "^[a-zA-Z0-9_-]+$", + "$ref" : "#/components/schemas/VersionName" + }, + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", "type" : "string" }, - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" + "doc" : { + "description" : "Main README in MD format", + "type" : "string" }, - "tables" : { - "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "plugin_deps" : { + "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", "items" : { "type" : "string" }, "type" : "array" }, - "skip_tables" : { - "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "addon_deps" : { + "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", "items" : { "type" : "string" }, "type" : "array" }, - "overwrite_source" : { - "type" : "boolean", - "Description" : "Set this to allow overwriting an existing sync source. Defaults to true to preserve compatibility." + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" } }, - "required" : [ "name", "tables" ], - "title" : "Sync Source definition for creating a new source" - }, - "SyncLastUpdateSource" : { - "description" : "How was the source or destination been created or updated last", - "enum" : [ "yaml", "ui" ], - "type" : "string" + "required" : [ "checksum", "created_at", "doc", "draft", "message", "name", "retracted" ], + "title" : "CloudQuery Addon Version" }, - "SyncSourceCreate" : { - "description" : "Sync Source Definition", + "AddonVersionUpdate" : { "properties" : { - "name" : { - "description" : "Descriptive, unique name for the source. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-source-definition", - "pattern" : "^[a-zA-Z0-9_-]+$", + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", "type" : "string" }, - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" - }, - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", + "doc" : { + "description" : "Main README in MD format", "type" : "string" }, - "tables" : { - "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "plugin_deps" : { + "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", "items" : { "type" : "string" }, "type" : "array" }, - "skip_tables" : { - "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", + "addon_deps" : { + "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", "items" : { "type" : "string" }, "type" : "array" }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" - }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - }, - "type" : "array" + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" + } + } + }, + "AddonAsset" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Asset", + "properties" : { + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" + "location" : { + "description" : "The location to download the addon asset from", + "format" : "uri", + "type" : "string" } }, - "required" : [ "name", "path", "tables", "version" ], - "title" : "Sync Source definition for creating a new source" + "required" : [ "checksum", "location" ], + "title" : "CloudQuery Addon Asset" + }, + "TeamPlan" : { + "description" : "The plan the team is on (trial is deprecated)", + "enum" : [ "free", "paid", "enterprise", "trial" ], + "type" : "string" }, - "SyncEnv" : { - "description" : "Environment variable. Environment variables are assumed to be secret.", + "Team" : { + "additionalProperties" : false, + "description" : "CloudQuery Team", "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, "name" : { - "description" : "Name of the environment variable", + "$ref" : "#/components/schemas/TeamName" + }, + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "plan_end_time" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "is_trial_active" : { + "example" : false, + "type" : "boolean" + }, + "trial_end_time" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", "type" : "string" + }, + "display_name" : { + "description" : "The team's display name", + "example" : "CloudQuery", + "maxLength" : 255, + "type" : "string" + }, + "internal" : { + "example" : false, + "type" : "boolean" } }, - "required" : [ "name" ] + "required" : [ "display_name", "internal", "is_trial_active", "name", "plan" ], + "title" : "Team" }, - "SyncSource" : { - "allOf" : [ { - "$ref" : "#/components/schemas/SyncSourceCreate" - }, { - "properties" : { - "created_at" : { - "description" : "Time when the source was created", - "example" : "2023-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "description" : "Time when the source was last updated", - "example" : "2023-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "env" : { - "description" : "Environment variables for the plugin.", - "items" : { - "$ref" : "#/components/schemas/SyncEnv" - }, - "type" : "array" - }, - "draft" : { - "description" : "If a sync source is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", - "type" : "boolean" - } + "TeamImageCreate" : { + "additionalProperties" : false, + "properties" : { + "name" : { + "description" : "Name of image", + "maxLength" : 64, + "minLength" : 1, + "type" : "string" }, - "required" : [ "created_at", "draft", "env", "updated_at" ] - } ] - }, - "SyncDestinationWriteMode" : { - "default" : "overwrite-delete-stale", - "description" : "Write mode for the destination", - "enum" : [ "append", "overwrite", "overwrite-delete-stale" ], - "type" : "string" - }, - "SyncDestinationMigrateMode" : { - "default" : "safe", - "description" : "Migrate mode for the destination", - "enum" : [ "safe", "forced" ], - "type" : "string" + "checksum" : { + "description" : "SHA1 checksum of image", + "maxLength" : 40, + "minLength" : 40, + "pattern" : "^[a-f0-9]+$", + "type" : "string" + }, + "content_type" : { + "$ref" : "#/components/schemas/ContentType" + } + }, + "required" : [ "checksum", "content_type", "name" ], + "title" : "Create Team Image Request" }, - "SyncDestinationTestConnectionCreate" : { + "TeamImage" : { "properties" : { - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "destination_name" : { - "description" : "Name of an existing destination", + "name" : { + "description" : "Name of image", "type" : "string" }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", + "checksum" : { + "description" : "SHA1 checksum of image", "type" : "string" }, - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + "url" : { + "description" : "URL to download image", + "type" : "string", + "x-go-name" : "URL" }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" + "upload_url" : { + "description" : "URL to upload image", + "type" : "string", + "x-go-name" : "UploadURL" }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" + "required_headers" : { + "additionalProperties" : { + "items" : { + "type" : "string" + } }, - "type" : "array" - }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" + "description" : "Required HTTP headers to include for the upload" } }, - "required" : [ "path", "version" ], - "title" : "Sync Destination Test Connection creation definition" + "required" : [ "checksum", "name", "required_headers", "url" ] + }, + "AddonOrderID" : { + "description" : "ID of the addon order", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "AddonOrderID" + }, + "AddonOrderStatus" : { + "enum" : [ "pending", "completed", "cancelled" ], + "type" : "string" }, - "SyncDestinationTestConnection" : { + "AddonOrder" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Order", "properties" : { "id" : { - "$ref" : "#/components/schemas/SyncTestConnectionID" + "$ref" : "#/components/schemas/AddonOrderID" }, - "status" : { - "$ref" : "#/components/schemas/SyncTestConnectionStatus" + "team_name" : { + "$ref" : "#/components/schemas/TeamName" }, - "failure_reason" : { - "description" : "Reason for failure", - "example" : "password authentication failed for user \"exampleuser\"", - "type" : "string" + "addon_team" : { + "$ref" : "#/components/schemas/TeamName" }, - "failure_code" : { - "description" : "Code for failure", - "example" : "INVALID_CREDENTIALS", - "type" : "string" + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "status" : { + "$ref" : "#/components/schemas/AddonOrderStatus" }, "created_at" : { - "description" : "Time the test connection was created", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "completed_at" : { - "description" : "Time the test connection was completed", + "updated_at" : { "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "plugin_path" : { - "$ref" : "#/components/schemas/SyncPluginPath" + "completed_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "plugin_version" : { - "$ref" : "#/components/schemas/VersionName" + "completion_url" : { + "description" : "Stripe URL for completing purchase. Only shown in response to POST request.", + "format" : "uri", + "type" : "string", + "x-go-name" : "CompletionURL" } }, - "required" : [ "created_at", "id", "status" ] - }, - "SyncDestinationTestConnectionID" : { - "description" : "ID of the Sync Destination Test Connection", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "SyncDestinationTestConnectionID" + "required" : [ "addon_name", "addon_team", "addon_type", "created_at", "id", "status", "team_name", "updated_at" ], + "title" : "CloudQuery Addon" }, - "PromoteSyncDestinationTestConnection" : { - "description" : "Sync Destination Definition", + "AddonOrderCreate" : { + "additionalProperties" : false, + "description" : "Create CloudQuery Addon Order", "properties" : { - "name" : { - "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-destination-definition", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" + "addon_team" : { + "$ref" : "#/components/schemas/TeamName" }, - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" }, - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" + "addon_name" : { + "$ref" : "#/components/schemas/AddonName" }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" + "success_url" : { + "description" : "URL to redirect to after successful order completion", + "example" : "https://cloud.cloudquery.io/order-completion", + "type" : "string" }, - "overwrite_destination" : { - "type" : "boolean", - "Description" : "Set this to allow overwriting an existing sync destination. Defaults to true to preserve compatibility." + "cancel_url" : { + "description" : "URL to redirect to after order cancellation", + "example" : "https://cloud.cloudquery.io/order-cancelled", + "type" : "string" } }, - "required" : [ "name" ], - "title" : "Sync Destination definition for creating a new source" + "required" : [ "addon_name", "addon_team", "addon_type", "cancel_url", "success_url" ], + "title" : "Create CloudQuery Addon Order" + }, + "UserName" : { + "description" : "The unique name for the user.", + "example" : "Sarah O'Connor", + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", + "type" : "string" + }, + "UserOnboarded" : { + "description" : "Whether the user has completed onboarding", + "type" : "boolean" }, - "SyncDestinationCreate" : { - "description" : "Sync Destination Definition", + "User" : { + "additionalProperties" : false, + "description" : "CloudQuery User", "properties" : { - "name" : { - "description" : "Descriptive, unique name for the destination. The name can only contain ASCII letters, digits, - and _.", - "example" : "my-destination-definition", - "pattern" : "^[a-zA-Z0-9_-]+$", + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", "type" : "string" }, - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" - }, - "path" : { - "$ref" : "#/components/schemas/SyncPluginPath" + "id" : { + "description" : "ID of the User", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" }, - "version" : { - "description" : "Version of the plugin", - "example" : "v1.2.3", + "email" : { + "example" : "user@example.com", "type" : "string" }, - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteMode" - }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateMode" - }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" + "name" : { + "$ref" : "#/components/schemas/UserName" }, - "env" : { - "description" : "Environment variables for the plugin. All environment variables will be stored as secrets.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - }, - "type" : "array" + "onboarded" : { + "$ref" : "#/components/schemas/UserOnboarded" }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "connector_id" : { - "$ref" : "#/components/schemas/ConnectorID" + "profile_image_url" : { + "description" : "Profile image URL of user", + "type" : "string", + "x-go-name" : "ProfileImageURL" } }, - "required" : [ "name", "path", "version" ], - "title" : "Sync Destination definition for creating a new destination" - }, - "SyncDestination" : { - "allOf" : [ { - "$ref" : "#/components/schemas/SyncDestinationCreate" - }, { - "properties" : { - "created_at" : { - "description" : "Time when the source was created", - "example" : "2023-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "description" : "Time when the source was last updated", - "example" : "2023-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "env" : { - "description" : "Environment variables for the plugin.", - "items" : { - "$ref" : "#/components/schemas/SyncEnv" - }, - "type" : "array" - }, - "draft" : { - "description" : "If a sync destination is in draft, it cannot be used in syncs. To get it out of draft, 'promote' it using a successful test connection ID.", - "type" : "boolean" - } - }, - "required" : [ "created_at", "draft", "env", "updated_at" ] - } ] + "required" : [ "email", "id" ], + "title" : "CloudQuery User" }, - "SyncSourceUpdate" : { - "description" : "Sync Source Update Definition", + "MembershipWithUser" : { + "additionalProperties" : false, "properties" : { - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" - }, - "tables" : { - "description" : "Tables to sync. Wildcards are supported. Note that child tables are excluded by default, and need to be explicitly specified.", - "items" : { - "type" : "string" - }, - "type" : "array" - }, - "skip_tables" : { - "description" : "Tables matched by `tables` that should be skipped. Wildcards are supported.", - "items" : { - "type" : "string" - }, - "type" : "array" + "role" : { + "example" : "admin", + "type" : "string" }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" + "user" : { + "$ref" : "#/components/schemas/User" } }, - "title" : "Sync Source definition for updating a source" + "required" : [ "role", "user" ], + "title" : "CloudQuery User Membership" }, - "SyncTestConnection" : { + "SpendingLimit" : { + "additionalProperties" : false, + "description" : "A configurable spending limit for the team. Empty values indicate no limit.", "properties" : { - "id" : { - "$ref" : "#/components/schemas/SyncTestConnectionID" - }, - "status" : { - "$ref" : "#/components/schemas/SyncTestConnectionStatus" - }, - "failure_reason" : { - "description" : "Reason for failure", - "example" : "password authentication failed for user \"exampleuser\"", - "type" : "string" - }, - "failure_code" : { - "description" : "Code for failure", - "example" : "INVALID_CREDENTIALS", - "type" : "string" - }, "created_at" : { - "description" : "Time the test connection was created", + "description" : "The date and time the team limit was created.", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "completed_at" : { - "description" : "Time the test connection was completed", + "updated_at" : { + "description" : "The date and time the team limit was last updated.", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "plugin_path" : { - "$ref" : "#/components/schemas/SyncPluginPath" - }, - "plugin_version" : { - "$ref" : "#/components/schemas/VersionName" - }, - "plugin_kind" : { - "$ref" : "#/components/schemas/PluginKind" + "usd" : { + "description" : "The maximum USD amount the team is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" } }, - "required" : [ "created_at", "id", "status" ] + "title" : "Team Spending Limit" }, - "SyncIncremental" : { - "description" : "Managed Sync Incremental Options definition", + "SpendingLimitUpdate" : { + "additionalProperties" : false, + "description" : "A configurable spending limit for the team.", "properties" : { - "table" : { - "description" : "Name of the table in which to store incremental sync data", - "pattern" : "^([a-zA-Z_][a-zA-Z0-9_]*)?$", - "type" : "string" - }, - "destination" : { - "description" : "Name of the destination in which to store incremental sync data", - "pattern" : "^([a-zA-Z][a-zA-Z0-9_-]*)?$", - "type" : "string" + "usd" : { + "description" : "The maximum USD amount the team is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" } }, - "required" : [ "destination", "table" ] + "required" : [ "usd" ], + "title" : "Team Spending Limit" }, - "Sync" : { - "description" : "Managed Sync definition", + "SpendingLimitCreate" : { + "additionalProperties" : false, + "description" : "A configurable monthly limit for team usage.", "properties" : { - "name" : { - "description" : "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" - }, - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" - }, - "source" : { - "description" : "Unique name of the source", + "usd" : { + "description" : "The maximum USD amount the team is allowed to use within a calendar month.", + "example" : 1000, + "maximum" : 1000000000, + "minimum" : 0, + "type" : "integer", + "x-go-name" : "USD" + } + }, + "required" : [ "usd" ], + "title" : "Team Spending Limit" + }, + "Invoice" : { + "additionalProperties" : false, + "description" : "Invoice details", + "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", "type" : "string" }, - "destinations" : { - "description" : "List of destinations for the sync", - "items" : { - "description" : "Unique name of the destination", - "type" : "string" - }, - "type" : "array" - }, - "disabled" : { - "description" : "Whether the sync is disabled", - "type" : "boolean" + "amount_due" : { + "description" : "Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due.", + "example" : 1000, + "format" : "int64", + "type" : "integer" }, - "schedule" : { - "description" : "Cron schedule for the sync", + "currency" : { + "example" : "usd", "type" : "string" }, - "cpu" : { - "description" : "CPU quota for the sync", - "example" : "1", + "invoice_pdf" : { + "description" : "The link to download the PDF for the invoice.", + "format" : "uri", "type" : "string", - "x-go-name" : "CPU" - }, - "memory" : { - "description" : "Memory quota for the sync", - "example" : "2Gi", - "type" : "string" - }, - "incremental" : { - "$ref" : "#/components/schemas/SyncIncremental" - }, - "created_at" : { - "description" : "Time when the sync was created", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "description" : "Time when the sync was updated", - "format" : "date-time", - "type" : "string" + "x-go-name" : "InvoicePDF" }, - "created_by" : { - "type" : "string" + "paid" : { + "description" : "Whether or not payment was successfully collected for this invoice.", + "example" : true, + "type" : "boolean" } }, - "required" : [ "cpu", "created_at", "destinations", "disabled", "display_name", "memory", "name", "schedule", "source", "updated_at" ] - }, - "SyncDestinationWriteModeUpdate" : { - "description" : "Write mode for the destination, for updating", - "enum" : [ "append", "overwrite", "overwrite-delete-stale" ], - "type" : "string" - }, - "SyncDestinationMigrateModeUpdate" : { - "description" : "Migrate mode for the destination, for updating", - "enum" : [ "safe", "forced" ], - "type" : "string" + "required" : [ "amount_due", "created_at", "currency", "invoice_pdf", "paid" ], + "title" : "Invoice" }, - "SyncDestinationUpdate" : { - "description" : "Sync Destination Update Definition", + "UsageCurrent" : { + "additionalProperties" : false, + "description" : "The usage of a plugin within the current calendar month.", "properties" : { - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "rows" : { + "description" : "The number of rows used by the plugin in the calendar month.", + "example" : 1000000, + "format" : "int64", + "minimum" : 0, + "type" : "integer" }, - "write_mode" : { - "$ref" : "#/components/schemas/SyncDestinationWriteModeUpdate" + "usd" : { + "deprecated" : true, + "description" : "The USD amount used by the plugin in the calendar month, rounded to two decimal places.", + "example" : "43.95", + "type" : "string", + "x-go-name" : "USD" }, - "migrate_mode" : { - "$ref" : "#/components/schemas/SyncDestinationMigrateModeUpdate" + "remaining_usd" : { + "deprecated" : true, + "description" : "The remaining USD amount in the plugin's quota for the calendar month.", + "example" : "56.05", + "type" : "string", + "x-go-name" : "RemainingUSD" }, - "last_update_source" : { - "$ref" : "#/components/schemas/SyncLastUpdateSource" + "remaining_rows" : { + "deprecated" : true, + "description" : "Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows.", + "example" : 1, + "format" : "int64", + "minimum" : 0, + "type" : "integer" } }, - "title" : "Sync Destination definition for updating a destination" + "required" : [ "plugin_kind", "plugin_name", "plugin_team", "rows", "usd" ], + "title" : "CloudQuery Plugin Usage" }, - "SyncCreate" : { - "description" : "Managed Sync definition", + "UsageIncrease" : { + "additionalProperties" : false, + "description" : "Increase the usage of a plugin. This can incur billing costs and should be used only by plugins.", "properties" : { - "name" : { - "description" : "Descriptive, unique name for the sync. The name can only contain ASCII letters, digits, - and _.", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" }, - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" }, - "source" : { - "description" : "Unique name of the source", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" }, - "destinations" : { + "tables" : { "items" : { - "description" : "Unique name of the destination", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" + "$ref" : "#/components/schemas/UsageIncrease_tables_inner" }, - "minItems" : 1, "type" : "array" }, - "schedule" : { - "description" : "Cron schedule for the sync", - "type" : "string" - }, - "disabled" : { - "default" : false, - "description" : "Whether the sync is disabled", - "type" : "boolean" - }, - "cpu" : { - "default" : "1", - "description" : "CPU quota for the sync", - "type" : "string", - "x-go-name" : "CPU" + "rows" : { + "description" : "The total number of additional rows used by the plugin.", + "example" : 1000000, + "minimum" : 0, + "type" : "integer" }, - "memory" : { - "default" : "2Gi", - "description" : "Memory quota for the sync", + "request_id" : { + "description" : "A unique ID associated with the usage increase.", + "example" : "123e4567-e89b-12d3-a456-426614174000", + "format" : "uuid", "type" : "string" }, - "incremental" : { - "$ref" : "#/components/schemas/SyncIncremental" + "installation_id" : { + "description" : "Installation ID associated with the platform, for platform syncs.", + "pattern" : "^[a-z0-9]{64}$", + "type" : "string", + "x-go-name" : "InstallationID" } }, - "required" : [ "destinations", "name", "source" ] + "required" : [ "plugin_kind", "plugin_name", "plugin_team", "request_id", "rows" ], + "title" : "CloudQuery Plugin Usage Increase" }, - "SyncIncrementalUpdate" : { - "description" : "Managed Sync Incremental Options Update definition", + "UsageSummaryGroup" : { + "description" : "A usage summary group.", "properties" : { - "table" : { - "description" : "Name of the table in which to store incremental sync data", - "pattern" : "^([a-zA-Z_][a-zA-Z0-9_]*)?$", + "name" : { + "description" : "The name of the group.", + "example" : "plugin", "type" : "string" }, - "destination" : { - "description" : "Name of the destination in which to store incremental sync data", - "pattern" : "^([a-zA-Z][a-zA-Z0-9_-]*)?$", + "value" : { + "description" : "The value of the group at this index.", + "example" : "cloudquery/source/aws", "type" : "string" } - } + }, + "required" : [ "name", "value" ], + "title" : "CloudQuery Usage Summary Group" }, - "SyncUpdate" : { - "description" : "Managed Sync definition", + "UsageSummaryValue" : { + "description" : "A usage summary value.", "properties" : { - "display_name" : { - "$ref" : "#/components/schemas/DisplayName" - }, - "source" : { - "description" : "Unique name of the source", - "pattern" : "^[a-zA-Z0-9_-]+$", + "timestamp" : { + "description" : "The timestamp marking the start of a period.", + "format" : "date-time", "type" : "string" }, - "destinations" : { + "paid_rows" : { + "description" : "The paid rows that were synced in this period, one per group.", "items" : { - "description" : "Unique name of the destination", - "pattern" : "^[a-zA-Z0-9_-]+$", - "type" : "string" + "format" : "int64", + "type" : "integer" }, - "minItems" : 1, "type" : "array" }, - "schedule" : { - "description" : "Cron schedule for the sync", - "type" : "string" - }, - "disabled" : { - "default" : false, - "description" : "Whether the sync is disabled", - "type" : "boolean" - }, - "env" : { - "description" : "Environment variables for the sync", + "cloud_vcpu_seconds" : { + "description" : "vCPU/seconds consumed in this period, one per group.", "items" : { - "$ref" : "#/components/schemas/SyncEnv" + "format" : "int64", + "type" : "integer" }, "type" : "array" }, - "cpu" : { - "default" : "1", - "description" : "CPU quota for the sync", - "type" : "string", - "x-go-name" : "CPU" - }, - "memory" : { - "default" : "2Gi", - "description" : "Memory quota for the sync", - "type" : "string" + "cloud_vram_byte_seconds" : { + "description" : "vRAM/byte-seconds consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" }, - "incremental" : { - "$ref" : "#/components/schemas/SyncIncrementalUpdate" + "cloud_egress_bytes" : { + "description" : "Egress bytes consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" } - } - }, - "SyncRunStatus" : { - "description" : "The status of the sync run", - "enum" : [ "completed", "failed", "started", "cancelled", "created" ], - "type" : "string" - }, - "SyncRunStatusReason" : { - "description" : "The reason for the status", - "enum" : [ "error", "oom_killed" ], - "type" : "string" + }, + "required" : [ "timestamp" ], + "title" : "CloudQuery Usage Summary Value" }, - "SyncRun" : { - "description" : "Managed Sync Run definition", + "UsageSummary" : { + "additionalProperties" : { }, + "description" : "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", "properties" : { - "sync_name" : { - "description" : "Name of the sync", - "type" : "string" - }, - "id" : { - "description" : "unique ID of the run", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ID" + "groups" : { + "description" : "The groups of the usage summary. Every group will have a corresponding value at the same index in the values array.", + "example" : [ { + "name" : "plugin", + "value" : "cloudquery/source/aws" + }, { + "name" : "plugin", + "value" : "cloudquery/source/gcp" + } ], + "items" : { + "$ref" : "#/components/schemas/UsageSummaryGroup" + } }, - "status" : { - "$ref" : "#/components/schemas/SyncRunStatus" + "values" : { + "example" : [ { + "timestamp" : "2021-01-01T00:00:00Z", + "paid_rows" : [ 100, 200 ] + }, { + "timestamp" : "2021-01-02T00:00:00Z", + "paid_rows" : [ 150, 300 ] + } ], + "items" : { + "$ref" : "#/components/schemas/UsageSummaryValue" + } }, - "status_reason" : { - "$ref" : "#/components/schemas/SyncRunStatusReason" + "metadata" : { + "$ref" : "#/components/schemas/UsageSummary_metadata" + } + }, + "required" : [ "groups", "metadata", "values" ], + "title" : "CloudQuery Usage Summary" + }, + "PriceCategorySpend" : { + "additionalProperties" : false, + "description" : "Spend by price category for a defined period.", + "properties" : { + "category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" }, - "created_at" : { - "description" : "Time the sync run was created", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "total" : { "type" : "string" - }, - "completed_at" : { - "description" : "Time the sync run was completed", - "example" : "2017-07-14T16:53:42Z", + } + }, + "required" : [ "category", "total" ], + "title" : "Spend by price category" + }, + "SpendSummaryValue" : { + "additionalProperties" : false, + "description" : "A spend summary value.", + "properties" : { + "date" : { + "description" : "The timestamp for the spend summary.", "format" : "date-time", "type" : "string" }, - "total_rows" : { - "description" : "Total number of rows in the sync", - "format" : "int64", - "type" : "integer" - }, - "warnings" : { - "description" : "Number of warnings encountered during the sync", - "format" : "int64", - "type" : "integer" + "by_category" : { + "items" : { + "$ref" : "#/components/schemas/PriceCategorySpend" + }, + "type" : "array" }, - "errors" : { - "description" : "Number of errors encountered during the sync", - "format" : "int64", - "type" : "integer" + "total" : { + "description" : "Total spend for the period in USD.", + "type" : "string" } }, - "required" : [ "created_at", "errors", "id", "status", "sync_name", "total_rows", "warnings" ] - }, - "SyncRunID" : { - "description" : "ID of the SyncRun", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "SyncRunID" + "required" : [ "by_category", "date", "total" ], + "title" : "CloudQuery Spend Summary Value" }, - "SyncRunDetails" : { - "allOf" : [ { - "$ref" : "#/components/schemas/SyncRun" - }, { - "properties" : { - "cpu_seconds" : { - "description" : "Total CPU seconds utilized during this sync run", - "format" : "double", - "type" : "number", - "x-go-name" : "CPUSeconds" - }, - "memory_byte_seconds" : { - "description" : "Total memory byte seconds utilized during this sync run", - "format" : "double", - "type" : "number" - }, - "network_egress_bytes" : { - "description" : "Total network egress bytes during this sync run", - "format" : "double", - "type" : "number" + "SpendSummary" : { + "additionalProperties" : { }, + "description" : "A spend summary for a team, summarizing the spend by each price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "properties" : { + "values" : { + "items" : { + "$ref" : "#/components/schemas/SpendSummaryValue" } + }, + "metadata" : { + "$ref" : "#/components/schemas/SpendSummary_metadata" } - } ] - }, - "SyncRunTableProgress" : { - "additionalProperties" : { - "$ref" : "#/components/schemas/SyncRunTableProgress_value" }, - "description" : "Table-specific progress information for a sync run" + "required" : [ "metadata", "values" ], + "title" : "CloudQuery Spend Summary" }, - "ConnectorIdentityResponseAWS" : { - "additionalProperties" : false, - "description" : "AWS connector identity response", - "properties" : { - "role_arn" : { - "description" : "Role ARN to assume", - "type" : "string", - "x-go-name" : "RoleARN" - } - }, - "required" : [ "role_arn" ] + "Email" : { + "example" : "user@example.com", + "format" : "email", + "type" : "string" }, - "ConnectorCredentialsResponseAWS" : { + "Invitation" : { "additionalProperties" : false, - "description" : "AWS connector credentials response", "properties" : { - "access_key_id" : { - "type" : "string" - }, - "secret_access_key" : { - "type" : "string" + "team_name" : { + "$ref" : "#/components/schemas/TeamName" }, - "session_token" : { - "type" : "string" + "email" : { + "$ref" : "#/components/schemas/Email" }, - "source" : { + "role" : { + "example" : "admin", "type" : "string" }, - "can_expire" : { - "type" : "boolean" - }, - "expires" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" } }, - "required" : [ "access_key_id", "can_expire", "expires", "secret_access_key", "session_token", "source" ] + "required" : [ "created_at", "email", "role", "team_name" ] }, - "ConnectorCredentialsResponseOAuth" : { + "MembershipWithTeam" : { "additionalProperties" : false, - "description" : "OAuth connector credentials response", "properties" : { - "access_token" : { + "role" : { + "example" : "admin", "type" : "string" }, - "expires" : { - "format" : "date-time", - "type" : "string" + "team" : { + "$ref" : "#/components/schemas/Team" } }, - "required" : [ "access_token" ] + "required" : [ "role", "team" ], + "title" : "CloudQuery Team Membership" }, - "ManagedDatabaseID" : { - "description" : "The identifier for the managed database", + "TeamSubscriptionOrderID" : { + "description" : "ID of the team subscription order", "example" : "12345678-1234-1234-1234-1234567890ab", "format" : "uuid", "type" : "string", - "x-go-name" : "ManagedDatabaseID" + "x-go-name" : "TeamSubscriptionOrderID" }, - "ManagedDatabaseStatus" : { - "description" : "The status of the managed database", - "enum" : [ "pending", "ready", "failed", "expired" ], + "TeamSubscriptionOrderStatus" : { + "enum" : [ "pending", "completed", "cancelled" ], "type" : "string" }, - "ManagedDatabase" : { - "description" : "Managed Database definition", + "TeamSubscriptionOrder" : { + "additionalProperties" : false, + "description" : "Team subscription order", "properties" : { + "id" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + }, + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "status" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderStatus" + }, "created_at" : { - "description" : "Time the managed database was created", "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "connection_string" : { - "description" : "The connection string to the database", + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", "type" : "string" }, - "expiration" : { - "description" : "Time the managed database should expire", + "completed_at" : { "example" : "2017-07-14T16:53:42Z", "format" : "date-time", "type" : "string" }, - "id" : { - "$ref" : "#/components/schemas/ManagedDatabaseID" - }, - "status" : { - "$ref" : "#/components/schemas/ManagedDatabaseStatus" + "completion_url" : { + "description" : "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", + "format" : "uri", + "type" : "string", + "x-go-name" : "CompletionURL" } }, - "required" : [ "created_at", "id", "status" ] - }, - "ManagedDatabaseCreate" : { - "description" : "Managed Database creation", - "type" : "object" - }, - "ConnectorStatus" : { - "description" : "The status of the connector", - "enum" : [ "created", "authenticated", "failed", "revoked" ], - "type" : "string" + "required" : [ "created_at", "id", "plan", "status", "team_name", "updated_at" ], + "title" : "Team subscription order" }, - "Connector" : { - "description" : "Connector definition", + "TeamSubscriptionOrderCreate" : { + "additionalProperties" : false, + "description" : "Create team subscription order", "properties" : { - "id" : { - "description" : "unique ID of the connector", - "example" : "12345678-1234-1234-1234-1234567890ab", - "format" : "uuid", - "type" : "string", - "x-go-name" : "ID" - }, - "type" : { - "description" : "Type of the connector", - "type" : "string" + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" }, - "name" : { - "description" : "Name of the connector", + "success_url" : { + "description" : "URL to redirect to after successful order completion", + "example" : "https://cloud.cloudquery.io/order-completion", "type" : "string" }, - "status" : { - "$ref" : "#/components/schemas/ConnectorStatus" - }, - "created_at" : { - "description" : "Time the connector was created", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", + "cancel_url" : { + "description" : "URL to redirect to after order cancellation", + "example" : "https://cloud.cloudquery.io/order-cancelled", "type" : "string" } }, - "required" : [ "created_at", "id", "name", "status", "type" ] + "required" : [ "cancel_url", "plan", "success_url" ], + "title" : "Create team subscription order" }, - "ConnectorCreate" : { - "description" : "Connector creation request", + "Settings" : { + "description" : "Platform settings definition", "properties" : { - "type" : { - "description" : "Type of the connector", - "type" : "string" - }, - "name" : { - "description" : "Name of the connector", - "type" : "string" + "enforce_mfa" : { + "default" : false, + "description" : "Whether or not to require MFA for all users", + "type" : "boolean" } }, - "required" : [ "name", "type" ] + "required" : [ "enforce_mfa" ] }, - "ConnectorUpdate" : { - "additionalProperties" : false, + "SettingsUpdate" : { + "description" : "Platform settings partial update", "properties" : { - "name" : { - "description" : "Name of the connector", - "type" : "string" + "enforce_mfa" : { + "default" : false, + "description" : "Whether or not to require MFA for all users", + "type" : "boolean" } } }, - "ConnectorAuthRequestAWS" : { - "additionalProperties" : { }, - "description" : "AWS connector authentication request to start the authentication process", - "properties" : { - "plugin_team" : { - "description" : "Team that owns the plugin we are authenticating the connector for", - "example" : "cloudquery" - }, - "plugin_kind" : { - "description" : "Kind of the plugin", - "example" : "source" - }, - "plugin_name" : { - "description" : "Name of the plugin", - "example" : "aws" - }, - "plugin_version" : { - "description" : "Version of the plugin", - "example" : "v27.1.0" - }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" - }, - "env" : { - "description" : "Environment variables used in the spec.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - } - }, - "tables" : { - "description" : "Tables to authenticate, setting from the outer spec", - "items" : { - "example" : "aws_s3_buckets" + "InvitationWithToken" : { + "additionalProperties" : false, + "allOf" : [ { + "$ref" : "#/components/schemas/Invitation" + }, { + "properties" : { + "token" : { + "description" : "The token used to accept the invitation", + "format" : "uuid", + "type" : "string" } }, - "skip_tables" : { - "description" : "Tables to skip authentication, setting from the outer spec", - "items" : { - "example" : "aws_s3_buckets" - } + "required" : [ "token" ] + } ] + }, + "TenantUser" : { + "additionalProperties" : false, + "description" : "Tenant information of a platform user", + "properties" : { + "tenant_url" : { + "description" : "URL of the tenant", + "format" : "url", + "type" : "string", + "x-go-name" : "TenantURL" }, - "skip_dependent_tables" : { - "description" : "Whether to skip dependent tables, setting from the outer spec" + "provider" : { + "description" : "Login provider of the tenant", + "type" : "string" } }, - "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] + "required" : [ "tenant_url" ] }, - "ConnectorAuthResponseAWS" : { - "additionalProperties" : false, - "description" : "AWS connector authentication response to start the authentication process", + "UserID" : { + "description" : "ID of the User", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "UserID" + }, + "APIKeyName" : { + "description" : "Name of the API key", + "example" : "cli-api-key", + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$", + "type" : "string" + }, + "APIKeyID" : { + "description" : "ID of the API key", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "APIKeyID" + }, + "APIKeyScope" : { + "description" : "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", + "enum" : [ "read-and-write", "syncs-operations-only" ], + "type" : "string" + }, + "APIKey" : { + "description" : "API Key to interact with CloudQuery Cloud under specific team", "properties" : { - "redirect_url" : { - "description" : "URL to redirect the user to, to authenticate", - "type" : "string", - "x-go-name" : "RedirectURL" + "name" : { + "$ref" : "#/components/schemas/APIKeyName" + }, + "created_by" : { + "description" : "email of the user that created the API key", + "example" : "user@example.com", + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/APIKeyID" + }, + "key" : { + "description" : "API key. Will be shown only in the response when creating the key.", + "example" : "1234567890abcdef1234567890abcdef", + "type" : "string" }, - "role_template_url" : { - "description" : "URL to the role template, to present to the user", - "type" : "string", - "x-go-name" : "RoleTemplateURL" + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "suggested_external_id" : { - "description" : "External ID suggested to enter into the role definition", - "type" : "string", - "x-go-name" : "SuggestedExternalID" + "expires_at" : { + "description" : "Timestamp at which API key will stop working", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "suggested_policy_arns" : { - "description" : "List of AWS policy ARNs suggested to grant inside the role definition", - "items" : { - "type" : "string" - }, - "type" : "array", - "x-go-name" : "SuggestedPolicyARNs" - } - }, - "required" : [ "redirect_url", "role_template_url", "suggested_external_id", "suggested_policy_arns" ] - }, - "ConnectorAuthFinishRequestAWS" : { - "additionalProperties" : false, - "description" : "AWS connector authentication request, filled in after the user has authenticated through AWS", - "properties" : { - "role_arn" : { - "description" : "ARN of role created by the user", - "type" : "string", - "x-go-name" : "RoleARN" + "last_access_at" : { + "description" : "Timestamp at which API key was last used - accurate to the day only.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "external_id" : { - "description" : "External ID in the role definition. Optional. If not provided the previously suggested external ID will be used. Empty string will remove the external ID.", - "type" : "string", - "x-go-name" : "ExternalID" + "expired" : { + "description" : "Whether the API key has expired or not", + "example" : false, + "type" : "boolean" + }, + "scope" : { + "$ref" : "#/components/schemas/APIKeyScope" } }, - "required" : [ "role_arn" ] + "required" : [ "expired", "expires_at", "id", "name", "scope" ] }, - "ConnectorAuthRequestGCP" : { + "RegistryAuthToken" : { "additionalProperties" : false, - "description" : "GCP connector authentication request to start the authentication process", + "description" : "JWT token for the image registry", "properties" : { - "plugin_team" : { - "description" : "Team that owns the plugin we are authenticating the connector for", - "example" : "cloudquery", - "type" : "string" - }, - "plugin_kind" : { - "description" : "Kind of the plugin", - "example" : "source", + "access_token" : { "type" : "string" }, - "plugin_name" : { - "description" : "Name of the plugin", - "example" : "aws", + "token" : { "type" : "string" } }, - "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] + "required" : [ "access_token", "token" ] }, - "ConnectorAuthResponseGCP" : { + "DockerError" : { "additionalProperties" : false, - "description" : "GCP connector authentication response to start the authentication process", + "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry", "properties" : { - "service_account" : { - "description" : "CloudQuery GCP Service Account to grant access to", + "details" : { "type" : "string" } }, - "required" : [ "service_account" ] + "required" : [ "details" ], + "title" : "Docker Error" }, - "ConnectorAuthRequestOAuth" : { - "additionalProperties" : { }, - "description" : "OAuth connector authentication request to start the authentication process", - "properties" : { - "plugin_team" : { - "description" : "Team that owns the plugin we are authenticating the connector for", - "example" : "cloudquery" - }, - "plugin_kind" : { - "description" : "Kind of the plugin", - "example" : "source" - }, - "plugin_name" : { - "description" : "Name of the plugin", - "example" : "googleanalytics" - }, - "plugin_version" : { - "description" : "Version of the plugin", - "example" : "v3.0.0" - }, - "base_url" : { - "description" : "Base of the URL the callback url will be constructed from", - "example" : "https://cloud.cloudquery.io/oauth", - "x-go-name" : "BaseURL" - }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" - }, - "env" : { - "description" : "Environment variables used in the spec.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - } - }, - "tables" : { - "description" : "Tables to authenticate, setting from the outer spec", - "items" : { - "example" : "github_organizations" - } - }, - "skip_tables" : { - "description" : "Tables to skip authentication, setting from the outer spec", - "items" : { - "example" : "github_organizations" - } - }, - "skip_dependent_tables" : { - "description" : "Whether to skip dependent tables, setting from the outer spec" - }, - "flavor" : { - "description" : "Override default flavor" - } - }, - "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ] + "ManagedDatabaseID" : { + "description" : "The identifier for the managed database", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ManagedDatabaseID" }, - "ConnectorAuthResponseOAuth" : { - "additionalProperties" : false, - "description" : "OAuth connector authentication response to start the authentication process", - "properties" : { - "redirect_url" : { - "description" : "URL to redirect the user to, to authenticate", - "type" : "string", - "x-go-name" : "RedirectURL" - } - }, - "required" : [ "redirect_url" ] + "ManagedDatabaseStatus" : { + "description" : "The status of the managed database", + "enum" : [ "pending", "ready", "failed", "expired" ], + "type" : "string" }, - "ConnectorAuthFinishRequestOAuth" : { - "additionalProperties" : { }, - "description" : "OAuth connector authentication request, filled in after the user has authenticated through OAuth", + "ManagedDatabase" : { + "description" : "Managed Database definition", "properties" : { - "return_url" : { - "description" : "URL the user was redirected to (including new parameter values) after the OAuth flow is complete", - "x-go-name" : "ReturnURL" + "created_at" : { + "description" : "Time the managed database was created", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "base_url" : { - "description" : "Base of the URL the callback url was constructed from", - "example" : "https://cloud.cloudquery.io/oauth", - "x-go-name" : "BaseURL" + "connection_string" : { + "description" : "The connection string to the database", + "type" : "string" }, - "spec" : { - "additionalProperties" : false, - "format" : "Plugin parameters, specific to each plugin", - "type" : "object" + "expiration" : { + "description" : "Time the managed database should expire", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" }, - "env" : { - "description" : "Environment variables used in the spec.", - "items" : { - "$ref" : "#/components/schemas/SyncEnvCreate" - } + "id" : { + "$ref" : "#/components/schemas/ManagedDatabaseID" + }, + "status" : { + "$ref" : "#/components/schemas/ManagedDatabaseStatus" } }, - "required" : [ "base_url", "return_url" ] + "required" : [ "created_at", "id", "status" ] + }, + "ManagedDatabaseCreate" : { + "description" : "Managed Database creation", + "type" : "object" }, "FunctionCallOutput" : { "additionalProperties" : { }, @@ -11871,154 +8582,6 @@ }, "required" : [ "expires_at", "name" ] }, - "UpdateSyncTestConnectionForSyncSource_request" : { - "properties" : { - "status" : { - "$ref" : "#/components/schemas/SyncTestConnectionStatus" - }, - "failure_reason" : { - "description" : "Reason for failure", - "example" : "password authentication failed for user \"exampleuser\"", - "type" : "string" - }, - "failure_code" : { - "description" : "Code for failure", - "example" : "INVALID_CREDENTIALS", - "type" : "string" - } - }, - "required" : [ "status" ] - }, - "ListSyncSources_200_response" : { - "properties" : { - "items" : { - "items" : { - "$ref" : "#/components/schemas/SyncSource" - }, - "type" : "array" - }, - "metadata" : { - "$ref" : "#/components/schemas/ListMetadata" - } - }, - "required" : [ "items", "metadata" ] - }, - "ListSyncSourceSyncs_200_response" : { - "properties" : { - "items" : { - "items" : { - "$ref" : "#/components/schemas/Sync" - }, - "type" : "array" - }, - "metadata" : { - "$ref" : "#/components/schemas/ListMetadata" - } - }, - "required" : [ "items", "metadata" ] - }, - "ListSyncDestinations_200_response" : { - "properties" : { - "items" : { - "items" : { - "$ref" : "#/components/schemas/SyncDestination" - }, - "type" : "array" - }, - "metadata" : { - "$ref" : "#/components/schemas/ListMetadata" - } - }, - "required" : [ "items", "metadata" ] - }, - "ListSyncRuns_200_response" : { - "properties" : { - "items" : { - "items" : { - "$ref" : "#/components/schemas/SyncRun" - }, - "type" : "array" - }, - "metadata" : { - "$ref" : "#/components/schemas/ListMetadata" - } - }, - "required" : [ "items", "metadata" ] - }, - "UpdateSyncRun_request" : { - "properties" : { - "status" : { - "$ref" : "#/components/schemas/SyncRunStatus" - }, - "status_reason" : { - "$ref" : "#/components/schemas/SyncRunStatusReason" - } - } - }, - "CreateSyncRunProgress_request" : { - "properties" : { - "rows" : { - "description" : "Number of rows synced so far", - "format" : "int64", - "type" : "integer" - }, - "warnings" : { - "description" : "Number of warnings encountered so far", - "format" : "int64", - "type" : "integer" - }, - "errors" : { - "description" : "Number of errors encountered so far", - "format" : "int64", - "type" : "integer" - }, - "status" : { - "$ref" : "#/components/schemas/SyncRunStatus" - }, - "shard_num" : { - "description" : "The shard number that this progress update is for", - "format" : "int32", - "type" : "integer" - }, - "shard_total" : { - "description" : "The total number of shards for this sync run", - "format" : "int32", - "type" : "integer" - }, - "table_progress" : { - "$ref" : "#/components/schemas/SyncRunTableProgress" - } - }, - "required" : [ "errors", "rows", "warnings" ] - }, - "Sync_Run_Logs" : { - "additionalProperties" : { }, - "properties" : { - "location" : { - "description" : "The location to download the sync run logs from", - "format" : "uri" - } - }, - "required" : [ "location" ], - "title" : "Sync Run Logs" - }, - "GetSyncRunConnectorIdentity_200_response" : { - "properties" : { - "aws" : { - "$ref" : "#/components/schemas/ConnectorIdentityResponseAWS" - } - } - }, - "GetSyncRunConnectorCredentials_200_response" : { - "properties" : { - "aws" : { - "$ref" : "#/components/schemas/ConnectorCredentialsResponseAWS" - }, - "oauth" : { - "$ref" : "#/components/schemas/ConnectorCredentialsResponseOAuth" - } - } - }, "GetManagedDatabases_200_response" : { "properties" : { "items" : { @@ -12033,42 +8596,6 @@ }, "required" : [ "items", "metadata" ] }, - "ListConnectors_200_response" : { - "properties" : { - "items" : { - "items" : { - "$ref" : "#/components/schemas/Connector" - }, - "type" : "array" - }, - "metadata" : { - "$ref" : "#/components/schemas/ListMetadata" - } - }, - "required" : [ "items", "metadata" ] - }, - "GetConnectorAuthStatusAWS_200_response" : { - "properties" : { - "role_arn" : { - "description" : "ARN of role created by the user", - "type" : "string", - "x-go-name" : "RoleARN" - }, - "external_id" : { - "description" : "External ID used for the role", - "type" : "string", - "x-go-name" : "ExternalID" - } - } - }, - "GetConnectorAuthStatusGCP_200_response" : { - "properties" : { - "service_account" : { - "description" : "CloudQuery GCP Service Account to grant access to", - "type" : "string" - } - } - }, "ActivatePlatform_request" : { "additionalProperties" : { }, "properties" : { @@ -12295,21 +8822,6 @@ } }, "required" : [ "end", "start" ] - }, - "SyncRunTableProgress_value" : { - "properties" : { - "errors" : { - "description" : "Number of errors for this table", - "format" : "int64", - "type" : "integer" - }, - "rows" : { - "description" : "Number of rows processed for this table", - "format" : "int64", - "type" : "integer" - } - }, - "required" : [ "errors", "rows" ] } }, "securitySchemes" : { From 1bde7962281a7e265eefd53928b6ff674c59755d Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 1 Dec 2025 00:58:01 +0000 Subject: [PATCH 322/343] chore(deps): Update dependency golangci/golangci-lint to v2.6.2 (#337) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.5.0` -> `v2.6.2` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.6.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v262) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.6.1...v2.6.2) *Released on 2025-11-14* 1. Bug fixes - `fmt` command with symlinks - use file depending on build configuration to invalidate cache 2. Linters bug fixes - `testableexamples`: from 1.0.0 to 1.0.1 - `testpackage`: from 1.1.1 to 1.1.2 ### [`v2.6.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v261) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.6.0...v2.6.1) *Released on 2025-11-04* 1. Linters bug fixes - `copyloopvar`: from 1.2.1 to 1.2.2 - `go-critic`: from 0.14.0 to 0.14.2 ### [`v2.6.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v260) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.5.0...v2.6.0) *Released on 2025-10-29* 1. New linters - Add `modernize` analyzer suite 2. Linters new features or changes - `arangolint`: from 0.2.0 to 0.3.1 - `dupword`: from 0.1.6 to 0.1.7 (new option `comments-only`) - `go-critic`: from 0.13.0 to 0.14.0 (new rules/checkers: `zeroByteRepeat`, `dupOption`) - `gofumpt`: from 0.9.1 to 0.9.2 ("clothe" naked returns is now controlled by the `extra-rules` option) - `perfsprint`: from 0.9.1 to 0.10.0 (new options: `concat-loop`, `loop-other-ops`) - `wsl`: from 5.2.0 to 5.3.0 3. Linters bug fixes - `dupword`: from 0.1.6 to 0.1.7 - `durationcheck`: from 0.0.10 to 0.0.11 - `exptostd`: from 0.4.4 to 0.4.5 - `fatcontext`: from 0.8.1 to 0.9.0 - `forbidigo`: from 2.1.0 to 2.3.0 - `ginkgolinter`: from 0.21.0 to 0.21.2 - `godoc-lint`: from 0.10.0 to 0.10.1 - `gomoddirectives`: from 0.7.0 to 0.7.1 - `gosec`: from 2.22.8 to 2.22.10 - `makezero`: from 2.0.1 to 2.1.0 - `nilerr`: from 0.1.1 to 0.1.2 - `paralleltest`: from 1.0.14 to 1.0.15 - `protogetter`: from 0.3.16 to 0.3.17 - `unparam`: from [`0df0534`](https://redirect.github.com/golangci/golangci-lint/commit/0df0534333a4) to [`5beb8c8`](https://redirect.github.com/golangci/golangci-lint/commit/5beb8c8f8f15) 4. Misc. - fix: ignore some files to hash the version for custom build
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 8f3611a..edd517f 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -23,4 +23,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.5.0 + version: v2.6.2 From 894ecb967918fc57fffcfd5ec90cb85d2b693b8b Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:36:24 +0000 Subject: [PATCH 323/343] chore(deps): Update golangci/golangci-lint-action action to v9 (#339) --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index edd517f..c18da53 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -21,6 +21,6 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v8 + uses: golangci/golangci-lint-action@v9 with: version: v2.6.2 From f8ebfc2f7aac238c5a4a4729922e45c6856844a0 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:37:44 +0000 Subject: [PATCH 324/343] chore(deps): Update actions/checkout action to v6 (#338) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://redirect.github.com/actions/checkout) | action | major | `v5` -> `v6` | --- ### Release Notes
actions/checkout (actions/checkout) ### [`v6`](https://redirect.github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v600) [Compare Source](https://redirect.github.com/actions/checkout/compare/v5...v6) - Persist creds to a separate file by [@​ericsciple](https://redirect.github.com/ericsciple) in [https://github.com/actions/checkout/pull/2286](https://redirect.github.com/actions/checkout/pull/2286) - Update README to include Node.js 24 support details and requirements by [@​salmanmkc](https://redirect.github.com/salmanmkc) in [https://github.com/actions/checkout/pull/2248](https://redirect.github.com/actions/checkout/pull/2248)
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- .github/workflows/lint_golang.yml | 2 +- .github/workflows/unittest.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 797273d..f504cfd 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: token: ${{ secrets.GH_CQ_BOT }} diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index c18da53..2cdd101 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: go-version-file: go.mod diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 8d6903d..7a36c52 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -20,7 +20,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Check out code into the Go module directory - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Set up Go 1.x uses: actions/setup-go@v6 with: From e2d540410ff33e267af459c5154a1f4e33c9c7f6 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:42:39 +0000 Subject: [PATCH 325/343] chore(main): Release v1.14.6 (#332) :robot: I have created a release *beep* *boop* --- ## [1.14.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.5...v1.14.6) (2025-12-02) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#331](https://github.com/cloudquery/cloudquery-api-go/issues/331)) ([04860b2](https://github.com/cloudquery/cloudquery-api-go/commit/04860b27f7a42b8928c9c3b820ec9a67f3246e99)) * Generate CloudQuery Go API Client from `spec.json` ([#333](https://github.com/cloudquery/cloudquery-api-go/issues/333)) ([c0ea4fb](https://github.com/cloudquery/cloudquery-api-go/commit/c0ea4fb176ca14761f7db0264ed48d0d0a61498a)) * Generate CloudQuery Go API Client from `spec.json` ([#334](https://github.com/cloudquery/cloudquery-api-go/issues/334)) ([8c3d7e1](https://github.com/cloudquery/cloudquery-api-go/commit/8c3d7e17cd5454cfc38f6a8957cdec16da678794)) * Generate CloudQuery Go API Client from `spec.json` ([#335](https://github.com/cloudquery/cloudquery-api-go/issues/335)) ([ed62fb1](https://github.com/cloudquery/cloudquery-api-go/commit/ed62fb1d3f5f2f5dd38528d6b5a7035f5fae88a1)) * Generate CloudQuery Go API Client from `spec.json` ([#336](https://github.com/cloudquery/cloudquery-api-go/issues/336)) ([fc7968c](https://github.com/cloudquery/cloudquery-api-go/commit/fc7968c99994838255f0c57aaff3a8022e6de21b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d024041..97189e6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.5" + ".": "1.14.6" } diff --git a/CHANGELOG.md b/CHANGELOG.md index e7e1179..08be42e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [1.14.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.5...v1.14.6) (2025-12-02) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#331](https://github.com/cloudquery/cloudquery-api-go/issues/331)) ([04860b2](https://github.com/cloudquery/cloudquery-api-go/commit/04860b27f7a42b8928c9c3b820ec9a67f3246e99)) +* Generate CloudQuery Go API Client from `spec.json` ([#333](https://github.com/cloudquery/cloudquery-api-go/issues/333)) ([c0ea4fb](https://github.com/cloudquery/cloudquery-api-go/commit/c0ea4fb176ca14761f7db0264ed48d0d0a61498a)) +* Generate CloudQuery Go API Client from `spec.json` ([#334](https://github.com/cloudquery/cloudquery-api-go/issues/334)) ([8c3d7e1](https://github.com/cloudquery/cloudquery-api-go/commit/8c3d7e17cd5454cfc38f6a8957cdec16da678794)) +* Generate CloudQuery Go API Client from `spec.json` ([#335](https://github.com/cloudquery/cloudquery-api-go/issues/335)) ([ed62fb1](https://github.com/cloudquery/cloudquery-api-go/commit/ed62fb1d3f5f2f5dd38528d6b5a7035f5fae88a1)) +* Generate CloudQuery Go API Client from `spec.json` ([#336](https://github.com/cloudquery/cloudquery-api-go/issues/336)) ([fc7968c](https://github.com/cloudquery/cloudquery-api-go/commit/fc7968c99994838255f0c57aaff3a8022e6de21b)) + ## [1.14.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.4...v1.14.5) (2025-10-01) From a05f180b68c7993a2bde94de2302fca012883c6e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:02:24 +0000 Subject: [PATCH 326/343] fix: Generate CloudQuery Go API Client from `spec.json` (#340) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- models.gen.go | 6 ------ spec.json | 6 ------ 2 files changed, 12 deletions(-) diff --git a/models.gen.go b/models.gen.go index b9e8799..31a201b 100644 --- a/models.gen.go +++ b/models.gen.go @@ -969,9 +969,6 @@ type ListPlugin struct { LatestVersion *VersionName `json:"latest_version,omitempty"` Logo string `json:"logo"` - // MinimumCloudVersion Minimum plugin version that is supported in CloudQuery managed syncs. - MinimumCloudVersion *string `json:"minimum_cloud_version,omitempty"` - // Name The unique name for the plugin. Name PluginName `json:"name"` @@ -1155,9 +1152,6 @@ type Plugin struct { Kind PluginKind `json:"kind"` Logo string `json:"logo"` - // MinimumCloudVersion Minimum plugin version that is supported in CloudQuery managed syncs. - MinimumCloudVersion *string `json:"minimum_cloud_version,omitempty"` - // Name The unique name for the plugin. Name PluginName `json:"name"` diff --git a/spec.json b/spec.json index 70fe722..3b7e27f 100644 --- a/spec.json +++ b/spec.json @@ -5735,12 +5735,6 @@ "example" : 1000, "format" : "int64", "type" : "integer" - }, - "minimum_cloud_version" : { - "description" : "Minimum plugin version that is supported in CloudQuery managed syncs.", - "example" : "v1.2.3", - "maxLength" : 64, - "type" : "string" } }, "required" : [ "category", "created_at", "display_name", "free_rows_per_month", "kind", "logo", "name", "official", "release_stage", "short_description", "team_name", "tier", "updated_at", "usd_per_row" ], From 859b30e58d37e14296f5b522f4bc976572807ecb Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:29:40 +0000 Subject: [PATCH 327/343] chore(main): Release v1.14.7 (#341) :robot: I have created a release *beep* *boop* --- ## [1.14.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.6...v1.14.7) (2025-12-15) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#340](https://github.com/cloudquery/cloudquery-api-go/issues/340)) ([a05f180](https://github.com/cloudquery/cloudquery-api-go/commit/a05f180b68c7993a2bde94de2302fca012883c6e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 97189e6..f576a7f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.6" + ".": "1.14.7" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 08be42e..21b9000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.14.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.6...v1.14.7) (2025-12-15) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#340](https://github.com/cloudquery/cloudquery-api-go/issues/340)) ([a05f180](https://github.com/cloudquery/cloudquery-api-go/commit/a05f180b68c7993a2bde94de2302fca012883c6e)) + ## [1.14.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.5...v1.14.6) (2025-12-02) From 61286aed3cf97aa0e50c44c933aa2526b25963d5 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:47:21 +0000 Subject: [PATCH 328/343] chore(deps): Update dependency golangci/golangci-lint to v2.7.2 (#342) --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 2cdd101..e091107 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -23,4 +23,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.6.2 + version: v2.7.2 From d5f9e0a38235f1a7d79589617995daa62a64f409 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:53:09 +0000 Subject: [PATCH 329/343] chore(deps): Update peter-evans/create-pull-request action to v8 (#343) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [peter-evans/create-pull-request](https://redirect.github.com/peter-evans/create-pull-request) | action | major | `v7` -> `v8` | --- ### Release Notes
peter-evans/create-pull-request (peter-evans/create-pull-request) ### [`v8`](https://redirect.github.com/peter-evans/create-pull-request/compare/v7...v8) [Compare Source](https://redirect.github.com/peter-evans/create-pull-request/compare/v7...v8)
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index f504cfd..47f7230 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -35,7 +35,7 @@ jobs: go generate ./... - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 with: # required so the PR triggers workflow runs token: ${{ secrets.GH_CQ_BOT }} From 31fbfc7d15ca31395e4f3e3a6a4d2d162fd6f079 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 22 Dec 2025 10:37:55 +0000 Subject: [PATCH 330/343] fix: Generate CloudQuery Go API Client from `spec.json` (#344) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++ models.gen.go | 107 ++++++++++++++++++++++++++++++ spec.json | 67 +++++++++++++++++++ 3 files changed, 353 insertions(+) diff --git a/client.gen.go b/client.gen.go index da298df..f55118b 100644 --- a/client.gen.go +++ b/client.gen.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/go-retryablehttp" "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" ) // RequestEditorFn is the function signature for the RequestEditor callback function @@ -158,6 +159,11 @@ type ClientInterface interface { ReportPlatformData(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ReportTenantPlatformDataWithBody request with any body + ReportTenantPlatformDataWithBody(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ReportTenantPlatformData(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginNotificationRequests request ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -827,6 +833,30 @@ func (c *Client) ReportPlatformData(ctx context.Context, body ReportPlatformData return c.Client.Do(req) } +func (c *Client) ReportTenantPlatformDataWithBody(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportTenantPlatformDataRequestWithBody(c.Server, tenantID, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ReportTenantPlatformData(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportTenantPlatformDataRequest(c.Server, tenantID, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListPluginNotificationRequestsRequest(c.Server, params) if err != nil { @@ -3420,6 +3450,53 @@ func NewReportPlatformDataRequestWithBody(server string, contentType string, bod return req, nil } +// NewReportTenantPlatformDataRequest calls the generic ReportTenantPlatformData builder with application/json body +func NewReportTenantPlatformDataRequest(server string, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewReportTenantPlatformDataRequestWithBody(server, tenantID, "application/json", bodyReader) +} + +// NewReportTenantPlatformDataRequestWithBody generates requests for ReportTenantPlatformData with any type of body +func NewReportTenantPlatformDataRequestWithBody(server string, tenantID openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "tenant_id", runtime.ParamLocationPath, tenantID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/platform/%s/report", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { var err error @@ -9109,6 +9186,11 @@ type ClientWithResponsesInterface interface { ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) + // ReportTenantPlatformDataWithBodyWithResponse request with any body + ReportTenantPlatformDataWithBodyWithResponse(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) + + ReportTenantPlatformDataWithResponse(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) + // ListPluginNotificationRequestsWithResponse request ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) @@ -9921,6 +10003,32 @@ func (r ReportPlatformDataResponse) StatusCode() int { return 0 } +type ReportTenantPlatformDataResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ReportTenantPlatformDataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportTenantPlatformDataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type ListPluginNotificationRequestsResponse struct { Body []byte HTTPResponse *http.Response @@ -12753,6 +12861,23 @@ func (c *ClientWithResponses) ReportPlatformDataWithResponse(ctx context.Context return ParseReportPlatformDataResponse(rsp) } +// ReportTenantPlatformDataWithBodyWithResponse request with arbitrary body returning *ReportTenantPlatformDataResponse +func (c *ClientWithResponses) ReportTenantPlatformDataWithBodyWithResponse(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) { + rsp, err := c.ReportTenantPlatformDataWithBody(ctx, tenantID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportTenantPlatformDataResponse(rsp) +} + +func (c *ClientWithResponses) ReportTenantPlatformDataWithResponse(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) { + rsp, err := c.ReportTenantPlatformData(ctx, tenantID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportTenantPlatformDataResponse(rsp) +} + // ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) @@ -14811,6 +14936,60 @@ func ParseReportPlatformDataResponse(rsp *http.Response) (*ReportPlatformDataRes return response, nil } +// ParseReportTenantPlatformDataResponse parses an HTTP response from a ReportTenantPlatformDataWithResponse call +func ParseReportTenantPlatformDataResponse(rsp *http.Response) (*ReportTenantPlatformDataResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportTenantPlatformDataResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index 31a201b..f1c7bd7 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1790,6 +1790,14 @@ type ReportPlatformDataRequest struct { AdditionalProperties map[string]interface{} `json:"-"` } +// ReportTenantPlatformDataRequest defines model for ReportTenantPlatformData_request. +type ReportTenantPlatformDataRequest struct { + Host string `json:"host"` + UserAdditions interface{} `json:"user_additions,omitempty"` + UserRemovals interface{} `json:"user_removals,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + // ResetUserPasswordRequest defines model for ResetUserPassword_request. type ResetUserPasswordRequest struct { // Email Email address to reset @@ -2639,6 +2647,9 @@ type RenewPlatformActivationJSONRequestBody = RenewPlatformActivationRequest // ReportPlatformDataJSONRequestBody defines body for ReportPlatformData for application/json ContentType. type ReportPlatformDataJSONRequestBody = ReportPlatformDataRequest +// ReportTenantPlatformDataJSONRequestBody defines body for ReportTenantPlatformData for application/json ContentType. +type ReportTenantPlatformDataJSONRequestBody = ReportTenantPlatformDataRequest + // CreatePluginNotificationRequestJSONRequestBody defines body for CreatePluginNotificationRequest for application/json ContentType. type CreatePluginNotificationRequestJSONRequestBody = PluginNotificationRequestCreate @@ -4022,6 +4033,102 @@ func (a ReportPlatformDataRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } +// Getter for additional properties for ReportTenantPlatformDataRequest. Returns the specified +// element and whether it was found +func (a ReportTenantPlatformDataRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ReportTenantPlatformDataRequest +func (a *ReportTenantPlatformDataRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ReportTenantPlatformDataRequest to handle AdditionalProperties +func (a *ReportTenantPlatformDataRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["host"]; found { + err = json.Unmarshal(raw, &a.Host) + if err != nil { + return fmt.Errorf("error reading 'host': %w", err) + } + delete(object, "host") + } + + if raw, found := object["user_additions"]; found { + err = json.Unmarshal(raw, &a.UserAdditions) + if err != nil { + return fmt.Errorf("error reading 'user_additions': %w", err) + } + delete(object, "user_additions") + } + + if raw, found := object["user_removals"]; found { + err = json.Unmarshal(raw, &a.UserRemovals) + if err != nil { + return fmt.Errorf("error reading 'user_removals': %w", err) + } + delete(object, "user_removals") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ReportTenantPlatformDataRequest to handle AdditionalProperties +func (a ReportTenantPlatformDataRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["host"], err = json.Marshal(a.Host) + if err != nil { + return nil, fmt.Errorf("error marshaling 'host': %w", err) + } + + if a.UserAdditions != nil { + object["user_additions"], err = json.Marshal(a.UserAdditions) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_additions': %w", err) + } + } + + if a.UserRemovals != nil { + object["user_removals"], err = json.Marshal(a.UserRemovals) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_removals': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + // Getter for additional properties for ResetUserPasswordRequest. Returns the specified // element and whether it was found func (a ResetUserPasswordRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index 3b7e27f..720cb73 100644 --- a/spec.json +++ b/spec.json @@ -4901,6 +4901,56 @@ "x-internal" : true } }, + "/platform/{tenant_id}/report" : { + "post" : { + "description" : "Report tenant platform data", + "operationId" : "ReportTenantPlatformData", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "tenant_id", + "required" : true, + "schema" : { + "format" : "uuid", + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TenantID" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReportTenantPlatformData_request" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "platform" ], + "x-internal" : true + } + }, "/teams/{team_name}/ai-onboarding/chat" : { "post" : { "description" : "Send a chat message to the AI onboarding assistant", @@ -8685,6 +8735,23 @@ }, "required" : [ "installation_id" ] }, + "ReportTenantPlatformData_request" : { + "additionalProperties" : { }, + "properties" : { + "host" : { + "type" : "string" + }, + "user_additions" : { + "items" : { }, + "x-go-type-skip-optional-pointer" : true + }, + "user_removals" : { + "items" : { }, + "x-go-type-skip-optional-pointer" : true + } + }, + "required" : [ "host" ] + }, "AIOnboardingChat_request" : { "additionalProperties" : { }, "properties" : { From cf2cc8f1e203239b159f214642f4d075877190aa Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Fri, 2 Jan 2026 10:20:08 +0000 Subject: [PATCH 331/343] chore(main): Release v1.14.8 (#345) :robot: I have created a release *beep* *boop* --- ## [1.14.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.7...v1.14.8) (2025-12-22) ### Bug Fixes * Generate CloudQuery Go API Client from `spec.json` ([#344](https://github.com/cloudquery/cloudquery-api-go/issues/344)) ([31fbfc7](https://github.com/cloudquery/cloudquery-api-go/commit/31fbfc7d15ca31395e4f3e3a6a4d2d162fd6f079)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f576a7f..deb16d0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.7" + ".": "1.14.8" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 21b9000..b660e7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.14.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.7...v1.14.8) (2025-12-22) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#344](https://github.com/cloudquery/cloudquery-api-go/issues/344)) ([31fbfc7](https://github.com/cloudquery/cloudquery-api-go/commit/31fbfc7d15ca31395e4f3e3a6a4d2d162fd6f079)) + ## [1.14.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.6...v1.14.7) (2025-12-15) From 55b2f6c0e1330bbee95542e32f05599102139485 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Sun, 1 Feb 2026 01:16:53 +0000 Subject: [PATCH 332/343] chore(deps): Update dependency golangci/golangci-lint to v2.8.0 (#346) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.7.2` -> `v2.8.0` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.8.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v280) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.7.2...v2.8.0) *Released on 2026-01-07* 1. Linters new features or changes - `godoc-lint`: from 0.10.2 to 0.11.1 (new rule: `require-stdlib-doclink`) - `golines`: from [`442fd00`](https://redirect.github.com/golangci/golangci-lint/commit/442fd0091d95) to 0.14.0 - `gomoddirectives`: from 0.7.1 to 0.8.0 - `gosec`: from [`daccba6`](https://redirect.github.com/golangci/golangci-lint/commit/daccba6b93d7) to 2.22.11 (new rule: `G116`) - `modernize`: from 0.39.0 to 0.40.0 (new analyzers: `stringscut`, `unsafefuncs`) - `prealloc`: from 1.0.0 to 1.0.1 (message changes) - `unqueryvet`: from 1.3.0 to 1.4.0 (new options: `check-aliased-wildcard`, `check-string-concat`, `check-format-strings`, `check-string-builder`, `check-subqueries`, `ignored-functions`, `sql-builders`) 2. Linters bug fixes - `go-critic`: from 0.14.2 to 0.14.3 - `go-errorlint`: from 1.8.0 to 1.9.0 - `govet`: from 0.39.0 to 0.40.0 - `protogetter`: from 0.3.17 to 0.3.18 - `revive`: add missing enable-default-rules setting 3. Documentation - docs: split installation page
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index e091107..a89996e 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -23,4 +23,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.7.2 + version: v2.8.0 From d84801514bf5ddaefd888431a7dd9ed97a8dbd4f Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Sun, 1 Mar 2026 01:15:26 +0000 Subject: [PATCH 333/343] chore(deps): Update dependency golangci/golangci-lint to v2.10.1 (#347) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.8.0` -> `v2.10.1` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.10.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2101) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.10.0...v2.10.1) *Released on 2026-02-17* 1. Fixes - buildssa panic ### [`v2.10.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2100) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.9.0...v2.10.0) *Released on 2026-02-17* 1. Linters new features or changes - `ginkgolinter`: from 0.22.0 to 0.23.0 - `gosec`: from 2.22.11 to 2.23.0 (new rules: `G117`, `G602`, `G701`, `G702`, `G703`, `G704`, `G705`, `G706`) - `staticcheck`: from 0.6.1 to 0.7.0 2. Linters bug fixes - `godoclint`: from 0.11.1 to 0.11.2 ### [`v2.9.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v290) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.8.0...v2.9.0) *Released on 2026-02-10* 1. Enhancements - 🎉 go1.26 support 2. Linters new features or changes - `arangolint`: from 0.3.1 to 0.4.0 (new rule: detect potential query injections) - `ginkgolinter`: from 0.21.2 to 0.22.0 (support for wrappers) - `golines`: from 0.14.0 to 0.15.0 - `misspell`: from 0.7.0 to 0.8.0 - `revive`: from v1.13.0 to v1.14.0 (new rules: `epoch-naming`, `use-slices-sort`) - `unqueryvet`: from 1.4.0 to 1.5.3 (new options: `check-n1`, `check-sql-injection`, `check-tx-leaks`, `allow`, `custom-rules`) - `wsl_v5`: from 5.3.0 to 5.6.0 (new rule: `after-block`) 3. Linters bug fixes - `modernize`: from 0.41.0 to 0.42.0 - `prealloc`: from 1.0.1 to 1.0.2 - `protogetter`: from 0.3.18 to 0.3.20 4. Misc. - Log information about files when configuration verification - Emit an error when no linters enabled - Do not collect VCS information when loading code
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index a89996e..be57608 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -23,4 +23,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.8.0 + version: v2.10.1 From 0fc0f991252b688bdf3a94ceb940c0818fe6ad14 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 24 Mar 2026 08:56:27 +0000 Subject: [PATCH 334/343] fix: Generate CloudQuery Go API Client from `spec.json` (#348) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- spec.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec.json b/spec.json index 720cb73..0c46e28 100644 --- a/spec.json +++ b/spec.json @@ -6,7 +6,7 @@ "name" : "CloudQuery Support Team", "url" : "https://cloudquery.io" }, - "description" : "Welcome to the CloudQuery API documentation! This API can be used to interact with the CloudQuery platform. The API allows you to manage your teams, usage, spend limits, plugins, addons, cloud syncs, and much more.\n\nThe API is secured using bearer tokens. To get started, you can generate an API key from the CloudQuery dashboard. For a step-by-step guide, see: https://docs.cloudquery.io/docs/deployment/generate-api-key.\n\nThe base URL for the API is `https://api.cloudquery.io`.\n", + "description" : "Welcome to the CloudQuery API documentation! This API can be used to interact with the CloudQuery platform. The API allows you to manage your teams, usage, spend limits, plugins, addons, cloud syncs, and much more.\n\nThe API is secured using bearer tokens. To get started, you can generate an API key from the CloudQuery dashboard. For a step-by-step guide, see: https://www.cloudquery.io/docs/cli/managing-cloudquery/deployments/generate-api-key.\n\nThe base URL for the API is `https://api.cloudquery.io`.\n", "license" : { "name" : "MIT", "url" : "https://spdx.org/licenses/MIT" @@ -2551,7 +2551,7 @@ "tags" : [ "teams" ] }, "post" : { - "description" : "Create a spending limit for a team", + "description" : "Create a spending limit for a team. Deprecated.", "operationId" : "CreateSpendingLimit", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -2595,7 +2595,7 @@ "tags" : [ "teams" ] }, "put" : { - "description" : "Update a spending limit for a team", + "description" : "Update a spending limit for a team. Deprecated.", "operationId" : "UpdateSpendingLimit", "parameters" : [ { "$ref" : "#/components/parameters/team_name" @@ -3026,7 +3026,7 @@ }, "/teams/{team_name}/spend" : { "get" : { - "description" : "Get team spend for defined period.", + "description" : "Get team spend for defined period. Deprecated.", "operationId" : "GetTeamSpend", "parameters" : [ { "$ref" : "#/components/parameters/team_name" From 2a62aa288904b348ed8264ab7d34d01045a98fe1 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:24:48 +0000 Subject: [PATCH 335/343] chore(deps): Pin dependencies (#350) --- .github/workflows/gen-client.yml | 6 +++--- .github/workflows/lint_golang.yml | 6 +++--- .github/workflows/release-pr.yml | 4 ++-- .github/workflows/unittest.yml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 47f7230..dc81fd8 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: token: ${{ secrets.GH_CQ_BOT }} @@ -26,7 +26,7 @@ jobs: sudo rm -rf .generated - name: Set up Go 1.x - uses: actions/setup-go@v6 + uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 with: go-version-file: go.mod @@ -35,7 +35,7 @@ jobs: go generate ./... - name: Create Pull Request - uses: peter-evans/create-pull-request@v8 + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8 with: # required so the PR triggers workflow runs token: ${{ secrets.GH_CQ_BOT }} diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index be57608..1553f6e 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -16,11 +16,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v6 - - uses: actions/setup-go@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v9 + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 with: version: v2.10.1 diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 212ea7a..fa76947 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: googleapis/release-please-action@v4 + - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4 id: release with: token: ${{ secrets.GH_CQ_BOT }} @@ -31,7 +31,7 @@ jobs: with: prerelease: true - name: Trigger Renovate - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == '' with: github-token: ${{ secrets.GH_CQ_BOT }} diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 7a36c52..7257239 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -20,9 +20,9 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Check out code into the Go module directory - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Set up Go 1.x - uses: actions/setup-go@v6 + uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 with: go-version-file: go.mod - run: go mod download From d3418b9f822b1d674b96294fe4b9b2dda67d8361 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:18:06 +0000 Subject: [PATCH 336/343] fix(deps): Update dependency go to v1.26.1 (#270) --- go.mod | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ff6a331..899ed9a 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/cloudquery/cloudquery-api-go -go 1.23 - -toolchain go1.23.10 +go 1.26.1 require ( github.com/adrg/xdg v0.5.3 From e0f03ad7babc781a0a823b42dcd793c93d6e2e6e Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:20:23 +0000 Subject: [PATCH 337/343] chore(main): Release v1.14.9 (#349) :robot: I have created a release *beep* *boop* --- ## [1.14.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.8...v1.14.9) (2026-03-26) ### Bug Fixes * **deps:** Update dependency go to v1.26.1 ([#270](https://github.com/cloudquery/cloudquery-api-go/issues/270)) ([d3418b9](https://github.com/cloudquery/cloudquery-api-go/commit/d3418b9f822b1d674b96294fe4b9b2dda67d8361)) * Generate CloudQuery Go API Client from `spec.json` ([#348](https://github.com/cloudquery/cloudquery-api-go/issues/348)) ([0fc0f99](https://github.com/cloudquery/cloudquery-api-go/commit/0fc0f991252b688bdf3a94ceb940c0818fe6ad14)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index deb16d0..f70c31b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.8" + ".": "1.14.9" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b660e7f..6675811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.14.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.8...v1.14.9) (2026-03-26) + + +### Bug Fixes + +* **deps:** Update dependency go to v1.26.1 ([#270](https://github.com/cloudquery/cloudquery-api-go/issues/270)) ([d3418b9](https://github.com/cloudquery/cloudquery-api-go/commit/d3418b9f822b1d674b96294fe4b9b2dda67d8361)) +* Generate CloudQuery Go API Client from `spec.json` ([#348](https://github.com/cloudquery/cloudquery-api-go/issues/348)) ([0fc0f99](https://github.com/cloudquery/cloudquery-api-go/commit/0fc0f991252b688bdf3a94ceb940c0818fe6ad14)) + ## [1.14.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.7...v1.14.8) (2025-12-22) From a97d033874aaac22222e61b5210a17abe90d833a Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Fri, 27 Mar 2026 12:30:46 +0000 Subject: [PATCH 338/343] chore(ci): Replace GH_CQ_BOT PAT with GitHub App tokens (#351) Replace GH_CQ_BOT PAT with short-lived tokens from the cloudquery-ci GitHub App. --- .github/workflows/gen-client.yml | 24 ++++++++++++++++++++---- .github/workflows/release-pr.yml | 21 +++++++++++++++++++-- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index dc81fd8..e6d482b 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -10,14 +10,31 @@ jobs: timeout-minutes: 30 runs-on: ubuntu-latest steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + permission-contents: write + permission-pull-requests: write + - name: Generate GitHub App token for cloud repo + id: app-token-cloud + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + repositories: | + cloud + permission-contents: read - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - token: ${{ secrets.GH_CQ_BOT }} + token: ${{ steps.app-token.outputs.token }} - name: Get Specs File run: | - curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/cloud/internal/servergen/spec.json -o spec.json + curl -H "Authorization: token ${{ steps.app-token-cloud.outputs.token }}" https://raw.githubusercontent.com/cloudquery/cloud/main/cloud/internal/servergen/spec.json -o spec.json - name: Format Specs File run: | @@ -38,11 +55,10 @@ jobs: uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8 with: # required so the PR triggers workflow runs - token: ${{ secrets.GH_CQ_BOT }} + token: ${{ steps.app-token.outputs.token }} branch: fix/gen-cloudquery-api base: main title: 'fix: Generate CloudQuery Go API Client from `spec.json`' commit-message: 'fix: Generate CloudQuery Go API Client from `spec.json`' body: This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` - author: cq-bot labels: automerge diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index fa76947..9350acf 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -12,10 +12,27 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + permission-contents: write + permission-pull-requests: write + - name: Generate GitHub App token for .github repo + id: app-token-github + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + repositories: | + .github + permission-actions: write - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4 id: release with: - token: ${{ secrets.GH_CQ_BOT }} + token: ${{ steps.app-token.outputs.token }} - name: Parse semver string if: steps.release.outputs.release_created id: semver_parser @@ -34,7 +51,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == '' with: - github-token: ${{ secrets.GH_CQ_BOT }} + github-token: ${{ steps.app-token-github.outputs.token }} script: | github.rest.actions.createWorkflowDispatch({ owner: 'cloudquery', From 374413e753706286017c18ec97e0d6eaa69a2c6f Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Tue, 31 Mar 2026 15:20:15 +0100 Subject: [PATCH 339/343] chore: add Kodiak configuration (#353) --- .github/.kodiak.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/.kodiak.toml diff --git a/.github/.kodiak.toml b/.github/.kodiak.toml new file mode 100644 index 0000000..f642dba --- /dev/null +++ b/.github/.kodiak.toml @@ -0,0 +1,15 @@ +version = 1 + +[approve] +auto_approve_usernames = ["cloudquery-ci"] + +[merge.message] +body = "pull_request_body" +cut_body_after = "Use the following steps to ensure your PR is ready to be reviewed" +cut_body_and_text = true +cut_body_before = "" +title = "pull_request_title" + +[merge] +blocking_labels = ["wip", "no automerge"] +notify_on_conflict = false From b85de0eadda8fd37c1925d3b1752872ecbea8e65 Mon Sep 17 00:00:00 2001 From: "cloudquery-ci[bot]" <271027272+cloudquery-ci[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:12:08 +0000 Subject: [PATCH 340/343] chore(deps): Update github-actions (#354) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-go](https://redirect.github.com/actions/setup-go) ([changelog](https://redirect.github.com/actions/setup-go/compare/4b73464bb391d4059bd26b0524d20df3927bd417..4a3601121dd01d1626a1e23e37211e3254c1c06c)) | action | digest | `4b73464` → `4a36011` | | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | uses-with | minor | `v2.10.1` → `v2.11.4` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.11.4`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2114) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.3...v2.11.4) *Released on 2026-03-22* 1. Linters bug fixes - `govet-modernize`: from 0.42.0 to 0.43.0 - `noctx`: from 0.5.0 to 0.5.1 - `sqlclosecheck`: from 0.5.1 to 0.6.0 ### [`v2.11.3`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2113) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.2...v2.11.3) *Released on 2026-03-10* 1. Linters bug fixes - `gosec`: from v2.24.7 to [`619ce21`](https://redirect.github.com/golangci/golangci-lint/commit/619ce2117e08) ### [`v2.11.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2112) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.1...v2.11.2) *Released on 2026-03-07* 1. Fixes - `fmt`: fix error when using the `fmt` command with explicit paths. ### [`v2.11.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2111) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.0...v2.11.1) *Released on 2026-03-06* Due to an error related to AUR, some artifacts of the v2.11.0 release have not been published. This release contains the same things as v2.11.0. ### [`v2.11.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2110) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.10.1...v2.11.0) *Released on 2026-03-06* 1. Linters new features or changes - `errcheck`: from 1.9.0 to 1.10.0 (exclude `crypto/rand.Read` by default) - `gosec`: from 2.23.0 to 2.24.6 (new rules: `G113`, `G118`, `G119`, `G120`, `G121`, `G122`, `G123`, `G408`, `G707`) - `noctx`: from 0.4.0 to 0.5.0 (new detection: `httptest.NewRequestWithContext`) - `prealloc`: from 1.0.2 to 1.1.0 - `revive`: from 1.14.0 to 1.15.0 (⚠️ Breaking change: package-related checks moved from `var-naming` to a new rule `package-naming`) 2. Linters bug fixes - `gocognit`: from 1.2.0 to 1.2.1 - `gosec`: from 2.24.6 to 2.24.7 - `unqueryvet`: from 1.5.3 to 1.5.4
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- .github/workflows/gen-client.yml | 2 +- .github/workflows/lint_golang.yml | 4 ++-- .github/workflows/unittest.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index e6d482b..779cec8 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -43,7 +43,7 @@ jobs: sudo rm -rf .generated - name: Set up Go 1.x - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: go-version-file: go.mod diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index 1553f6e..c1a8fef 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -17,10 +17,10 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 + - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: go-version-file: go.mod - name: golangci-lint uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 with: - version: v2.10.1 + version: v2.11.4 diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 7257239..e7411f0 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -22,7 +22,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Set up Go 1.x - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: go-version-file: go.mod - run: go mod download From e49993d3695a8f09df4334f15e7fa138abf41fc7 Mon Sep 17 00:00:00 2001 From: "cloudquery-ci[bot]" <271027272+cloudquery-ci[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:14:07 +0000 Subject: [PATCH 341/343] chore(deps): Update dependency golangci/golangci-lint to v2.11.4 (#355) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.10.1` → `v2.11.4` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.11.4`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2114) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.3...v2.11.4) *Released on 2026-03-22* 1. Linters bug fixes - `govet-modernize`: from 0.42.0 to 0.43.0 - `noctx`: from 0.5.0 to 0.5.1 - `sqlclosecheck`: from 0.5.1 to 0.6.0 ### [`v2.11.3`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2113) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.2...v2.11.3) *Released on 2026-03-10* 1. Linters bug fixes - `gosec`: from v2.24.7 to [`619ce21`](https://redirect.github.com/golangci/golangci-lint/commit/619ce2117e08) ### [`v2.11.2`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2112) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.1...v2.11.2) *Released on 2026-03-07* 1. Fixes - `fmt`: fix error when using the `fmt` command with explicit paths. ### [`v2.11.1`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2111) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.0...v2.11.1) *Released on 2026-03-06* Due to an error related to AUR, some artifacts of the v2.11.0 release have not been published. This release contains the same things as v2.11.0. ### [`v2.11.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2110) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.10.1...v2.11.0) *Released on 2026-03-06* 1. Linters new features or changes - `errcheck`: from 1.9.0 to 1.10.0 (exclude `crypto/rand.Read` by default) - `gosec`: from 2.23.0 to 2.24.6 (new rules: `G113`, `G118`, `G119`, `G120`, `G121`, `G122`, `G123`, `G408`, `G707`) - `noctx`: from 0.4.0 to 0.5.0 (new detection: `httptest.NewRequestWithContext`) - `prealloc`: from 1.0.2 to 1.1.0 - `revive`: from 1.14.0 to 1.15.0 (⚠️ Breaking change: package-related checks moved from `var-naming` to a new rule `package-naming`) 2. Linters bug fixes - `gocognit`: from 1.2.0 to 1.2.1 - `gosec`: from 2.24.6 to 2.24.7 - `unqueryvet`: from 1.5.3 to 1.5.4
--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). From b20fdd0d9fe5ae37fdec8064574e61138f41f134 Mon Sep 17 00:00:00 2001 From: "cloudquery-ci[bot]" <271027272+cloudquery-ci[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:15:38 +0000 Subject: [PATCH 342/343] fix(deps): Update module github.com/oapi-codegen/runtime to v1.3.0 (#356) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.1.2` → `v1.3.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2foapi-codegen%2fruntime/v1.3.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2foapi-codegen%2fruntime/v1.1.2/v1.3.0?slim=true) | --- ### Release Notes
oapi-codegen/runtime (github.com/oapi-codegen/runtime) ### [`v1.3.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.3.0): Echo V5, more parameter handling options, bug fixes [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.2.0...v1.3.0) #### 🚀 New features and improvements - feat: improve parameter handling ([#​109](https://redirect.github.com/oapi-codegen/runtime/issues/109)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) Parameters now support the `allowReserved` property from OpenAPI 3.0. - feat: add support for echo v5 ([#​89](https://redirect.github.com/oapi-codegen/runtime/issues/89)) [@​jinuthankachan](https://redirect.github.com/jinuthankachan) #### 🐛 Bug fixes - Fix: Query param deepObject return without assign on !required ([#​68](https://redirect.github.com/oapi-codegen/runtime/issues/68)) [@​voro015](https://redirect.github.com/voro015) - fix: strip style prefix for label/matrix primitive parameters ([#​99](https://redirect.github.com/oapi-codegen/runtime/issues/99)) ([#​100](https://redirect.github.com/oapi-codegen/runtime/issues/100)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - fix: parse un-exploded query param to map ([#​101](https://redirect.github.com/oapi-codegen/runtime/issues/101)) [@​alexdulin](https://redirect.github.com/alexdulin) - fix: respect Binder interface for primitive types in BindStringToObject ([#​86](https://redirect.github.com/oapi-codegen/runtime/issues/86)) [@​vikstrous](https://redirect.github.com/vikstrous) #### 👻 Maintenance - chore: Update to go 1.24 ([#​111](https://redirect.github.com/oapi-codegen/runtime/issues/111)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 📦 Dependency updates - chore: Update to go 1.24 ([#​111](https://redirect.github.com/oapi-codegen/runtime/issues/111)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### Sponsors We would like to thank our sponsors for their support during this release.

DevZero logo

Cybozu logo

### [`v1.2.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.2.0): Parameter binding extensions, bug fixes, dependency updates [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.1.2...v1.2.0) #### Notable Changes The main change in this release is the addition of new Parameter binding and styling functions, which allow the code generator to pass in the `type` and `format` from the spec. Previously, we inferred what we wanted to do based on the destination type, however, it's not always possible to decide this without information about the specification. #### 🚀 New features and improvements - feat: add BindRawQueryParameter for correct comma handling ([#​92](https://redirect.github.com/oapi-codegen/runtime/issues/92)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - fix: add TypeHint-aware parameter binding and styling for \[]byte ([#​97](https://redirect.github.com/oapi-codegen/runtime/issues/97)) ([#​98](https://redirect.github.com/oapi-codegen/runtime/issues/98)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - Support array of objects parameters ([#​40](https://redirect.github.com/oapi-codegen/runtime/issues/40)) [@​danicc097](https://redirect.github.com/danicc097) - Allow BindStyledParameterWithOptions to fill maps ([#​72](https://redirect.github.com/oapi-codegen/runtime/issues/72)) [@​JoZie](https://redirect.github.com/JoZie) #### 🐛 Bug fixes - fix: bind Date and Time query params as scalar values ([#​21](https://redirect.github.com/oapi-codegen/runtime/issues/21)) ([#​93](https://redirect.github.com/oapi-codegen/runtime/issues/93)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - fix: support non-indexed deepObject array unmarshaling ([#​22](https://redirect.github.com/oapi-codegen/runtime/issues/22)) ([#​96](https://redirect.github.com/oapi-codegen/runtime/issues/96)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - fix: correct time.Time date-only fallback parsing in deepObject ([#​95](https://redirect.github.com/oapi-codegen/runtime/issues/95)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - Refactor date parsing error handling ([#​88](https://redirect.github.com/oapi-codegen/runtime/issues/88)) [@​jsnfwlr](https://redirect.github.com/jsnfwlr) - fix: improve email validation using net/mail package ([#​60](https://redirect.github.com/oapi-codegen/runtime/issues/60)) [@​sniperwolf](https://redirect.github.com/sniperwolf) - Fix deepObject marshalling losing json number format/precision ([#​29](https://redirect.github.com/oapi-codegen/runtime/issues/29)) [@​mgabeler-lee-6rs](https://redirect.github.com/mgabeler-lee-6rs) - Fix issue 55 ([#​56](https://redirect.github.com/oapi-codegen/runtime/issues/56)) [@​mikhalytch](https://redirect.github.com/mikhalytch) - fix(deepobject): support nested objects in deepObject arrays ([#​84](https://redirect.github.com/oapi-codegen/runtime/issues/84)) [@​adrianbrad](https://redirect.github.com/adrianbrad) #### 👻 Maintenance - feat(fix): bump gin version ([#​51](https://redirect.github.com/oapi-codegen/runtime/issues/51)) [@​Gamawn](https://redirect.github.com/Gamawn) - Update golang.org/x/crypto to v0.32.0 ([#​59](https://redirect.github.com/oapi-codegen/runtime/issues/59)) [@​kojustin](https://redirect.github.com/kojustin) - Updated Golang reference to address security vulnerability ([#​57](https://redirect.github.com/oapi-codegen/runtime/issues/57)) [@​ivan-manzhulin](https://redirect.github.com/ivan-manzhulin) - Fix linter errors ([#​85](https://redirect.github.com/oapi-codegen/runtime/issues/85)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - build: capture `govulncheck` results as Code Scanning alerts ([#​80](https://redirect.github.com/oapi-codegen/runtime/issues/80)) [@​jamietanna](https://redirect.github.com/jamietanna) #### 📦 Dependency updates - chore(deps): update release-drafter/release-drafter action to v6 ([#​31](https://redirect.github.com/oapi-codegen/runtime/issues/31)) @​[renovate\[bot\]](https://redirect.github.com/apps/renovate) #### Sponsors We would like to thank our sponsors for their support during this release.

DevZero logo

Cybozu logo

--- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 899ed9a..87b67e8 100644 --- a/go.mod +++ b/go.mod @@ -5,18 +5,18 @@ go 1.26.1 require ( github.com/adrg/xdg v0.5.3 github.com/hashicorp/go-retryablehttp v0.7.8 - github.com/oapi-codegen/runtime v1.1.2 + github.com/oapi-codegen/runtime v1.3.0 github.com/stretchr/testify v1.11.1 ) require ( github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/google/uuid v1.5.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.26.0 // indirect + golang.org/x/sys v0.29.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 5690e49..c81a257 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= @@ -27,8 +27,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI= -github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= +github.com/oapi-codegen/runtime v1.3.0 h1:vyK1zc0gDWWXgk2xoQa4+X4RNNc5SL2RbTpJS/4vMYA= +github.com/oapi-codegen/runtime v1.3.0/go.mod h1:kOdeacKy7t40Rclb1je37ZLFboFxh+YLy0zaPCMibPY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= @@ -36,8 +36,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 6d381ab8302960adfe1e87f00395c19af90269f0 Mon Sep 17 00:00:00 2001 From: "cloudquery-ci[bot]" <271027272+cloudquery-ci[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:58:31 +0000 Subject: [PATCH 343/343] fix: Generate CloudQuery Go API Client from `spec.json` (#358) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 953 ++++---------------------------------------------- models.gen.go | 154 -------- spec.json | 335 ------------------ 3 files changed, 60 insertions(+), 1382 deletions(-) diff --git a/client.gen.go b/client.gen.go index f55118b..3fe9b8e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -414,25 +414,6 @@ type ClientInterface interface { UpdateSettings(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetTeamSpend request - GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSpendingLimit request - DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSpendingLimit request - GetSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSpendingLimitWithBody request with any body - CreateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateSpendingLimit(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateSpendingLimitWithBody request with any body - UpdateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSpendingLimit(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListSubscriptionOrdersByTeam request ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1961,90 +1942,6 @@ func (c *Client) UpdateSettings(ctx context.Context, teamName TeamName, body Upd return c.Client.Do(req) } -func (c *Client) GetTeamSpend(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamSpendRequest(c.Server, teamName, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSpendingLimitRequest(c.Server, teamName) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetSpendingLimit(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSpendingLimitRequest(c.Server, teamName) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) CreateSpendingLimit(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSpendingLimitRequest(c.Server, teamName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateSpendingLimitWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSpendingLimitRequestWithBody(c.Server, teamName, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) UpdateSpendingLimit(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSpendingLimitRequest(c.Server, teamName, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListSubscriptionOrdersByTeamRequest(c.Server, teamName, params) if err != nil { @@ -7435,8 +7332,8 @@ func NewUpdateSettingsRequestWithBody(server string, teamName TeamName, contentT return req, nil } -// NewGetTeamSpendRequest generates requests for GetTeamSpend -func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpendParams) (*http.Request, error) { +// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam +func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { var err error var pathParam0 string @@ -7451,7 +7348,7 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spend", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7464,9 +7361,9 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe if params != nil { queryValues := queryURL.Query() - if params.Start != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7480,9 +7377,9 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe } - if params.End != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7507,87 +7404,19 @@ func NewGetTeamSpendRequest(server string, teamName TeamName, params *GetTeamSpe return req, nil } -// NewDeleteSpendingLimitRequest generates requests for DeleteSpendingLimit -func NewDeleteSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetSpendingLimitRequest generates requests for GetSpendingLimit -func NewGetSpendingLimitRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateSpendingLimitRequest calls the generic CreateSpendingLimit builder with application/json body -func NewCreateSpendingLimitRequest(server string, teamName TeamName, body CreateSpendingLimitJSONRequestBody) (*http.Request, error) { +// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body +func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) + return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreateSpendingLimitRequestWithBody generates requests for CreateSpendingLimit with any type of body -func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body +func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7602,7 +7431,7 @@ func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, con return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7622,19 +7451,8 @@ func NewCreateSpendingLimitRequestWithBody(server string, teamName TeamName, con return req, nil } -// NewUpdateSpendingLimitRequest calls the generic UpdateSpendingLimit builder with application/json body -func NewUpdateSpendingLimitRequest(server string, teamName TeamName, body UpdateSpendingLimitJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSpendingLimitRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewUpdateSpendingLimitRequestWithBody generates requests for UpdateSpendingLimit with any type of body -func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam +func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { var err error var pathParam0 string @@ -7644,12 +7462,19 @@ func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, con return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/spending-limits", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7659,18 +7484,16 @@ func NewUpdateSpendingLimitRequestWithBody(server string, teamName TeamName, con return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam -func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { var err error var pathParam0 string @@ -7685,7 +7508,7 @@ func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, pa return nil, err } - operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7741,19 +7564,19 @@ func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, pa return req, nil } -// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body -func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) } -// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body -func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -7768,7 +7591,7 @@ func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName Te return nil, err } - operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7788,49 +7611,8 @@ func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName Te return req, nil } -// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam -func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage -func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { +// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary +func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { var err error var pathParam0 string @@ -7845,7 +7627,7 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis return nil, err } - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -7858,9 +7640,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.Metrics != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7874,9 +7656,9 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis } - if params.PerPage != nil { + if params.Start != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7890,126 +7672,7 @@ func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *Lis } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body -func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) -} - -// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body -func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary -func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Metrics != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Start != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.End != nil { + if params.End != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { return nil, err @@ -9441,25 +9104,6 @@ type ClientWithResponsesInterface interface { UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) - // GetTeamSpendWithResponse request - GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) - - // DeleteSpendingLimitWithResponse request - DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) - - // GetSpendingLimitWithResponse request - GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) - - // CreateSpendingLimitWithBodyWithResponse request with any body - CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) - - CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) - - // UpdateSpendingLimitWithBodyWithResponse request with any body - UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) - - UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) - // ListSubscriptionOrdersByTeamWithResponse request ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) @@ -11763,138 +11407,6 @@ func (r UpdateSettingsResponse) StatusCode() int { return 0 } -type GetTeamSpendResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SpendSummary - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetTeamSpendResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamSpendResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r DeleteSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SpendingLimit - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r GetSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *SpendingLimit - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r CreateSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateSpendingLimitResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SpendingLimit - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSpendingLimitResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSpendingLimitResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type ListSubscriptionOrdersByTeamResponse struct { Body []byte HTTPResponse *http.Response @@ -13680,109 +13192,48 @@ func (c *ClientWithResponses) UpdateSettingsWithResponse(ctx context.Context, te return ParseUpdateSettingsResponse(rsp) } -// GetTeamSpendWithResponse request returning *GetTeamSpendResponse -func (c *ClientWithResponses) GetTeamSpendWithResponse(ctx context.Context, teamName TeamName, params *GetTeamSpendParams, reqEditors ...RequestEditorFn) (*GetTeamSpendResponse, error) { - rsp, err := c.GetTeamSpend(ctx, teamName, params, reqEditors...) +// ListSubscriptionOrdersByTeamWithResponse request returning *ListSubscriptionOrdersByTeamResponse +func (c *ClientWithResponses) ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) { + rsp, err := c.ListSubscriptionOrdersByTeam(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseGetTeamSpendResponse(rsp) + return ParseListSubscriptionOrdersByTeamResponse(rsp) } -// DeleteSpendingLimitWithResponse request returning *DeleteSpendingLimitResponse -func (c *ClientWithResponses) DeleteSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteSpendingLimitResponse, error) { - rsp, err := c.DeleteSpendingLimit(ctx, teamName, reqEditors...) +// CreateSubscriptionOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateSubscriptionOrderForTeamResponse +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteSpendingLimitResponse(rsp) + return ParseCreateSubscriptionOrderForTeamResponse(rsp) } -// GetSpendingLimitWithResponse request returning *GetSpendingLimitResponse -func (c *ClientWithResponses) GetSpendingLimitWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSpendingLimitResponse, error) { - rsp, err := c.GetSpendingLimit(ctx, teamName, reqEditors...) +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeam(ctx, teamName, body, reqEditors...) if err != nil { return nil, err } - return ParseGetSpendingLimitResponse(rsp) + return ParseCreateSubscriptionOrderForTeamResponse(rsp) } -// CreateSpendingLimitWithBodyWithResponse request with arbitrary body returning *CreateSpendingLimitResponse -func (c *ClientWithResponses) CreateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { - rsp, err := c.CreateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) +// GetSubscriptionOrderByTeamWithResponse request returning *GetSubscriptionOrderByTeamResponse +func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) { + rsp, err := c.GetSubscriptionOrderByTeam(ctx, teamName, teamSubscriptionOrderID, reqEditors...) if err != nil { return nil, err } - return ParseCreateSpendingLimitResponse(rsp) + return ParseGetSubscriptionOrderByTeamResponse(rsp) } -func (c *ClientWithResponses) CreateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body CreateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpendingLimitResponse, error) { - rsp, err := c.CreateSpendingLimit(ctx, teamName, body, reqEditors...) +// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse +func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { + rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) if err != nil { return nil, err } - return ParseCreateSpendingLimitResponse(rsp) -} - -// UpdateSpendingLimitWithBodyWithResponse request with arbitrary body returning *UpdateSpendingLimitResponse -func (c *ClientWithResponses) UpdateSpendingLimitWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { - rsp, err := c.UpdateSpendingLimitWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSpendingLimitResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSpendingLimitWithResponse(ctx context.Context, teamName TeamName, body UpdateSpendingLimitJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSpendingLimitResponse, error) { - rsp, err := c.UpdateSpendingLimit(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSpendingLimitResponse(rsp) -} - -// ListSubscriptionOrdersByTeamWithResponse request returning *ListSubscriptionOrdersByTeamResponse -func (c *ClientWithResponses) ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) { - rsp, err := c.ListSubscriptionOrdersByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListSubscriptionOrdersByTeamResponse(rsp) -} - -// CreateSubscriptionOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateSubscriptionOrderForTeamResponse -func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { - rsp, err := c.CreateSubscriptionOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSubscriptionOrderForTeamResponse(rsp) -} - -func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { - rsp, err := c.CreateSubscriptionOrderForTeam(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSubscriptionOrderForTeamResponse(rsp) -} - -// GetSubscriptionOrderByTeamWithResponse request returning *GetSubscriptionOrderByTeamResponse -func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) { - rsp, err := c.GetSubscriptionOrderByTeam(ctx, teamName, teamSubscriptionOrderID, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSubscriptionOrderByTeamResponse(rsp) -} - -// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse -func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { - rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamPluginUsageResponse(rsp) + return ParseListTeamPluginUsageResponse(rsp) } // IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse @@ -18680,290 +18131,6 @@ func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, e return response, nil } -// ParseGetTeamSpendResponse parses an HTTP response from a GetTeamSpendWithResponse call -func ParseGetTeamSpendResponse(rsp *http.Response) (*GetTeamSpendResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetTeamSpendResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendSummary - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeleteSpendingLimitResponse parses an HTTP response from a DeleteSpendingLimitWithResponse call -func ParseDeleteSpendingLimitResponse(rsp *http.Response) (*DeleteSpendingLimitResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteSpendingLimitResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetSpendingLimitResponse parses an HTTP response from a GetSpendingLimitWithResponse call -func ParseGetSpendingLimitResponse(rsp *http.Response) (*GetSpendingLimitResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSpendingLimitResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendingLimit - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateSpendingLimitResponse parses an HTTP response from a CreateSpendingLimitWithResponse call -func ParseCreateSpendingLimitResponse(rsp *http.Response) (*CreateSpendingLimitResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateSpendingLimitResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SpendingLimit - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateSpendingLimitResponse parses an HTTP response from a UpdateSpendingLimitWithResponse call -func ParseUpdateSpendingLimitResponse(rsp *http.Response) (*UpdateSpendingLimitResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateSpendingLimitResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SpendingLimit - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index f1c7bd7..68ff4f8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1722,13 +1722,6 @@ type PluginVersionUpdate struct { SupportedTargets *[]string `json:"supported_targets,omitempty"` } -// PriceCategorySpend Spend by price category for a defined period. -type PriceCategorySpend struct { - // Category Supported price categories for billing - Category PluginPriceCategory `json:"category"` - Total string `json:"total"` -} - // RegisterUser201Response defines model for RegisterUser_201_response. type RegisterUser201Response struct { // CustomToken Token to exchange for ID token @@ -1843,59 +1836,6 @@ type SettingsUpdate struct { EnforceMfa *bool `json:"enforce_mfa,omitempty"` } -// SpendSummary A spend summary for a team, summarizing the spend by each price category over a given time range. -// Note that empty or all-zero values are not included in the response. -type SpendSummary struct { - // Metadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. - Metadata SpendSummaryMetadata `json:"metadata"` - Values interface{} `json:"values"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// SpendSummaryValue A spend summary value. -type SpendSummaryValue struct { - ByCategory []PriceCategorySpend `json:"by_category"` - - // Date The timestamp for the spend summary. - Date time.Time `json:"date"` - - // Total Total spend for the period in USD. - Total string `json:"total"` -} - -// SpendSummaryMetadata Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details. -type SpendSummaryMetadata struct { - // End The exclusive end of the query time range. - End interface{} `json:"end"` - - // Start The inclusive start of the query time range. - Start interface{} `json:"start"` -} - -// SpendingLimit A configurable spending limit for the team. Empty values indicate no limit. -type SpendingLimit struct { - // CreatedAt The date and time the team limit was created. - CreatedAt *time.Time `json:"created_at,omitempty"` - - // UpdatedAt The date and time the team limit was last updated. - UpdatedAt *time.Time `json:"updated_at,omitempty"` - - // USD The maximum USD amount the team is allowed to use within a calendar month. - USD *int `json:"usd,omitempty"` -} - -// SpendingLimitCreate A configurable monthly limit for team usage. -type SpendingLimitCreate struct { - // USD The maximum USD amount the team is allowed to use within a calendar month. - USD int `json:"usd"` -} - -// SpendingLimitUpdate A configurable spending limit for the team. -type SpendingLimitUpdate struct { - // USD The maximum USD amount the team is allowed to use within a calendar month. - USD int `json:"usd"` -} - // Team CloudQuery Team type Team struct { CreatedAt *time.Time `json:"created_at,omitempty"` @@ -2527,15 +2467,6 @@ type DownloadPluginAssetByTeamParams struct { Accept *string `json:"Accept,omitempty"` } -// GetTeamSpendParams defines parameters for GetTeamSpend. -type GetTeamSpendParams struct { - // Start A valid ISO 8601 date string representing the inclusive start of the period. - Start *time.Time `form:"start,omitempty" json:"start,omitempty"` - - // End A valid ISO 8601 date string representing the exclusive end of the period. - End *time.Time `form:"end,omitempty" json:"end,omitempty"` -} - // ListSubscriptionOrdersByTeamParams defines parameters for ListSubscriptionOrdersByTeam. type ListSubscriptionOrdersByTeamParams struct { // Page Page number of the results to fetch @@ -2728,12 +2659,6 @@ type RemoveTeamMembershipJSONRequestBody = RemoveTeamMembershipRequest // UpdateSettingsJSONRequestBody defines body for UpdateSettings for application/json ContentType. type UpdateSettingsJSONRequestBody = SettingsUpdate -// CreateSpendingLimitJSONRequestBody defines body for CreateSpendingLimit for application/json ContentType. -type CreateSpendingLimitJSONRequestBody = SpendingLimitCreate - -// UpdateSpendingLimitJSONRequestBody defines body for UpdateSpendingLimit for application/json ContentType. -type UpdateSpendingLimitJSONRequestBody = SpendingLimitUpdate - // CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate @@ -4385,85 +4310,6 @@ func (a SendUserEventRequest) MarshalJSON() ([]byte, error) { return json.Marshal(object) } -// Getter for additional properties for SpendSummary. Returns the specified -// element and whether it was found -func (a SpendSummary) Get(fieldName string) (value interface{}, found bool) { - if a.AdditionalProperties != nil { - value, found = a.AdditionalProperties[fieldName] - } - return -} - -// Setter for additional properties for SpendSummary -func (a *SpendSummary) Set(fieldName string, value interface{}) { - if a.AdditionalProperties == nil { - a.AdditionalProperties = make(map[string]interface{}) - } - a.AdditionalProperties[fieldName] = value -} - -// Override default JSON handling for SpendSummary to handle AdditionalProperties -func (a *SpendSummary) UnmarshalJSON(b []byte) error { - object := make(map[string]json.RawMessage) - err := json.Unmarshal(b, &object) - if err != nil { - return err - } - - if raw, found := object["metadata"]; found { - err = json.Unmarshal(raw, &a.Metadata) - if err != nil { - return fmt.Errorf("error reading 'metadata': %w", err) - } - delete(object, "metadata") - } - - if raw, found := object["values"]; found { - err = json.Unmarshal(raw, &a.Values) - if err != nil { - return fmt.Errorf("error reading 'values': %w", err) - } - delete(object, "values") - } - - if len(object) != 0 { - a.AdditionalProperties = make(map[string]interface{}) - for fieldName, fieldBuf := range object { - var fieldVal interface{} - err := json.Unmarshal(fieldBuf, &fieldVal) - if err != nil { - return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) - } - a.AdditionalProperties[fieldName] = fieldVal - } - } - return nil -} - -// Override default JSON handling for SpendSummary to handle AdditionalProperties -func (a SpendSummary) MarshalJSON() ([]byte, error) { - var err error - object := make(map[string]json.RawMessage) - - object["metadata"], err = json.Marshal(a.Metadata) - if err != nil { - return nil, fmt.Errorf("error marshaling 'metadata': %w", err) - } - - object["values"], err = json.Marshal(a.Values) - if err != nil { - return nil, fmt.Errorf("error marshaling 'values': %w", err) - } - - for fieldName, field := range a.AdditionalProperties { - object[fieldName], err = json.Marshal(field) - if err != nil { - return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) - } - } - return json.Marshal(object) -} - // Getter for additional properties for UpdateCurrentUserRequest. Returns the specified // element and whether it was found func (a UpdateCurrentUserRequest) Get(fieldName string) (value interface{}, found bool) { diff --git a/spec.json b/spec.json index 0c46e28..f5863e1 100644 --- a/spec.json +++ b/spec.json @@ -2492,153 +2492,6 @@ "tags" : [ "teams" ] } }, - "/teams/{team_name}/spending-limits" : { - "delete" : { - "description" : "Delete a spending limit for a team", - "operationId" : "DeleteSpendingLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "responses" : { - "204" : { - "description" : "Spending limit deleted." - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - }, - "get" : { - "description" : "Get monthly spending limit for team.", - "operationId" : "GetSpendingLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SpendingLimit" - } - } - }, - "description" : "Spending limit retrieved." - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - }, - "post" : { - "description" : "Create a spending limit for a team. Deprecated.", - "operationId" : "CreateSpendingLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SpendingLimitCreate" - } - } - } - }, - "responses" : { - "201" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SpendingLimit" - } - } - }, - "description" : "New spending limit created." - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - }, - "put" : { - "description" : "Update a spending limit for a team. Deprecated.", - "operationId" : "UpdateSpendingLimit", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SpendingLimitUpdate" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SpendingLimit" - } - } - }, - "description" : "Spending limit updated." - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - } - }, "/teams/{team_name}/invoices" : { "get" : { "description" : "List all past invoices for the team.", @@ -3024,65 +2877,6 @@ "tags" : [ "teams" ] } }, - "/teams/{team_name}/spend" : { - "get" : { - "description" : "Get team spend for defined period. Deprecated.", - "operationId" : "GetTeamSpend", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "description" : "A valid ISO 8601 date string representing the inclusive start of the period.", - "explode" : true, - "in" : "query", - "name" : "start", - "required" : false, - "schema" : { - "format" : "date-time", - "type" : "string" - }, - "style" : "form" - }, { - "description" : "A valid ISO 8601 date string representing the exclusive end of the period.", - "explode" : true, - "in" : "query", - "name" : "end", - "required" : false, - "schema" : { - "format" : "date-time", - "type" : "string" - }, - "style" : "form" - } ], - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SpendSummary" - } - } - }, - "description" : "Team spend for defined period." - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "401" : { - "$ref" : "#/components/responses/RequiresAuthentication" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "teams" ] - } - }, "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}" : { "get" : { "description" : "Download an asset for a given plugin version as the current team.", @@ -5557,11 +5351,9 @@ "ImageURL" : { "properties" : { "upload_url" : { - "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", "type" : "string" }, "download_url" : { - "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", "type" : "string" }, "required_headers" : { @@ -7105,65 +6897,6 @@ "required" : [ "role", "user" ], "title" : "CloudQuery User Membership" }, - "SpendingLimit" : { - "additionalProperties" : false, - "description" : "A configurable spending limit for the team. Empty values indicate no limit.", - "properties" : { - "created_at" : { - "description" : "The date and time the team limit was created.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "updated_at" : { - "description" : "The date and time the team limit was last updated.", - "example" : "2017-07-14T16:53:42Z", - "format" : "date-time", - "type" : "string" - }, - "usd" : { - "description" : "The maximum USD amount the team is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "title" : "Team Spending Limit" - }, - "SpendingLimitUpdate" : { - "additionalProperties" : false, - "description" : "A configurable spending limit for the team.", - "properties" : { - "usd" : { - "description" : "The maximum USD amount the team is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "required" : [ "usd" ], - "title" : "Team Spending Limit" - }, - "SpendingLimitCreate" : { - "additionalProperties" : false, - "description" : "A configurable monthly limit for team usage.", - "properties" : { - "usd" : { - "description" : "The maximum USD amount the team is allowed to use within a calendar month.", - "example" : 1000, - "maximum" : 1000000000, - "minimum" : 0, - "type" : "integer", - "x-go-name" : "USD" - } - }, - "required" : [ "usd" ], - "title" : "Team Spending Limit" - }, "Invoice" : { "additionalProperties" : false, "description" : "Invoice details", @@ -7382,59 +7115,6 @@ "required" : [ "groups", "metadata", "values" ], "title" : "CloudQuery Usage Summary" }, - "PriceCategorySpend" : { - "additionalProperties" : false, - "description" : "Spend by price category for a defined period.", - "properties" : { - "category" : { - "$ref" : "#/components/schemas/PluginPriceCategory" - }, - "total" : { - "type" : "string" - } - }, - "required" : [ "category", "total" ], - "title" : "Spend by price category" - }, - "SpendSummaryValue" : { - "additionalProperties" : false, - "description" : "A spend summary value.", - "properties" : { - "date" : { - "description" : "The timestamp for the spend summary.", - "format" : "date-time", - "type" : "string" - }, - "by_category" : { - "items" : { - "$ref" : "#/components/schemas/PriceCategorySpend" - }, - "type" : "array" - }, - "total" : { - "description" : "Total spend for the period in USD.", - "type" : "string" - } - }, - "required" : [ "by_category", "date", "total" ], - "title" : "CloudQuery Spend Summary Value" - }, - "SpendSummary" : { - "additionalProperties" : { }, - "description" : "A spend summary for a team, summarizing the spend by each price category over a given time range.\nNote that empty or all-zero values are not included in the response.\n", - "properties" : { - "values" : { - "items" : { - "$ref" : "#/components/schemas/SpendSummaryValue" - } - }, - "metadata" : { - "$ref" : "#/components/schemas/SpendSummary_metadata" - } - }, - "required" : [ "metadata", "values" ], - "title" : "CloudQuery Spend Summary" - }, "Email" : { "example" : "user@example.com", "format" : "email", @@ -8868,21 +8548,6 @@ } }, "required" : [ "aggregation_period", "end", "metrics", "start" ] - }, - "SpendSummary_metadata" : { - "additionalProperties" : false, - "description" : "Additional metadata about the spend summary. This may include information about the time range, the aggregation period, or other details.", - "properties" : { - "start" : { - "description" : "The inclusive start of the query time range.", - "format" : "date-time" - }, - "end" : { - "description" : "The exclusive end of the query time range.", - "format" : "date-time" - } - }, - "required" : [ "end", "start" ] } }, "securitySchemes" : {